Search found 98 matches

by jpfarias
Fri Nov 28, 2003 5:05 pm
Forum: Volume 101 (10100-10199)
Topic: 10173 - Smallest Bounding Rectangle
Replies: 18
Views: 4597

Getting WA

Hi! Can you find why I'm getting WA? Here is my code: [cpp] #include <stdio.h> #include <math.h> typedef struct Ponto { double x; double y; } Ponto; Ponto p[1010]; int n; Ponto h[1010]; int nh; int idx[1010]; double minY, maxY, minX, maxX; double minA; double prod_vet_z(Ponto &a, Ponto &b, Ponto &c)...
by jpfarias
Tue Oct 28, 2003 6:35 pm
Forum: Volume 102 (10200-10299)
Topic: 10261 - Ferry Loading
Replies: 41
Views: 19410

Ok, I agree it is a knapsack problem, but I could not think in the right way to solve it... Can someone help me here?

JP.
by jpfarias
Mon Oct 20, 2003 7:36 pm
Forum: Volume 105 (10500-10599)
Topic: 10574 - Counting Rectangles
Replies: 23
Views: 9228

I think this is not the only thing to do, as you may have rectangles instead of squares.... So, my idea is: 01. sort on X 02. for i = 1 to num_points - 3 do 03. i1 = i + 1 04. while X[i1] == X[i] // Here we have one side of the rectangle 05. i2 = i1 + 1 06. while X[i2] == X[i] do 07. i2 = i2 + 1 08....
by jpfarias
Fri Oct 17, 2003 4:46 am
Forum: Volume 105 (10500-10599)
Topic: 10563 - Least Squares
Replies: 14
Views: 7296

10563

Plz, give me the output of this input: 5 5 ????. ???.? ????? ????? ????. 5 5 ????. ???.? ????? ????? ????. 5 5 ..... ..... ..... ..... ..... 5 5 ????? ????? ????? ????? ????? 5 5 ????? .???. .???. .???. ????? 0 0 My output is: AAAB. AAA.A AAABB BBCBB BBAC. AAAB. AAA.A AAABB BBCBB BBAC. ..... ..... ....
by jpfarias
Fri Oct 17, 2003 2:53 am
Forum: Volume 105 (10500-10599)
Topic: 10564 - Paths through the Hourglass
Replies: 30
Views: 13416

Ok, solved!! I just did not think enough before...

I've created a 20x40x351 matrix to store parcial values...

But, how do I solve this with < 0.09 sec with 64k of memory?

JP.
by jpfarias
Wed Oct 15, 2003 12:13 am
Forum: Volume 105 (10500-10599)
Topic: 10564 - Paths through the Hourglass
Replies: 30
Views: 13416

Can you explain better? I didn't understand what you mean...

Maybe an example should clarify my mind ;-]

Thanks,

JP.
by jpfarias
Sun Oct 12, 2003 3:11 pm
Forum: Volume 105 (10500-10599)
Topic: 10564 - Paths through the Hourglass
Replies: 30
Views: 13416

How to?

Can anyone explain me how to solve this one?

I'm thinking on it a lot and I yet could not find a way to solve it... May be you can give me some tips on how to solve this one...

Thanks,

JP.
by jpfarias
Fri Sep 26, 2003 1:21 pm
Forum: Volume 7 (700-799)
Topic: 713 - Adding Reversed Numbers
Replies: 142
Views: 40354

I've found one error:

[cpp]
else{
cout << "1" << endl;
}


cout << endl;
[/cpp]

This will produce 2 endl, which is wrong....

Don't know if there are other errors.... :)

JP.
by jpfarias
Fri Sep 26, 2003 1:22 am
Forum: Volume 7 (700-799)
Topic: 713 - Adding Reversed Numbers
Replies: 142
Views: 40354

Compile errors...

These are the errors I've got when I compiled your code on the gnu g++ compiler with -ansi and -Wall flags: teste.cpp: In function `int main()': teste.cpp:41: name lookup of `t' changed for new ISO `for' scoping teste.cpp:29: using obsolete binding at `t' teste.cpp:55: call of overloaded `pow(int, i...
by jpfarias
Thu Sep 25, 2003 7:59 pm
Forum: Volume 7 (700-799)
Topic: 704 - Colour Hash
Replies: 23
Views: 13379

What do I do?

What is a good approach to solve this one?

I've tryied IDA*, dfs and bfs, but couldn't find the solution in time...

Any help is appreciated :)

JP.
by jpfarias
Wed Aug 20, 2003 4:23 pm
Forum: Volume 6 (600-699)
Topic: 681 - Convex Hull Finding
Replies: 60
Views: 20526

If the judge output is wrong answer, then you did not get runtime error! ;-)

JP!
by jpfarias
Mon Aug 18, 2003 1:29 pm
Forum: Volume 6 (600-699)
Topic: 681 - Convex Hull Finding
Replies: 60
Views: 20526

I've used 1500 in my AC solution. :-)

JP!
by jpfarias
Fri Jul 11, 2003 1:03 pm
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 52088

I do it this way and got AC.

I really think there are no illegal commands on the input, though. :-)

JP!
by jpfarias
Sun Jul 06, 2003 10:10 pm
Forum: Volume 105 (10500-10599)
Topic: 10527 - Persistent Numbers
Replies: 26
Views: 11511

Yeah, for this specific problem I need at least division and comparison, but we will never know what a problem needs before we see it :-).

PS: I think I'll implement one bigint class myself, the one I've got is too much buggy... Thanks anyway!

JP!
by jpfarias
Sun Jul 06, 2003 5:36 pm
Forum: Volume 105 (10500-10599)
Topic: 10527 - Persistent Numbers
Replies: 26
Views: 11511

Talking about bigint's, do you know where do I get a good and small bigint class, such that I can type it in less than 10 minutes in a real contest?


Thanks!

JP!

Go to advanced search