Правка en1, от krandor305, 2021-05-08 02:50:05

Hello everyone can someone explain this to me:

In this problem https://codeforces.net/contest/1512/problem/C

I have to construct a palindrome with limited 0 and 1s

The problem doesn't state that if we have remaining a or b (remaining 0 or 1 to add) the solution must return -1

and also in the image I sent,there is one case(1) that allow a or b to be remaining (a>0 or b>0) in the end

My main queston is:How in the sixth case we should return -1 contrarly to the seventh case?

Теги palindrome, #constructive algorithms, difficult to understand

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский krandor305 2021-05-08 02:50:05 541 Initial revision (published)