Блог пользователя avi007.aps

Автор avi007.aps, история, 11 лет назад, По-английски

This is link to my solution http://mirror.codeforces.com/contest/554/submission/11743299 When i am running on my compiler i am getting right answer i.e 2 but it is showing 3 on codeforce.

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

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

I'm not too familiar with C++ syntax, but I would guess than the line: cin>>x; reads in a whole line since there are no white spaces, thus storing all n lines in the first vector (so all the other three are empty and therefore equal). When you did it on your compiler did you separate the 1's and 0's by white spaces?

»
11 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

Cin reads long long without trailing zeros. Change X to char. ACCEPTED

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

You are reading integers of type long long with cin >> x,but in input you have N binary strings.