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 1542. Autocompletion

If you've got WA #11
Posted by Pavel Khaustov [Tomsk PU] 26 Aug 2009 00:16
If you've got WA #11 then your program deals bad with repeatative queries.

Try this test:
--------------------
2
acm 10000
acmicpc 10000
2
ac
ac
---------------------
Correct answer is:
---------------------
acm
acmicpc

acm
acmicpc
---------------------
Re: If you've got WA #11
Posted by gautamvs 16 Dec 2012 16:28
this code works fine for above input but still gives wa#11
Re: If you've got WA #11
Posted by Gukoff 4 Aug 2013 19:17
I believe, this will help you

18
a 10
ba 0
bb 1
bc 1
bd 1
be 1
bf 1
bg 1
bh 1
bi 1
bj 1
bk 1
bl 1
bm 1
bn 1
bo 1
bp 1
bq 1
1
b
Re: If you've got WA #11
Posted by Ionkin M [Samara SAU #617] 30 Jun 2018 19:16
ba can't be with zero frequency: 1 ≤ n_i ≤ 106