Motarack's blog

By Motarack, history, 9 months ago, In English,

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 praran26 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
 
 
 
 
  • Vote: I like it
  • +37
  • Vote: I do not like it

»
9 months ago, # |
Rev. 2   Vote: I like it +16 Vote: I do not like it

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?

  • »
    »
    9 months ago, # ^ |
      Vote: I like it +24 Vote: I do not like it

    Yes, I will do that, sorry for the confusion.

    • »
      »
      »
      9 months ago, # ^ |
        Vote: I like it +19 Vote: I do not like it

      No worries. Thanks for the nice contest!

»
9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Is anyone of these problems intended for Div2 guys?

  • »
    »
    9 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

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

»
8 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

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";
  • »
    »
    8 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

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

    • »
      »
      »
      8 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Got it, reading it incorrectly We can compare the elements in any order. Thanks

»
9 days ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Problem C (Bonus):

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