Блог пользователя the.wiz

Автор the.wiz, история, 20 месяцев назад, По-английски

Can you please give a counter-example to find the error in my approach??? (I guess there is an overflow -_-) Problem:- https://codeforces.com/problemset/problem/1594/C My approach:- https://codeforces.com/contest/1594/submission/170945137

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

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

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

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

The correct approach is simpler. (My proof might scare you, though, because I made it rigorously.) Case 1 (you found this one): all characters are equal to c. Then no operations are needed. Case 2: Not all characters are equal to c. Then we have further subcases:

The subcases