Codeforces and Polygon may be unavailable from December 6, 19:00 (UTC) to December 6, 21:00 (UTC) due to technical maintenance. ×

VLamarca's blog

By VLamarca, history, 7 years ago, In English

I was getting WA on this problem, but after I suspect that the problem's statement might be wrong, I got AC with this code.

In a phrase of the problem statement it is said: "The state of objects that do not have any nested objects will be '-'.". From this I understood that when k = 0, s would necessarly be '-', but I then submitted this code, identical to the AC one, with one exception: if s = '+' and k = 0, then it would give TLE, which indeed happend but shouldn't.

Did I misinterpeted the statement or is the problem indeed wrong? In the latter case I will try to contact the author.

Thanks a lot in advance!

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

»
7 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Indeed, the tests contain both + 0 and - 0 lines, while the statement suggests that only - 0 is possible.

»
7 years ago, # |
  Vote: I like it +3 Vote: I do not like it

The invalid cases were fixed, I'm sorry for that and thank you for reporting the issue.