490 - Rotating Sentences

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

Moderator: Board moderators

Wei
New poster
Posts: 23
Joined: Sat Jul 24, 2004 5:37 pm
Contact:

Post by Wei » Sun Oct 31, 2004 12:10 pm

Well~~Thx a lot~!
I got an AC~~~

User avatar
Sedefcho
A great helper
Posts: 374
Joined: Sun Jan 16, 2005 10:18 pm
Location: Bulgaria

Post by Sedefcho » Fri Feb 25, 2005 11:37 pm

For anyone who may need some sample IO on
problem 490 including you, Snake.

See below. Hope this IO will be useful.

Please note several things:

( 1 ) The input contains no spaces at all

( 2 ) The stars ( * ) in the output represent spaces.
Pay attention to the fact that I print just as much
stars as needed. For example see the last two
"columns" in the output. They contain no spaces
because there's no longer "column" after them.

( 3 ) I am not sure that printing just as much spaces as
needed ( 2 ) is really required by the Judge. Still,
I have made my program so that it takes
care of that, just in case.


INPUT

Code: Select all

xxx
yyyyyyyyyyy
zzzzzzzz
aaaaaaaaaaaaa
bbbb
ccccccccc
ddddddddddddddddddddd
zzzzzzzzzzzz
fffffffffffffffff
uuuuuuuuuuuuuu
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
mmmmmmmmmmmmmmmmmmm
OUTPUT

Code: Select all

maufzdcbazyx
maufzdcbazyx
maufzdcbazyx
maufzdcbazy
maufzdc*azy
maufzdc*azy
maufzdc*azy
maufzdc*azy
maufzdc*a*y
maufzd**a*y
maufzd**a*y
maufzd**a
mauf*d**a
mauf*d
ma*f*d
ma*f*d
ma*f*d
ma***d
ma***d
*a***d
*a***d
*a
*a
*a
*a
*a
*a
*a
*a
*a
Good luck to everyone!

User avatar
Sedefcho
A great helper
Posts: 374
Joined: Sun Jan 16, 2005 10:18 pm
Location: Bulgaria

Post by Sedefcho » Fri Feb 25, 2005 11:43 pm


Note:

There's NO empty FIRST line in both INPUT and OUTPUT
I've given above.

All the lines in INPUT contain only lowercase latin
letters and the newline character.


Salman
New poster
Posts: 25
Joined: Thu Jun 26, 2003 9:45 am

Rotating sentence

Post by Salman » Sun Jun 12, 2005 8:39 am

Getting WA ??
why??
How to handle TAB??
Where is the catch?

User avatar
emotional blind
A great helper
Posts: 383
Joined: Mon Oct 18, 2004 8:25 am
Location: Bangladesh
Contact:

Post by emotional blind » Tue Jun 14, 2005 12:08 pm

Code: Select all

(NOTE: Tabs are not legal characters.) 
so you should not handle TAB
you can solve it using tow array.
very easy problem
hope your success
keep posting

mamun
A great helper
Posts: 286
Joined: Mon Oct 03, 2005 1:54 pm
Location: Bangladesh
Contact:

490 - Rotating Sentences

Post by mamun » Mon Oct 03, 2005 2:03 pm

After reading some posts on 490:WA I decide to post my code as I'm getting WA, don't know for what.

Code: Select all

DELETED
Will be thankful to recieve a help.
Last edited by mamun on Tue Oct 04, 2005 9:28 pm, edited 1 time in total.

SRX
Learning poster
Posts: 63
Joined: Sat May 14, 2005 8:13 am
Location: Taiwan

Re: 490 : why WA with this simple looking problem?

Post by SRX » Mon Oct 03, 2005 2:27 pm

please change to

Code: Select all

            if ( sen[k][j] ) putchar(...)  ;
           
我是測試的八個字

mamun
A great helper
Posts: 286
Joined: Mon Oct 03, 2005 1:54 pm
Location: Bangladesh
Contact:

Post by mamun » Tue Oct 04, 2005 7:06 pm

Thanx!!! :-?

Schutzstaffel
New poster
Posts: 37
Joined: Fri Apr 30, 2004 6:52 pm
Location: Portugal

Post by Schutzstaffel » Mon Jan 09, 2006 5:23 am

I read all posts concerning the problema 490 and after trying every input posted and getting the same outputs I still get WA, I think it might be some presentation error or maybe I missed some case :-?
Anyway could anyone post some critical inputs or check my code?

Code: Select all

 code AC :P
Thanks in advance.
Last edited by Schutzstaffel on Tue Jan 10, 2006 3:23 pm, edited 1 time in total.
Image

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Post by Jan » Mon Jan 09, 2006 5:25 pm

Check the I/O set. Your code returns wrong..

Input:

Code: Select all

"R  Jan
Ie
 n
te
h 
iD
ne
kc
,a
 r
tt
he
es
r
eo
fn
oc
re
e
 s
Ia
 i
ad
m,
.
"
Output:

Code: Select all

".ma I erofereht ,kniht I"
  ,dias ecno setraceD eneR


                         J
                         a
                         n
Hope it works.
Ami ekhono shopno dekhi...
HomePage

Schutzstaffel
New poster
Posts: 37
Joined: Fri Apr 30, 2004 6:52 pm
Location: Portugal

Post by Schutzstaffel » Tue Jan 10, 2006 3:22 pm

Thanks a lot, that input/output was really helpful :P
Got AC.
Image

abhi
Learning poster
Posts: 94
Joined: Fri Nov 25, 2005 7:29 pm

Post by abhi » Wed Jan 18, 2006 2:32 pm

here is the edited code.....
Last edited by abhi on Wed Jan 18, 2006 6:59 pm, edited 2 times in total.

mamun
A great helper
Posts: 286
Joined: Mon Oct 03, 2005 1:54 pm
Location: Bangladesh
Contact:

Post by mamun » Wed Jan 18, 2006 2:45 pm

This is what I get with your code for the sample input in the question.

abhi
Learning poster
Posts: 94
Joined: Fri Nov 25, 2005 7:29 pm

Post by abhi » Wed Jan 18, 2006 2:49 pm

here is the edited code.....
Last edited by abhi on Wed Jan 18, 2006 7:00 pm, edited 1 time in total.

mamun
A great helper
Posts: 286
Joined: Mon Oct 03, 2005 1:54 pm
Location: Bangladesh
Contact:

Post by mamun » Wed Jan 18, 2006 3:13 pm

Your method for finding maximum column isn't correct.
Look at this input

Code: Select all

123
12345
1234567
123
12345
What should be the output?

Post Reply

Return to “Volume 4 (400-499)”