Search found 44 matches

by danielrocha
Wed Sep 15, 2004 9:22 pm
Forum: Volume 101 (10100-10199)
Topic: 10100 - Longest Match
Replies: 95
Views: 23065

It should be...

INPUT:
what the hell
is going on

OUTPUT:
1. Length of longest match: 0

Daniel "Naz
by danielrocha
Mon Apr 19, 2004 9:09 pm
Forum: Volume 1 (100-199)
Topic: 162 - Beggar My Neighbour
Replies: 31
Views: 5903

Infine loops

I don't think you should really worry about that input. I ran it on my AC program and it also locked (circular loop). There were two inputs that I tried before getting the program accepted: H9 DA SA CK CQ C3 HT SQ H8 S7 ST H2 D2 S8 D8 C2 S2 S3 C7 H5 DJ S4 DQ DK D9 D3 D4 D7 SJ DT H6 S9 CT HK C8 C9 D6...
by danielrocha
Wed Feb 25, 2004 3:10 am
Forum: Algorithms
Topic: LIS, better then O(n^2)?
Replies: 16
Views: 12191

How is precalculation possible?

I'm sorry for the (apparently) stupid question, but how can anyone use precalculation on this problem? The best I could do was 6.4s :( (using hash, bfs).
I don't understand how that is possible.
by danielrocha
Tue Dec 16, 2003 1:04 pm
Forum: Volume 5 (500-599)
Topic: 568 - Just the Facts
Replies: 39
Views: 17378

You don't need to calculate the entire number!

Just to remind you guys that are trying to solve this problem: you don't need to calculate the entire number! It would be so big that it would not fit into any data type, and you don't need to implement "string array" or a "big int" class.. Since you only want the final digit, wh...
by danielrocha
Wed Nov 12, 2003 3:44 am
Forum: Volume 1 (100-199)
Topic: 144 - Student Grants
Replies: 21
Views: 4302

It's actually the other way

Just in case someone has this same doubts: the correct option is case B ! For example: if a student has $39 and has to receive $4, he gets $1, the next one gets $3 (the change, or $39+$4-$40) and the next one gets $5! The machine continues its work normally. I'll try to make myself more clear :D : l...
by danielrocha
Thu Sep 25, 2003 12:47 pm
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 57199

Could you please send your complete program?

Your recursive function appears to be ok. Could you please send your complete program? The problem may be elsewhere...
by danielrocha
Sun Sep 07, 2003 1:33 pm
Forum: Volume 100 (10000-10099)
Topic: 10044 - Erdos Numbers
Replies: 102
Views: 42270

Re: 10044 - erdos

I'm not sure if that is your problem, but I was getting Runtime Error because I was assuming that the first char of the author's name was always upper case. Apparently it can be upper, lower or can even be any other char... :o I'm still looking for some input/outputs that my program can't handle... ...
by danielrocha
Sat Sep 06, 2003 7:07 pm
Forum: Volume 100 (10000-10099)
Topic: 10044 - Erdos Numbers
Replies: 102
Views: 42270

Need some help (input/output)

I could really use some help with this problem, too. I'm using adjacent lists to find the Erdos Number, and ALL my ouput looks perfect, and yet I'm getting WA (got a lot of RE and TLE, but I'm past those)... Could somebody send some trick input/output? I'm already very desperate, cause my program se...
by danielrocha
Fri Sep 05, 2003 11:34 pm
Forum: Volume 102 (10200-10299)
Topic: 10205 - Stack 'em Up
Replies: 60
Views: 24688

Include stdio

The only problem in you code is that you forgot to include the "stdio" C library. All you've got to do is add this at the beginning of your code: [cpp]#include <cstdio> [/cpp] But it appears you have a presentation error.. Don't forget to include a blank line between two different outputs ...
by danielrocha
Tue Aug 26, 2003 2:35 am
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 57199

Little Advise

I got a lot (about 122933483) of WAs before getting AC in this problem. My advise for those who are going crazy is very simple: before freakin out with the "fill" function, make sure ALL the other functions (H, L, V, K) are correct. I kept receiving WAs, then read here in the board that th...
by danielrocha
Thu May 01, 2003 1:47 am
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 38490

Ok, thanks! Your tip didn't actually solve my problem (even with the modifications you said I'm still getting P.E.), but if the OJ tells me not to worry a lot...
I've heard that in real contests a P.E. is not considered an Accept. Is that true?

Thanks, greets from Brazil 8)

Daniel
by danielrocha
Tue Apr 29, 2003 3:24 am
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 38490

488 - Accepted but P.E.

Hello everyone, I've got accepted at problem 488 (yes, I know it's a multiple input problem), but the judge says "Presentation Error". Anyone with the same problem? Don't know what to do, I've tried pretty much everything... My code is below, thanks and greets from Brazil 8) Daniel [cpp] #...
by danielrocha
Sun Apr 27, 2003 1:11 pm
Forum: Volume 1 (100-199)
Topic: 103 - Stacking Boxes
Replies: 200
Views: 26097

Some input/output from my WA program

Some sample inputs/outputs from my program: INPUT 1 7 1 2 3 0 0 0 0 OUTPUT 1 1 INPUT 4 7 3 2 1 1 2 3 4 0 0 0 5 6 7 9 9 3 2 2 35 8 9 -1 -1 -1 -20 2 5 6 OUTPUT 3 4 2 3 INPUT (sample input, from the problem's page) 5 2 3 7 8 10 5 2 9 11 21 18 OUTPUT 5 3 1 2 4 5 INPUT (sample input, from the problem's p...
by danielrocha
Sun Apr 27, 2003 3:38 am
Forum: Volume 1 (100-199)
Topic: 103 - Stacking Boxes
Replies: 200
Views: 26097

103 - WA (i'm going crazy!) need test inputs!

Hello everyone, I'm needing some help with 103. I've tried EVERY test input I could find (and even made out a couple), the output is OK (always remembering: "If there is more than one longest nesting string then any one of them can be output. ") but the judge is giving me Wrong Answer. I'v...

Go to advanced search