atcoder_official's blog

By atcoder_official, history, 13 months ago, In English

We will hold AtCoder Beginner Contest 422.

We are looking forward to your participation!

  • Vote: I like it
  • +20
  • Vote: I do not like it

| Write comment?
»
13 months ago, hide # |
 
Vote: I like it -17 Vote: I do not like it

This new start time is very good.

»
13 months ago, hide # |
 
Vote: I like it -12 Vote: I do not like it

Hope this round won't be as bad as the last one...

»
13 months ago, hide # |
 
Vote: I like it -17 Vote: I do not like it

qp

»
13 months ago, hide # |
 
Vote: I like it +7 Vote: I do not like it

Bro I cannot solve problem D.

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

    I guess we can build answer recursively...

  • »
    »
    13 months ago, hide # ^ |
     
    Vote: I like it +2 Vote: I do not like it

    You can build the solution from the last step to first step.

    You can start with [k], before that you can have [k/2,k-k/2], before that, you can have [(k/2)/2,(k/2)-(k/2)/2,(k-k/2)/2,(k-k/2)-(k-k/2)/2] and so on...

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

Today's problems after C were better than yesterday's ARC imo. Especially; the problem F >>

I guess they have swapped ARC and ABC :))

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

Has anybody solved using divide and conquer for E?? If successful, please share it.

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

The solution of C is always surprisingly short.

»
13 months ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

Is there any particular way to solve problem E without using RNG?

»
13 months ago, hide # |
Rev. 4  
Vote: I like it 0 Vote: I do not like it

why this giving error , this problems like c are so bad just one line code if someone guess 10 sec to solve if someone not no matter what he do always wrong i first utilise the b then simply take contri of a and c , any case you think about ??


void solve() { // executing code from here int t;cin>>t; while (t--) { int a,b,c;cin>>a>>b>>c; int ans=0; ans=min({a,b,c}); a-=ans;c-=ans; // dbg(a);dbg(b); if(a>c){ // dbg(min(c,a/2)); ans+=min(c,a/2); }else{ ans+=min(c/2,a); } cout<<ans<<endl; } }
  • »
    »
    13 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    3 0 3 ans should be 2 (AAC + ACC)

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

      Can you please explain me the solution for the problem E as in editorial they are mentioning the randomized approach but i didn't hear that , and one more thing that my approach to make a map of slope and y_intercept and then i will who are having the freq>n+1/2 then thay our answer but for that complexity will go upto n^2 and not allowed can you please help

      • »
        »
        »
        »
        12 months ago, hide # ^ |
        Rev. 3  
        Vote: I like it 0 Vote: I do not like it

        Let's assume that there exist n/2 points that are on the same line (if not then the answer is NO and it's fine)

        Then if you pick 2 random points from our set, there is a $$$(1/2)*(1/2)=1/4$$$ chance that both points that we picked are on that line.

        So we just pick 2 random points, and check how many points are on the same line as these two. (That's easy to o in $$$O(n)$$$)

        And we repeat this process multiple times to achieve good enough probability of success

        For example if we pick 2 random points 100 times, the chance that we won't find such line is $$$(3/4)^{100}$$$ which is almost 0%. So if we didn't find such line after 100 iterations, then we can say the answer is NO

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

Why problem F couldn't be solved with Dijkstra?

Submission
»
13 months ago, hide # |
Rev. 2  
Vote: I like it +6 Vote: I do not like it

Can anyone prove my solution for F? I claim that every vertex only have $$$m$$$ pairs of (current weight, fuel used) being useful , but I can't prove it.

my solution

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

all nice problem!!! althought I just solve 3,but solve the rest problem with Editorial help me learn a lot!!:)

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

    True. Contests with nice problems back to back.

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

      Can you please explain me the solution for the problem E as in editorial they are mentioning the randomized approach but i didn't hear that , and one more thing that my approach to make a map of slope and y_intercept and then i will who are having the freq>n+1/2 then thay our answer but for that complexity will go upto n^2 and not allowed can you please help

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

Is it fair to have random in E? The same solution can be judged differently just by random.

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

    Nope. Using a fixed seed can avoid this problem. Also, the error rate is significantly low, so it almost doesn't matter.

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

For problem D, first fill vector by $$$\frac{k}{2^n}$$$. Then keep incrementing numbers in even position by 1 alternating between left and right, continue till you have n%{2^k} remaining. If there is still some left then do the same for odd position. The imbalance will always be 1 when there is remainder other than 0.

Why this solution is incorrect??

  • »
    »
    13 months ago, hide # ^ |
     
    Vote: I like it +4 Vote: I do not like it

    The checker for question D has a major issue.

    When $$$X=0$$$,I output 0 0 0 0......0

    When $$$X\neq 0$$$,I output 1 0 0......0

    But it is accepted!!!

    So checker doesn't consider $$$sum=K$$$!!!

»
13 months ago, hide # |
 
Vote: I like it +28 Vote: I do not like it

problem D spj maybe wrong? Without considering K.

https://atcoder.jp/contests/abc422/submissions/69146833

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

There is a discuss of D's checker was wrong :Portal