ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1007. Code Words

1101
Both 1111 and 1001 is right.
But what's the "correct answer" ?
Who got Ac ? Tell me...
1111 is not correct
for input 1101

Edited by author 10.06.2008 16:09
I think  that it must be correct answer too.
In the problem there are words " one of the following modifications to a word may occur",I think it hope to means
that the following three modification one and only one must
occur.So ,1111 is a correct answer!because none of the three
modifications occur.
Husan wrote 18 August 2008 23:49
I think  that it must be correct answer too.
  The number is interesting.If the first number is 1,the last one must equal to 1;and the ...
  Be breaf,OK;
  char *a=new char[n];
  int the a[n],a[1] must equal to a[n-1]
               a[2] must equal to a[n-2]
                ...
   so if 1101,you can't decide wheather a[1] is changed(then answer is 1001) or a[2] is changed(then answer is 1111) .
  In this case 0001 also has two origner number 0000 or 1001
  .....
in my AC prog, the sequence is right to left

therefor in 1101 the order is: first digit is 1 and second is 0 ,...
1111 was not correct, because you can only change '1' to '0', can not change'0' to 1.(as the problem description said, maybe a '0' was replaced by '1').
So the Only Correct answer is 1001.