Page 1 of 3

11062 - Andy's Second Dictionary

Posted: Sun Aug 06, 2006 9:53 am
by jan_holmes
What is the output of :
Adv- enture- s
of
disney-154323 land
in Ja-
pan."-

".
Thx... :)

Posted: Sun Aug 06, 2006 10:28 am
by StatujaLeha
my accepted program produces
adventures
disney
in
japan
land
of

Posted: Sun Aug 06, 2006 10:53 am
by jan_holmes
Thx StatujaLeha... I'll try to fix my program now... :D

Posted: Sun Aug 06, 2006 11:26 am
by little joey
StatujaLeha wrote:my accepted program produces
adventures
disney
in
japan
land
of
Well, if your accepted program produces that output, then the judges' input is too weak, because the correct output is

Code: Select all

adv-
disney-
enture-
in
japan
land
of
s
From the problem statement:
The hyphen character is part of the word if, and only if, not followed by a newline.

Posted: Sun Aug 06, 2006 3:49 pm
by sohel
Indeed, the judge's data is too weak.

My program outputs.

Code: Select all

adv
disney
enture
in
japan
land
of
s
During the contest, i assumed if a word is hyphenated and is not followed by another alphabet, then that hyphen isn't part of the word.

But looking at Little Joey's post, I guess i was wrong... :D

Good that the judge data was shallow... :wink:
otherwise it would have taken more than 1 submission to get AC.

Posted: Mon Aug 07, 2006 10:30 pm
by mute
My code outputs

Code: Select all

adv-
disney-
enture-
in
japan
land
of
s 
I am confused??
:-? :roll:
If the input is what will be the output

Code: Select all

disney-
-enture-
- in
   japan
land
of
and if any one can plz send any input than I can test

Posted: Tue Aug 08, 2006 5:46 am
by Martin Macko
mute wrote:My code outputs

Code: Select all

adv-
disney-
enture-
in
japan
land
of
s 
I am confused??
Yes, this the most correct output. Read little joey's post.
mute wrote: :-? :roll:
If the input is what will be the output

Code: Select all

disney-
-enture-
- in
   japan
land
of
The correct output is:

Code: Select all

disney-enture-
in
japan
land
of
mute wrote:and if any one can plz send any input than I can test
Try this one:

Code: Select all

A-
--
-

B--
--

C--
 --
--
My output is as follows:

Code: Select all

--
a-
b--
c-

Posted: Tue Aug 08, 2006 3:12 pm
by mute
Thnx Martin

Code: Select all

adv
-disney-
enture-
in
-japan
land
of
s
For this Input my code generate

Code: Select all

advdisneyentureinjapan
land
of
s
is it correct?

Posted: Tue Aug 08, 2006 4:18 pm
by Martin Macko
mute wrote:Thnx Martin

Code: Select all

adv
-disney-
enture-
in
-japan
land
of
s
According to the problem statement the correct output is as follows:

Code: Select all

-disneyenturein
-japan
adv
land
of
s
As
Problem statement wrote:The hyphen character is part of the word if, and only if, not followed by a newline.

Posted: Wed Aug 09, 2006 9:44 am
by mute
Thanks Martin,
When a word is hyphenated, its prefix initiates on a line, followed by hyphen character, maybe followed by a newline, followed by the rest of the word. The rest of the word may be itself hyphenated.
I actually misunderstood red marked sentence

Thanks again

How to stop reading

Posted: Thu Aug 10, 2006 8:00 pm
by willima
Why this code below makes TLE??

while ( !cin.eof() )
{
//...my code...
}

Bye bye,
Willian

Mistake founded!

Posted: Thu Aug 10, 2006 9:26 pm
by willima
Plesar, don't take in account my last post, because I've already founded my mistake: inside the loop, there was a command cin.getline( atual, MAXL ); And MAXL didn't have size enough to get the EOF sinal in the last line :oops:

So, that was what was going wrong, and I fixed it and got AC.

Goodbye everybody!!!

Posted: Fri Aug 11, 2006 1:13 am
by cytmike
Can anybody post some more test cases? I get above ones correct but still WA. :evil:

Here's my code if you want to take a look.

Code: Select all

AC
:D

More case tests

Posted: Fri Aug 11, 2006 1:21 am
by willima
Here are more 1 case test:

Input:

Adv-
ent-
ures
in
Dis-
ney-
land

Two blondes were go-
ing to Disney-land
when they came to a
fork in the road.
The sign read: "Dis-
neyland Left."

So they went home.

This is takin' so so so, lo-
ng!!!!!!!!
Why??????


What is t-
hat little-guy!!!

will-lima@pop.com.br

pe-
er-2-peer!!

I have a 22 years oLd GUY insIde me at tHIs moment!!!

Andy is now 9-
year old and is getting ambitious.

Sub-
concious mind. Dre-
am-Theater-Scenes!

tes-
-1


Ouput by my AC code:

a
adventures
ambitious
and
andy
at
blondes
br
came
com
disney-land
disneyland
dream-theater-scenes
fork
getting
going
guy
have
home
i
in
inside
is
left
little-guy
long
me
mind
moment
now
old
peer-
pop
read
road
sign
so
subconcious
takin
that
the
they
this
to
two
went
were
what
when
why
will-lima
year
years


See ya!

Re: More case tests

Posted: Fri Aug 11, 2006 8:35 am
by Martin Macko
willima wrote:Here are more 1 case test:
In addition to your output my AC wrote two words more:
-peer
a
adventures
ambitious
and
andy
at
blondes
br
came
com
disney-land
disneyland
dream-theater-scenes
fork
getting
going
guy
have
home
i
in
inside
is
left
little-guy
long
me
mind
moment
now
old
peer-
pop
read
road
sign
so
subconcious
takin
tes-
that
the
they
this
to
two
went
were
what
when
why
will-lima
year
years
The word "-peer" is there from:
...
pe-
er-2-peer!!
...
and the word "tes-" is there from:
...
tes-
-1