1_coder's blog

By 1_coder, history, 8 years ago, In English

this is the contest http://mirror.codeforces.com/contest/719 question no 2 can anyone tell me why i m failing 5th test case because i cant see that due to its large input plz help me guys thnxx.... hhttp://mirror.codeforces.com/contest/719/submission/20852280

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

| Write comment?
»
8 years ago, # |
  Vote: I like it +3 Vote: I do not like it

In the problem statement they say that you can swap any two cockroaches not only adjacent ones, this error must appear starting from the 4th test but since your second loop only deal with first n-1 cockroaches it made no errors in that test .