Page 1 of 4

11220 - Decoding the message.

Posted: Sun Jun 10, 2007 12:27 pm
by hamedv
what's wrong with my code?
please help me.

Code: Select all

GOT AC

Posted: Sun Jun 10, 2007 1:06 pm
by krijger
Try this:

Code: Select all

2

note the space after the last word of the next line
second line 

Posted: Sun Jun 10, 2007 5:32 pm
by hamedv
Thank, I got AC

Posted: Mon Jun 11, 2007 3:34 am
by asmaamagdi
My code is correct when there are spaces at the end of the line, but I'm still getting WA :(

Is there any other trick about it??!!
What if I entered 2 line feeds after the number of cases (or between 2 test cases)?
Should I print Case #: and 2 empty lines or should I wait for real data first??!!

Thnx in advance

Posted: Tue Jun 12, 2007 9:02 pm
by ayeshapakhi
probably there's no such things..

try this
input

Code: Select all

2

The first line of input gives the number of cases T  one
less than or equals to  T less than or equals to thirty
    then there is a blank line before the first test

case Each test case represents a message  which is composed
 by one less than or equals to  N  less than or equals to
 hundred  lines and each line is composed by one to thirty 
 words
output

Code: Select all

Case #1:
Tinusr
lhusly
thaer

Case #2:
caseege
bnsnls
hidhoy
w

Presentation Error in Java

Posted: Mon Jun 18, 2007 9:49 pm
by Jemerson
Presentation Error!!
If anyone can help me to find my mistake I'll appreciate it a lot and be very thankful.

Code: Select all

ACCed - Dumb Mistake. Thanks.

Posted: Tue Jun 19, 2007 12:50 am
by Darko
You have a space at the end of that "Case #..." line.

Posted: Mon Jun 25, 2007 4:07 am
by abdullah<cse du>
Hi,

This code segment gives run time error. Can some one please help me to locate my errors.

Code: Select all

Code removed
ABDULLAH

Posted: Mon Jun 25, 2007 4:32 am
by mf
Your code doesn't even pass the sample input/output.
It reads input in the wrong way.

sample output of AC

Posted: Mon Jul 02, 2007 2:13 pm
by adelar
Hi,
the sample output of AC is:

Code: Select all

Case #1:
How
are
you

Case #2:
Fine
and
you
                                            <--- \n
and don't:

Code: Select all

Case #1:
How
are
you

Case #2:
Fine
and
you

Posted: Tue Jul 17, 2007 2:37 pm
by abdullah<cse du>
Hi all,

Code: Select all

Remove after ac.
ABDULLAH.

11220

Posted: Tue Jul 17, 2007 3:37 pm
by linux

Code: Select all

Thanks for contribution! Got AC. :D 

Re: 11220

Posted: Wed Jul 18, 2007 12:09 am
by A1
linux wrote:Any idea? I'm getting frequent WA!!!!!!!!!!!!

Code: Select all

#include<stdio.h>
#include<ctype.h>

main() {
	int n,i,l,nw,pos;
	char c,t;

	scanf("%d",&n);
	getchar();
            getchar();// *
...............
...............
		if (i) putchar('\n');
		printf("Case #%d:\n",i+1); // * add newline char
..........................
.........................
}
* change/add the following two lines!!
>> Interesting code.. :-?

Posted: Tue Sep 18, 2007 5:16 pm
by lnr

Code: Select all

Changed

Posted: Wed Sep 19, 2007 6:24 am
by Jan
Read the description again...
each line is composed by 1 ≤ M ≤ 30 words. Two words in the same line are separated by one or more white spaces. A word is formed by the letters A-Z and a-z and has at most 30 letters
So, 30*30 = 900 letters and with some white spaces you have almost 1000 characters in a line. But you have only 109 characters. For safety take 2000 or more.

Hope it helps.