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

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

Post by angga888 » Tue Oct 25, 2005 7:03 pm

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:

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

Post by mf » Wed Oct 26, 2005 12:02 am

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

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

Post by Emilio » Wed Nov 23, 2005 3:16 am

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!

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

Post by Tamagodzi » Wed Nov 23, 2005 4:33 am


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

Post by shanto86 » Mon Jun 26, 2006 3:01 am

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