Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

C. Good String 
Difference between en1 and en2, changed 85 character(s)
In the problem good string([https://codeforces.com/problemset/problem/1389/C]) I made two observations- ↵
i. When n is odd then all characters are equal ↵
ii. Else s1 = s3 = ... = sn ↵
         s2 = s4 = ... = sn-1
1.  When n is odd then all characters are equal ↵
~~~~~↵
2. Else ↵

`  s1 = s3 = ... = sn`↵
~~~~~↵


`  s2 = s4 = ... = sn-1`↵
~~~~~↵


It means the string is fixed by the first two starting characters. I iterated from 0 to 9 for the first two characters and found the count of positions-↵

~~~~~↵
if i is odd and si != s1 or↵
~~~~~↵

   i is even and si != s2↵
~~~~~↵



My answer is off by one in some test cases. I want to a small test string where I could find the reason.↵


History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English willtryagain 2020-08-02 15:32:27 85 Tiny change: '!= s1 or\n- i i' -> '!= s1 or\n~~~~~\n\n- i i'
en1 English willtryagain 2020-08-02 15:28:45 555 Initial revision (published)