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

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

94665721

B

94680223

C

94711408

D

94748833

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

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

I have tried writing editorial for A to D problems as official version is not out yet. Hope it helps someone.

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

Auto comment: topic has been updated by AM_I_Learning (previous revision, new revision, compare).

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

Can you explain the ceil part for A again. How do you ensure that D doesn't connect beyond C?

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

guys cant we simply do a+b+c-1.although i loved authors approach.it is an overkill for first problem.

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

nice explanation

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

agp

I kept trying this formula for AGP to calculate S2, but got no luck. Was constantly getting wrong answer.

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

For Problem A I just printed the maximum element of input array as the quadrilateral inequality will always hold for this configuration 94661820

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

Someone please help me in problem B, I have tried the same approach that the author said for the problem i.e , I considered all the 4 values :- mat[i][j],mat[i][m-1-j],mat[n-1-i][j],mat[n-1-i][m-1-j] and tried to make them equal by taking their average and changing every value to the avg. value but somehow ans is not coming right.

How can you prove that given 4 values to make them all equal , we have to change them into one of the values among them and not into their avg ?

My code's link is :- https://codeforces.me/contest/1422/submission/94722871 please help me .

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

You can try formatting the equations in your editorial

Thanks anyways.

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

Auto comment: topic has been updated by AM_I_Learning (previous revision, new revision, compare).

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

Do you mean O(mlogm) i guess in the editorial of Problem D , cause just seen you swap n & m in the code :)

»
6 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

Please,Can someone please tell me where did I go wrong in this solution for C?? I am taking left and right contribution of every digit but it just isn't working.For right contribution I computed the sum of AGP.

UPD: Ignore this comment.

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

What does AGP mean?

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

Can someone explain how the final answer for C is S2+S1? Why isn't it S*S1?

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

in problem B,can't I do binary search to find the optimal value for the 4 values a[i][j],a[i][m-j-1],a[n-i-1][j],a[n-i-1][m-j-1]?

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

"Teleport to Destination edges :- Similarly from each teleportation point (x,y) the edge weight to reach destination D(x2,y2) is abs(x-x2)+abs(y-y2)."

Here you are considering weight from destination to the teleportation point, why not to consider from teleportation point to the destination?, although intuitively it looks correct to add the edge in the way you added here but I am not able to get the proof why we are considering the former one!

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

I think in D we don't even need to connect edges from source to each and every teleport since according to analysis 4(edges between transport to transport) we can just connect edges from source to 2 nearest row-wise and 2 nearest column wise teleports and rest all will be handled by the sort function in the same way, won't it be working? AM_I_Learning, I haven't tried proving from the destination point of view, but I think it might be the same as well, if the former one is true!