I changed every float to double and widen the alfa angle precision, still WA...
I also tried another implementation of graham scan, it sorts the vertices by coordinates, not by polar angle range, and it computes 2 loops, first the upper convex hull, then the bottom part. The code goes like this ...
Search found 5 matches
- Thu Jun 13, 2013 3:33 am
- Forum: Volume 2 (200-299)
- Topic: 218 - Moth Eradication
- Replies: 60
- Views: 19966
- Sat Jun 08, 2013 7:35 pm
- Forum: Volume 2 (200-299)
- Topic: 218 - Moth Eradication
- Replies: 60
- Views: 19966
Re: 218 - Moth Eradiction WA
upgrade for one point input, now the output consiists of route from the point to itself... still WA, someone posted some auto generatoed points with correct output, and I got it all right with my code
http://online-judge.uva.es/board/viewto ... =218#p5388
still WA
http://online-judge.uva.es/board/viewto ... =218#p5388
still WA
- Sat Jun 08, 2013 5:34 pm
- Forum: Volume 2 (200-299)
- Topic: 218 - Moth Eradication
- Replies: 60
- Views: 19966
Re: 218 - Moth Eradiction WA
okay, now I`m pretty sure I`ve covered it all. I ran like 20 tests on collinear points covering every possible situations with collinear points, but still getting WA from the judge... here`s the modified code, and I`m pretty clueless right now...
#include <cstdio>
#include <math.h>
#include ...
#include <cstdio>
#include <math.h>
#include ...
- Sat Jun 08, 2013 4:54 pm
- Forum: Volume 2 (200-299)
- Topic: 218 - Moth Eradication
- Replies: 60
- Views: 19966
Re: 218 - Moth Eradiction WA
okay, I know what's wrong.. It was alrdy 4a.m when I was dealing with those collinear points, and I screwed pretty much... there are 2 issues I noticed so far, first if there`s only one line of points in total, and they`re collinear, then the convex hull must contain all of the inner vertices twice ...
- Sat Jun 08, 2013 6:55 am
- Forum: Volume 2 (200-299)
- Topic: 218 - Moth Eradication
- Replies: 60
- Views: 19966
218 - Moth Eradiction WA
Hi there, I`ve been struggling for some hours to get my project through this uva judge, but I`m still getting WA although I`ve checked everything like ten times. I`ve also tried all the possible inputs I`ve found on this forum so far and I`m getting the correct answers all the time... Got no idea ...