10941 - Words adjustment

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

Moderator: Board moderators

Experienced poster
Posts: 143
Joined: Sat Dec 21, 2002 11:41 am
Location: Indonesia

Post by angga888 »

mf wrote:And I'd like to ask, are there empty lines in the input? I use scanf(" %s",...) to read words, could this be a problem?
From the problem description:
All words use only lowercase letters and contain between 1 and 1000 characters.
I think empty string should not be possible. Besides, I also used scanf("%s",...) and got AC.

Hope it helps :wink:

Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland

Post by mf »

Thanks to all. I've found a bug in my program, and got AC.
In case anybody needs test cases, I've posted some at http://www.algorithmist.com/index.php/UVa_10941_Tests

Experienced poster
Posts: 163
Joined: Sun Oct 17, 2004 8:31 pm
Location: Murcia, Spain

Post by Emilio »

Hi there!
Only one thing. The problem specification says that the maximum size of the input is 1000, well, I was getting WA until I changed the size of my arrays to 2005 for k and for the words size.
Only that!

See you!

New poster
Posts: 22
Joined: Thu Apr 28, 2005 10:56 pm

Post by Tamagodzi »

Experienced poster
Posts: 160
Joined: Wed Jul 30, 2003 8:10 pm

Post by shanto86 »

i know BFS will get AC. but as polone said it is not fair, what is the pther way?
Self judging is the best judging!

Post Reply

Return to “Volume 109 (10900-10999)”