24

Codeforces Round #786 (Div. 3) Editorial

 1 year ago
source link: https://codeforces.com/blog/entry/102482?f0a28=1
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
By vovuh, history, 2 days ago, translation, In English

1674A - Number Transformation

Idea: BledDest

Tutorial
Solution (BledDest)

1674B - Dictionary

Idea: BledDest

Tutorial
Solution (BledDest)

1674C - Infinite Replacement

Idea: BledDest

Tutorial
Solution (awoo)

1674D - A-B-C Sort

Idea: BledDest

Tutorial
Solution (adedalic)

1674E - Breaking the Wall

Idea: BledDest

Tutorial
Solution (fcspartakm)

1674F - Desktop Rearrangement

Idea: vovuh

Tutorial
Solution (vovuh)

1674G - Remove Directed Edges

Idea: BledDest

Tutorial
Solution (awoo)

2 days ago, # |

Thank you codeforces for this Round, Good to see many Div-3, and the standard of questions was perfect for the level of div-3

2 days ago, # |

In problem E, in the second case (where two sections have exactly one section between them), how is the the number of shots required to break these two sections coming as ceil(Ai + Ai+2)/2?

  • 47 hours ago, # ^ |

    such as A,X,B,if A>B,we can shoot X for B times,then shoot A for ceil((A-B)/2) times,and vice versa.You can find the result IS ceil(Ai + Ai+2)/2.

45 hours ago, # |

Rev. 3  

-7

I think problem F will be done with Fenwick tree,too.

33 hours ago, # |

Rev. 2  

+3

For problem E: is there some binary search solution?

  • 32 hours ago, # ^ |

    You'd still have to take care of the 3 cases. But you can use binary search to solve for them. I used binary search for one of the cases.

    155757986

32 hours ago, # |

It's interesting how none of the first three problems required loop.

31 hour(s) ago, # |

How could problem E hacked so much!

30 hours ago, # |

Can anyone tell why I'm getting runtime error: Exit code is 2147483647 for submission: 155822852 I tried a lot but not understanding what's wrong.

    • 9 hours ago, # ^ |

      Thanks, but why does it not run as required?
      There something wrong at line 100 tree[node1].push_back(node2);. But I'm not able to understand why this is happening.

30 hours ago, # |

Rev. 5  

0

After the contest, I successfully hacked most people with this example

3
3 3453 5

29 hours ago, # |

In problem D, why does the parity of n determine i

  • 62 minutes ago, # ^ |

    n is length of the array "a", so if length of array "a" is even, you start checking adjacent elements from index 0, else if it's odd you start checking adjacent elements from index 1. This is because if you observe, if length is odd, then after all the operation the first element of "a" will remain at first position at "c".

    • 37 minutes ago, # ^ |

      !Thanks I get it!!!

24 hours ago, # |

If you prefer command line, checkout CF Doctor for more flexibility and faster feedback.

If you are/were getting a WA/RE verdict on problems from this contest, you can get the smallest possible counter example for your submission on cfstress.com. To do that, click on the relevant problem's link below, add your submission ID, and edit the table (or edit compressed parameters) to increase/decrease the constraints.

If you are not able to find a counter example even after changing the parameters, reply to this thread (only till the next 7 days), with links to your submission and ticket(s).

22 hours ago, # |

Problem D is kinda sus


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK