Page 1 of 1

1261 - String Popping

Posted: Sat Apr 28, 2012 3:50 pm
by mathgirl
Can someone who got AC pls give me input to test. I tried with different inputs and my program works. But i got WA.

Code: Select all

  Code deleted after AC 

Re: 1261 string popping WA

Posted: Sat Apr 28, 2012 10:03 pm
by mathgirl
Never mind. The problem was with a newline character. I dint insert a newline at the end.

Re: 1261 string popping WA

Posted: Thu Jul 17, 2014 11:12 pm
by brianfry713
Input:

Code: Select all

100
abbbababaabbababbbaabbbbb
aabababababbb
aaaabaabb
ba
babbababaaaababbbbb
bbbababab
baaabaaabaaabaaaba
abbbabbaabaaaaab
bbaabaaaabbbbababb
aabbbbb
aaaabbab
aabbbaaabaaabbbbb
aabbabaaabaaabaaab
abbababbbaabaaaabaaba
aaa
aabbabaaaaabb
abaabaaaaaabaababaaabab
abaabbbbabbbaaaa
abaababbababaabaaabbba
bbbbbbbabbababa
bbbabaabaaaababaaabbbbba
ababbbaaabaabbbbaba
ababaaabbb
babaaababaabbaaa
baaabbbabb
aababaabbbba
abaaaaab
ababaaaaababbbbbaab
aaaab
ababaabbabbabbbaaabaaaa
ab
abaabaaaaabbabbbaa
abbab
abaaababaaaaabaaaabbbaab
aababaab
abaabaabaaa
bbaaabaababbabb
aababbbabbabaabbbab
bbaabbabbbabbbbaaabbab
abbbbbab
bbbabbaa
abbba
bbbabaabbbaabababbbbabbab
bbabbbaabbababbaaaabab
bbaaaaaabbabaab
bbabbbaabaabaabbbaabaab
babbaabbbbaba
baabbabaaa
aab
bbbbaab
bbaabbaaaaabbb
abbabbbbbaaaaaabbb
baabaaabbbaabbaa
bbbaabbabbbaaa
aaabaaaaaaab
abbabaabbbbaa
aabb
abaaaaaaabbbbbabaaabbba
abbab
bbbbbbbabbbbaaaaaaaabbbba
bbaa
bbbbaaaaaabbaabbabba
bbb
babbaaabbbaaaaaaabaaabab
a
ababababbbaba
babbabbbabbbba
b
abaabbababbbaaaaaabb
abbaba
ba
abaaababbaababbabbbaba
aabaaaaa
baaabbbbbaabbbbabbaaba
bb
babaaaabaaaabb
bababbbabbbababaabbaababa
bab
aaa
bbaa
babbbabbaaaaaaababaaaa
babaabaaaabaabbbbbabaa
babaabaaabbabab
abaababbbbbbb
baba
bbbbaaaababaababaaa
ababababaabbbaabaa
babbbaaabaaaaabbaabbbbba
bbaababaabbab
b
baabbbabbbaaabbaaaabab
aaabbb
b
ababaabbabaaabaab
aaabaaabababaaabaab
abaa
bbabbbbbbbbbbbbab
bb
abbb
bbbbbaabbbababaab
AC output:

Code: Select all

1
0
1
0
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
0
0
0
1
0
1
0
1
0
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
0
1
0
1
0
0
1
0
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
0
0

Re: 1261 - String Popping

Posted: Sun Jan 04, 2015 1:54 pm
by damien_g
That's a pretty cool problem, at the boundary between complete search and DP.

The problem statement is clear, but is it possible to fix the images on it ?
The PDF is readable but the html doesn't display the images and so it's impossible to see the example.

Also, it's a bit strange, but it seems that the judge is pretty slow with that problem, I got it AC in 0.135 but it took several minutes to get the judge feedback while people before and after me got feedback after a few seconds.
But maybe I'm just too impatient :wink:

Thanks :)