Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

mahim007's blog

By mahim007, history, 11 years ago, In English

problem:link my submission:link

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

| Write comment?
»
11 years ago, hide # |
← Rev. 2  
Vote: I like it +8 Vote: I do not like it

Your code would not work one this input (your code prints 4, the answer is 5):

3
a
bb
ccc

Try to figure out why. This is a shorter counter example than the one in test 23, so you can think about it.

Edit: I changed the test case