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

Автор atcoder_official, история, 13 месяцев назад, По-английски

We will hold AtCoder Beginner Contest 422.

We are looking forward to your participation!

  • Проголосовать: нравится
  • +20
  • Проголосовать: не нравится

»
13 месяцев назад, скрыть # |
 
Проголосовать: нравится -17 Проголосовать: не нравится

This new start time is very good.

»
13 месяцев назад, скрыть # |
 
Проголосовать: нравится -12 Проголосовать: не нравится

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

»
13 месяцев назад, скрыть # |
 
Проголосовать: нравится -17 Проголосовать: не нравится

qp

»
13 месяцев назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

Bro I cannot solve problem D.

»
13 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
13 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

The solution of C is always surprisingly short.

»
13 месяцев назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

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

»
13 месяцев назад, скрыть # |
Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

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

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

      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 месяцев назад, скрыть # ^ |
        Rev. 3  
        Проголосовать: нравится 0 Проголосовать: не нравится

        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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why problem F couldn't be solved with Dijkstra?

Submission
»
13 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится +6 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
13 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
13 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится +4 Проголосовать: не нравится

    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 месяцев назад, скрыть # |
 
Проголосовать: нравится +28 Проголосовать: не нравится

problem D spj maybe wrong? Without considering K.

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

»
13 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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