|
|
super incomprehensible, in general the tests are about some kind of accuracy, you need to make 100 parcels and try different epsilons everywhere to pass these tests, it pissed me off hypercircle does not interfere with the thread 1 2 0 0 0 0 0 0 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2.24 New tests have been added to the problem which exploit a common mistake when using acos function. Hint: try to calculate acos(sqrt(3.0) * sqrt(3.0) - 4.0) in your programming language. 269 authors (58%) with accepted solutions have been challenged. Why is this a mistake? How to modify the solution to avoid the mistake? Who knows? OK, just need to add a clamp for acos' arg. this task is the same as 1075, but with a different number of dimensions(it doesn't really matter) I submitted some algo which on my computer gives correct result for sample input given in problem statement and I got WA in test #1. Then I tried this code: public class Problem_1285 { public static void main(String[] args) { System.out.println("1.00"); } } ...and got the same WA #1. What's going on??? Seems like test #1 is not the sample test Seems like test #1 is not the sample test It is often the case. There are a lot of tests (i know two: 4 and 9), in which r <= 0. Please, change it! Tests with r = 0 are fixed. Thank you. 1075 with same algorithm have got AC. Can somebody help me? I need some tests or hints... Is this test correct? 1000 0 0 0 0 0 0 0 -1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 999 answer: 3138.51 i get that,too and i wa 25 the same reason as WA #4 of 1075 I got WA37 in 1285 and AC on 1075 I use not diffrens algos, only different input type. I think correct add test and for 1075 too. Me too. But I have WA on test #7. Something strange... I agree with you. Two years ago I wrote about 1075: "What is a difference between this problem and problem 1285? I have AC program of 1285 and always get WA Test#4 here." Tests were updated since 2004. But why not to make such updates in both problems simultaneously? IMHO, if you add several tricky test to 1285 then you should add tests of the same structure to 1075 and vice versa. But here the test set of one problem is weaker then another one's. Oh1! I missed a REALLY stupid mistake! Sorry for my complaint! AC now. Edited by author 25.08.2006 21:11 Edited by author 25.08.2006 21:11 I made it here with modified 1075 AC on 1075, WA#19 on 1285 =( maybe some system tests are incorrect? Can anybody explain me, where am I wrong? Definitions: ac, ab, bc - corresponding lengths acb - angle between (ca) and (cb) Such code: ... acb = acos((ac*ac + bc*bc - ab*ab) / 2.0 / ac / bc); .. gets AC. Such code: ... double spv(point x1, point x2, point y1, point y2){ int i; double res = 0; for (i=1; i<=n; i++){ res += (x2.coord[i] - x1.coord[i]) * (y2.coord[i] - y1.coord[i]); } return res; } ... acb = acos(spv(c,a,c,b)/ac/bc);... ... gets WA25. I had always thought that these two fragments must yield the same result. Why don't they? me too. If you get WA27, use type double Are you sure that your tests are ok? Does the first test coincide with the example? I have WA1. Фрагмент кода при проверки лежит ли путь через сферу. Почему то вещественная проверка проходит, а целочисленная нет. хотя в long long все должно влазить. Извините, что на русском, но писать на английском я совсем не могу) int i; long long a=0,b=0; for (i=0;i<maxd;i++) { a+=sqr(p2.x[i]-p1.x[i]); b+=(p2.x[i]-p1.x[i])*(x[i]-p1.x[i]); } if (b<0||b>a) return false; //-AC----------------------------------- double t=(double)b/a; double rr=0; for (i=0;i<maxd;i++) rr+=sqr((p2.x[i]-p1.x[i])*t+p1.x[i]-x[i]); rr=sqrt(rr); return rr<r; //-WA7----------------------------------- long long t=0; for (i=0;i<maxd;i++) t+=sqr((p2.x[i]-p1.x[i])*b+a*p1.x[i]-a*x[i]); return r*r*a*a>t; } //В задаче 1075 тоже самое только WA на 12 тесте. Edited by author 31.07.2007 12:53 For example, r=1000, a=8*(1000-(-1000))^2=32000000. r*r*a*a > MaxLongLongInt. thank you)) Edited by author 25.09.2007 09:29 Tests correct. I AC with Long arithmetic. Tests 5, 9 and 10 were incorrect -> fixed. Tests were too weak -> some new tests have been added. Problem has been rejudged. Although problem statement says r > 0 and AC, BC > r, 1. It's possible that r == 0 2. It's possible that AC == r or BC == r I' ve got Crash (FLT_DIVIDE_BY_ZERO). I added one condition: If r = 0 then WriteLn(d:0:2) and get AC. But in the task we can read: "The radius R is integer positive number" Please!!! 1 -2 0 0 0 0 0 0 -2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 Answer 5.14 |
|
|