Блог пользователя Motarack

Автор Motarack, история, 5 лет назад, По-английски

Some problems don't have a tutorial yet, those should be added later.

Tutorial is loading...
Code
Tutorial is loading...
Code
Tutorial is loading...
Code
Tutorial is loading...
Code
Tutorial is loading...

Short and precise explanation by TooDumbToWin can be found here.

Code1
Code2
Tutorial is loading...
Code
Tutorial is loading...
Code
Tutorial is loading...
Code
Tutorial is loading...
Code
Tutorial is loading...
Code
Разбор задач 2018 AICCSA Programming Contest
  • Проголосовать: нравится
  • +37
  • Проголосовать: не нравится

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится +16 Проголосовать: не нравится

So, just to confirm: The rectangle (mirror) in problem F must be axis-aligned, right? Is it possible to add that to the problem statement?

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Could you share a solution code for problem A ? I can't debug my code....thanks

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Is anyone of these problems intended for Div2 guys?

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    As mentioned in the announcement the contest is intended for contestants with rating in the range [1600, 2600].

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

For Problem D. Two Sequences Why this code is giving WA as verdict on Test Case 2:

vector<long>v1(n+1),v2(n+1);
    REP(i,n){
       cin>>v1[i];
    }
    REP(i,n){
       cin>>v2[i];
    }
            bool flag = 1;
    REP(i,n){
       long x = v1[i], y = v2[i];
       if(abs(x-y)<=k)   flag &= 1;
       else  {flag = 0;break;}
    }

    if(flag == 0)  cout<<"NO\n";
    else cout<<"YES\n";
  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    make sure to read the statement correctly, if you still don't know why it's wrong then try manually some random small cases.

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Problem C (Bonus):

Coefficient of $$$a_k = \frac{(k+1)\binom{n+1}{k+1}}{n-k+1}-1$$$ will do the trick.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    How could this be noticed? All my attempts to calculate or guess the formula were not correct

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone provide how to solve G?