Search found 98 matches

by jpfarias
Sun Jun 15, 2003 9:07 pm
Forum: Volume 3 (300-399)
Topic: 361 - Cops and Robbers
Replies: 50
Views: 14378

It can be right, but you will never know until you get AC!

I'm really angry with the judge because of a problem, read my post on problem 329 and you will see why!

JP!
by jpfarias
Sun Jun 15, 2003 8:53 pm
Forum: Volume 3 (300-399)
Topic: 329 - PostScript Emulation
Replies: 6
Views: 2147

Problem output really is wrong...

Hi! I've talked with Carlos via email/MSN and we were almost done fixing the problem with the input/output of this problem. At first, he really agreeded that his solutions was wrong and proposed a correct solution for the problem, and convinced me that my solution was wrong. I was really frustated, ...
by jpfarias
Fri Jun 13, 2003 9:39 pm
Forum: Volume 3 (300-399)
Topic: 329 - PostScript Emulation
Replies: 6
Views: 2147

329 - PostScript Emulation

Hi! I'm thinking the input/output of problem 329 is wrong, cause there's just 2 accepted solutions, and my solution (with matrix) is getting WA, and it is ok for the original data set, from North American Regionals in 1993. Can anyone answer if it really is wrong? Is there a Valladolid administrator...
by jpfarias
Wed Jun 11, 2003 5:57 pm
Forum: Volume 102 (10200-10299)
Topic: 10213 - How Many Pieces of Land ?
Replies: 54
Views: 22636

I've found it!

Sorry, I've found it now!!! :oops:

My search was using the board search feature, on 10213, and it did not return that topic...

Looking page by page, I've found it, is there a bug in the search engine?

Again, sorry for my fault..

JP!
by jpfarias
Wed Jun 11, 2003 2:34 pm
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 51984

do the following: 1. read command (as a string) 2. switch on the first letter of command 3. process the command (with no error checking) 4. if command is not on the list of commands, ignore just the command, not the whole line... 5. done! Take care when printing also, print just m chars per line + t...
by jpfarias
Wed Jun 11, 2003 1:58 pm
Forum: Volume 102 (10200-10299)
Topic: 10213 - How Many Pieces of Land ?
Replies: 54
Views: 22636

And how do I get it?

Ok, it appears to be right!

But, how do I get to this formula?

Thanks!


PS: I searched the board and did not found any topic on this problem, can you tell me where it is?
by jpfarias
Wed Jun 11, 2003 3:06 am
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 51984

Solved

There's nothing special in the input.... To solve this problem, just read the command and assume it is ok, check the first char to see what to do and do what you need to do... Just take care the fill with same color. When filling, check if oldcolor == newcolor, if it's true, do nothing! I think I've...
by jpfarias
Wed Jun 11, 2003 2:03 am
Forum: Volume 102 (10200-10299)
Topic: 10213 - How Many Pieces of Land ?
Replies: 54
Views: 22636

10213 - How many pieces of land?

Hi all!

I was thinking in this problem and don't get the recurrence relation...

Can anyone help?

Thanks,

JP!
by jpfarias
Fri Jun 06, 2003 4:10 am
Forum: Algorithms
Topic: Points and polygons
Replies: 6
Views: 2659

Hi! My approach to find if a point is within a polygon is to count how many times a ray from it to right cross but not counting the point itself. The same for left. If left %2 != right %2 then it is on a edge. If right %2 == 1 (or left %2 == 1) the it is inside. If it is equal to any vertice, then i...
by jpfarias
Wed Jun 04, 2003 6:03 pm
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 51984

WA!!!

I'm about to became crazy on this problem! I'm filling iteractively, I take care of filling with the same color (just do nothing), and I've done lot's of tests, but I just got WA, WA, WA, WA, WA, WA...... Can anyone help? I'll explain a bit what my program do: 1. read command (command is a char[1000...
by jpfarias
Tue Jun 03, 2003 5:15 pm
Forum: Volume 101 (10100-10199)
Topic: 10137 - The Trip
Replies: 159
Views: 45209

10137 - The Trip

I think this is not a hard problem, but there may be any tricks... My approach is calculate the sum of the distances to the average of values < average. Something like this: if (value[i] < average) { totall += average - value[i]; } But I got WA! Can anyone explain me what I need to do in this proble...
by jpfarias
Mon May 26, 2003 5:14 pm
Forum: Volume 3 (300-399)
Topic: 361 - Cops and Robbers
Replies: 50
Views: 14378

Yet WA

Well, after a while I was decided to try again this problem! I am now a more experienced programmer and know more algorithms to help me, so, on this problem I thought that Jarvin's March and Point in Poly are the one's of choice, togheter with point in seg. So, my approach was: 1. read in cops and r...
by jpfarias
Tue May 13, 2003 1:54 am
Forum: Volume 7 (700-799)
Topic: 790 - Head Judge Headache
Replies: 49
Views: 14586

It means that if a wrong submission get to the judge at the same time of a accepted one, u should sum 20 min on the final time...

2 A 0:04 N
2 A 0:04 Y

Should sum to 24 min...
by jpfarias
Wed Apr 23, 2003 3:11 am
Forum: Volume 103 (10300-10399)
Topic: 10311 - Goldbach and Euler
Replies: 98
Views: 23023

Forget it

Forget it!

It's solved!

I've forgot that (p2-p1) should be minimized....

Just replace i=3 .. n/2+1 to n/2+1 ... 3 on my solution to get AC, hehe!

JP
by jpfarias
Wed Apr 23, 2003 2:55 am
Forum: Volume 103 (10300-10399)
Topic: 10311 - Goldbach and Euler
Replies: 98
Views: 23023

What's wrong

Hi! I got WA in 8 sec.... But's still a WA... Can anyone see what's wrong? [cpp] #include <stdio.h> #include <string.h> #include <math.h> #define MAXSIEVE 100000000 // All prime numbers up to this #define MAXSIEVEHALF (MAXSIEVE/2) #define MAXSQRT 5000 // sqrt(MAXSIEVE)/2 char a[MAXSIEVE/16+2]; #defi...

Go to advanced search