625 - Compression

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

Moderator: Board moderators

Post Reply
howardcheng
Learning poster
Posts: 71
Joined: Thu Aug 21, 2003 1:56 am

625 - Compression

Post by howardcheng »

Are there any tricky cases in this problem? It seems simple but I am getting wrong answers. (I am using isalnum() to test for identifiers.)
DGN
New poster
Posts: 4
Joined: Mon May 03, 2004 10:29 pm
Location: Barcelona

Post by DGN »

The identifiers of this problem are case-sensitive?

I think that my program covers all possible cases that I can deduce from the text.

Are there any tricky cases in this problem?

Can post anyone some in / out examples?

Thanks in advance :)
I've seen things you people wouldn't believe.
Attack ships on fire off the shoulder of Orion.
I watched C-beams glitter in the dark near the Tannh
howardcheng
Learning poster
Posts: 71
Joined: Thu Aug 21, 2003 1:56 am

Post by howardcheng »

Stupid me...I jumped into the description and forgot that it was a multiple input problem. I changed that and my program was accepted.
DGN
New poster
Posts: 4
Joined: Mon May 03, 2004 10:29 pm
Location: Barcelona

Post by DGN »

Thanks howard,

But my program continues with WA :(

In multiple input I need to clean the identifier table when find a 'end.'?
Identifiers are case-sensitive? IDENT2 <> ident2 <> Ident2
Shorter than 3 is: <=3 or <3?

I send all of this combinations and get in all of them WA. Any ideas? :oops:

Thanks
I've seen things you people wouldn't believe.
Attack ships on fire off the shoulder of Orion.
I watched C-beams glitter in the dark near the Tannh
howardcheng
Learning poster
Posts: 71
Joined: Thu Aug 21, 2003 1:56 am

Post by howardcheng »

In my solution:

- I start with a dictionary for every program (after end.)
- I skip tokens of length < 3
- I treat the tokens as case-sensitive
DGN
New poster
Posts: 4
Joined: Mon May 03, 2004 10:29 pm
Location: Barcelona

Post by DGN »

I think that my program suport the same cases, but I've get WA again :(
It's a simple program but I don't know because not solve the problem.


[cpp]/*
Code removed. :(

After a few changes (program reestructuration) it was be accepted.
*/
[/cpp]
Last edited by DGN on Wed May 12, 2004 8:41 am, edited 1 time in total.
DGN
New poster
Posts: 4
Joined: Mon May 03, 2004 10:29 pm
Location: Barcelona

Post by DGN »

I detected a few more problems in the program.

1) This is my first multiple input problem and I show the number of cases in the output. Stupid mistake. (thanks Oriol)

2) I reset de dictionary table if I found the 'end.' substring, but I only do that if it is in the beginning of line.

3) Processing the standard input only for the number of programs indicated by the multiple input first line (ignore the rest of end lines).

Many thanks for your help, Howard.
rulio
New poster
Posts: 4
Joined: Sun Oct 12, 2003 4:20 am

Need help on pb 625

Post by rulio »

I always get wrong answer for this problem.. I read the problem a thousand times, and can t see what I am doing wrong.
I might have mis interpreted something, but there aren t much hypothesis and I took into accound some specific points discussed in previous replies...

I would be very interested in any sample inputs/ outputs,

Thanx
rulio
New poster
Posts: 4
Joined: Sun Oct 12, 2003 4:20 am

Found solution

Post by rulio »

I finally got accepted... Stupid problem with ASCII table.. I forgot there were non alphanumerics caracters between "Z" and "a";)

FOr others with difficulties here : Use your code as input, it helped me a lot.
Post Reply

Return to “Volume 6 (600-699)”