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

Some inputs don't have solutions
Posted by Boris Bukh 21 Sep 2001 09:35
There are is no solution for the following input:
4
0011
The sum of positions of 1's in this word is 7. If we change
any one of 1's to 0, we won't get multiple of 5(=4+1).
You 've just misunderstood
Posted by Marat Bakirov 21 Sep 2001 17:00
1) The source word  HAS the property "the sum of positions
where symbols 1 are located is a multiple of (N+1) or equal
to zero.
"

2) your are given the word that ALWAYS have it's source

3) So your input is impossible.