1261 - String Popping

All about problems in Volume 12. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
mathgirl
New poster
Posts: 36
Joined: Tue Apr 24, 2012 6:20 pm

1261 - String Popping

Post by mathgirl » Sat Apr 28, 2012 3:50 pm

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 
Last edited by mathgirl on Sat Apr 28, 2012 10:03 pm, edited 1 time in total.

mathgirl
New poster
Posts: 36
Joined: Tue Apr 24, 2012 6:20 pm

Re: 1261 string popping WA

Post by mathgirl » Sat Apr 28, 2012 10:03 pm

Never mind. The problem was with a newline character. I dint insert a newline at the end.

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 1261 string popping WA

Post by brianfry713 » Thu Jul 17, 2014 11:12 pm

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
Check input and AC output for thousands of problems on uDebug!

damien_g
New poster
Posts: 8
Joined: Sun Oct 05, 2014 5:53 pm

Re: 1261 - String Popping

Post by damien_g » Sun Jan 04, 2015 1:54 pm

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 :)

Post Reply

Return to “Volume 12 (1200-1299)”