Search found 5 matches

by Rafa3p
Wed Jan 04, 2012 8:15 am
Forum: Volume 102 (10200-10299)
Topic: 10263 - Railway
Replies: 14
Views: 8099

10263 - Railway

Can somebody give me some help? I don't know y i'm getting WA.
I guess I'm with precision error, bur dont know how to fix it

The Algorithm is that :
For each segment
---Look if M is inside AB line
---If it is -> Choose lesser distance : AM or BM
---Else -> Find the point X in the perpendicular line ...
by Rafa3p
Thu Dec 29, 2011 8:10 pm
Forum: Volume 3 (300-399)
Topic: 378 - Intersecting Lines
Replies: 48
Views: 24131

Re: Problem 378

I changed this:

if(Y==0)printf("POINT %.2f 0.00\n",X);
else if(X==0) printf("POINT 0.00 %.2f\n",-Y);
else printf("POINT %.2f %.2f\n",X,-Y)


for this:

if(X==0)printf("POINT 0.00");
else printf("POINT %.2f",X);
if(Y==0) printf(" 0.00\n");
else printf(" %.2f\n",-Y);

And got AC.
I did ...
by Rafa3p
Thu Dec 29, 2011 3:37 am
Forum: Volume 3 (300-399)
Topic: 378 - Intersecting Lines
Replies: 48
Views: 24131

Problem 378

I don't know why I'm getting WA.
For this test case I'm getting the same answer from uva.toolkit
10
0 0 4 4 0 4 4 0
5 0 7 6 1 0 2 3
5 0 7 6 3 -6 4 -3
2 0 2 27 1 5 18 5
0 3 4 0 1 2 2 5
0 0 1 1 0 0 1 1
4 0 6 0 1 2 6 9
1 0 5 0 8 5 4 5
1 0 5 0 5 0 1 0
0 1 0 5 0 5 0 1

My code :

#include ...
by Rafa3p
Tue Dec 27, 2011 9:28 pm
Forum: Volume 103 (10300-10399)
Topic: 10357 - Playball !!!
Replies: 4
Views: 2873

Re: 10357 - Playball !!!

I found three stupid mistakes and got AC
1) for(j=1;i<=balls;j++) -> for(j=1;j<=balls;j++)
2) if( c*c + d*d <= t*t+team .v*team .v) -> if( c*c + d*d <= t*t*team .v*team .v)
3)printf("Ball %d was foul at (%d,%d)\n",i,a,b) -> printf("Ball %d was foul at (%d,%d)\n",j,a,b)


Delete the post?
by Rafa3p
Tue Dec 27, 2011 1:03 pm
Forum: Volume 103 (10300-10399)
Topic: 10357 - Playball !!!
Replies: 4
Views: 2873

10357 - Playball !!!

HI, i'm finding the position where the ball hit the ground, but i'm having
problem to determine if the ball was "safe" or "caught".
I run my vector of players looking if someone can take the ball before it hit the ground

T1 <= T2 T1->Player running T2->Time to ball hit the ground, that i used to ...

Go to advanced search