Show all threads Hide all threads Show all messages Hide all messages |
what is wrong???? | dota2eexim | 1679. Scrooge's Tower | 1 Dec 2016 18:47 | 1 |
|
It is not serious | ZamNick | 1679. Scrooge's Tower | 6 Feb 2014 18:13 | 1 |
Hey, guys, it is not serious, really ...... I had wa4 with EPS = 1e-8 .... when I've changed EPS = 1e-6 I got AC... Edited by author 06.02.2014 18:13 |
WA#12 | soloviyova_ssau | 1679. Scrooge's Tower | 18 Nov 2013 12:06 | 8 |
WA#12 soloviyova_ssau 16 Jan 2009 17:40 1 35 0 25 21 22 Answer YES Edited by author 12.04.2009 20:28 I think that the correct answer here is NO wtf Edited by author 12.04.2009 20:32 I'm sorry, I made mistake. Though my lying AC programm writes "YES" ((((. Test is changed. Maybe answer on test 1 35 0 25 22 21 is also "YES" ? Anybody, check it, plz. Hi, My program gives "YES", I got WA#12 also. Any ideas? AC program. answer is YES |
Crash (floating-point invalid operation) | PolyZonder | 1679. Scrooge's Tower | 24 Dec 2012 07:00 | 2 |
Hello, ladies and gentlemens. Can somebody help me? My program compiles on my computer (Delphi 6), but when i send it to judge, i get message 'Crash (floating-point invalid operation)'. How i can solve this problem? what is wrong? Check that you do not divide to 0. (For example when x1=x2) |
No subject | ALEX | 1679. Scrooge's Tower | 9 Oct 2011 15:48 | 1 |
Please, give me the first test. My program work right, but wrong answer already on the first test. |
WA on test #4 | ahmedov(NUUz_2) | 1679. Scrooge's Tower | 20 Aug 2011 18:48 | 3 |
I've too have this problem:) Well, I had this problem, too. This is caused by a small bug, that is very silly. You must have written something like this: if (xA * xA + yA * yA < R * R / 2) cout<<"NO"<<endl; However, the solution should be like this: if ((xA * xA + yA * yA) * 2 < R * R) cout<<"NO"<<endl; What a stupid mistake! Good luck :) |
Float number precision kills, use integer calculations will do | Neal Zane | 1679. Scrooge's Tower | 27 Jan 2011 02:09 | 8 |
A got AC using real numbers with EPS = 1e-8, so precision is not major matter here... i think it is safe to rotate point 1 90 degrees 4 times and check if it is possible to align the rotated point 1 with point 2 to form an edge of the square. rotated point1 will also have integer coordinates. Thanks, Neal Zane! Your idea is fruitful indeed. I've already gave up to overcome test#24, where float calculations seem to be very sensitive to precesion. And tan/atan along with sqrt gave me error of 10^-8. Now totally integer solution is concise and fast! Thanks for idea. Simple and beautiful. My previous AC solution was more difficult. I have tried this way. When I used the formula 2*(y0*x1 - y1*x0)^2 ? R^2*((x1 - x0)^2 + (y1 - y0)^2) (with 3 x <- -y, y <- x) (with long long on right side) has received WA 3. My previous right solution with use of floats has no more lines and operations. Therefore I believe that geometrical problems to solve in the habitual ways (via floats with epsilon) more preferably. It is necessary to use a "wheel", instead of to invent something new when good average speed of the decision of a problem is necessary. I was very surprised, when after WA1 and WA 2 my solution was accepted :) Pay attention to the situation, when points becomes the same. Pay attention to the situation, when points becomes the same. Thanks! Very useful hint! |
Good problem. Use only integer calculations | Серовиков Андрей | 1679. Scrooge's Tower | 6 Jan 2011 17:38 | 5 |
I tried to solve with some float precisions but it was always WA. Then it was written using only integer calculations and AC. But integer solution really nice ;) I think that integer method is nice because it mathematically easy proved Float method has only timus-Ac verification and there for less nice. I tried to find regorious analysis of some float algo based on computer float system theory but it is rather difficult. I totally agree - very interesting problem with integer solution. |
I've used an obviously wrong algo and received WA6 | Sevenk | 1679. Scrooge's Tower | 18 Oct 2009 15:58 | 1 |
Edited by author 18.10.2009 15:59 |
WA #10. I need test. | Глащенко Никита | 1679. Scrooge's Tower | 3 Apr 2009 21:15 | 14 |
Give me some test, please. I thought out many tests, but my program always gives right answers. I need test for WRONG ANSWER!!! Edited by author 18.01.2009 15:26 Yeh, but if do the more rules for input control... program go to wa2.... fuck. Test! Anybody. thx a lot. For Michail Yudin. Messages should not contain offences, obscene words and correct solutions. Heh... Edited by author 12.01.2009 11:45 For Michail Yudin. Messages should not contain offences, obscene words and correct solutions. Heh... Edited by author 12.01.2009 11:45 You program should not contain mistakes.... Heh... Edited by author 27.10.2012 23:03 My advice. Break off double at all. Use __int64 instead. For example. sqrt(x*x+y*y)<=R ~ (x*x+y*y)<=R*R. On this way you can make you algo absolutely i.e, mathematically correctly. Эх, это не идея... Так только уберет совсем невозможные варианты. Это реализовано мной... Wa10. Я попробовал проверить приндлежность двух точек одному потенциально возможному в окружности с данным радиусом вписанному квадрату... и получил wa2. полный трындец... можно конечно понасиловать тимус, чтобы добыть тесты... но это плохой дао. так как старость может придти раньше успеха. Кто-нибудь дайте AC-алгоритм, или его математическую реализацию.... я больше не могу ничего придумать PS. if you want translate... use RU-EN translator. Use for example a system: s*x1+t*y1==R/sqrt(2) s*x2+t*y2==-R/sqrt(2) must be:s^2+t^2==1 Thx a lot... True algo. How do you got it Wise man? if it not secret. But test 9 5 5 -5 -5 this algo do bad. correct answer - yes. answer this algo - no Edited by author 16.01.2009 23:00 Edited by author 16.01.2009 23:01 Edited by author 16.01.2009 23:02 My advice. Break off double at all. Use __int64 instead. For example. sqrt(x*x+y*y)<=R ~ (x*x+y*y)<=R*R. On this way you can make you algo absolutely i.e, mathematically correctly. What does this formula stand for? I don't know what is "~" here? Is this enough to solve the problem, or is there anything else to be considered? Thanks many questions! see my site svrsvr.far.ru at this place a will give full explanations soon 2 9 5 5 -5 -5 9 5 5 5 -5 YES YES
Thanks, but my program gives the same answers. |
who overcame WA#24, what's the problem? | strider | 1679. Scrooge's Tower | 19 Jan 2009 12:32 | 2 |
What is the test or how did you circumvent it? This is a big random test with big circles. Probably you solution is not precise enough. |
Nice Solution [Not Code] | Michail Yudin | 1679. Scrooge's Tower | 18 Jan 2009 21:47 | 2 |
Heh, i take some day to solve this problem. Solution, by Master Herr Nikita Glashenko (Никита Глащенко), because my solution got (i move sqare from 0 to pi/2) TLE (slow code). Do next: take one point and mirror it in front of and sheer from O(0,0). Example: 3 4, -3-4, 4-3,-4 3. And take the equalization of the line catched on two points(x1,y1) (x2,y2). if size of chord(lying on the line catched on two points(x1,y1) (x2,y2))=r*sqrt(2)[use approximation 1e-7 for example] in one of the four variants (for four point, what you get), then 'yes' else 'no'. PS: Division by zero mit uns(with us), you should control it. Too difficult solution. All you should do for every case - just consider two squares... |
WA14 Need tests. Here my code | Michail Yudin | 1679. Scrooge's Tower | 18 Jan 2009 14:27 | 1 |
Edited by author 18.01.2009 18:00 |
What is the possible Epsilon for this problem? | Igor Dex | 1679. Scrooge's Tower | 13 Jan 2009 19:11 | 1 |
WA24 Edited by author 14.01.2009 04:25 Edited by author 14.01.2009 04:26 |
WA10 | Michail Yudin | 1679. Scrooge's Tower | 11 Jan 2009 11:22 | 1 |
WA10 Michail Yudin 11 Jan 2009 11:22 I understood this test. It's test give two points and check, one square has it, or each point is belonged to two sifferent squares, what maybe constructed in this circle. How can i check it? I need mathematic model. Thx. |
No subject | Madi | 1679. Scrooge's Tower | 11 Jan 2009 11:17 | 3 |
Why for 2 1 1 0 0 the answer is NO ? Because the point (0,0) can't belong to our square. The distance from (0,0) to each of 2 points should be R*sqrt(2)/2 <= d1,d2 < R R*sqrt(2)/2 <= d1,d2 <= R |
WN on test4 | ahmedov(NUUz_2) | 1679. Scrooge's Tower | 10 Jan 2009 17:11 | 1 |
|
why? | Ali | 1679. Scrooge's Tower | 10 Jan 2009 16:11 | 7 |
why? Ali 10 Jan 2009 14:15 why in sample input answer for test 2 is NO? and if it is NO why answer for 3test 3 is YES? Re: why? Илья Гофман (Ilya Gofman) 10 Jan 2009 14:37 test#2 contains a point (0;0) which cannot belong to the inscribed square, that's obvious. "square of the foundation should be inscribed in the circle of the island" what does "inscribe" mean here? does it mean that the corners of square should lie on the circle? Re: why? Илья Гофман (Ilya Gofman) 10 Jan 2009 16:11 yes, this is what the term "inscribed" means i don't understand why it's "yes" for the first variant Square ABCD: A(2,0),B(0,2),C(-2,0),D(0,-2) Sample 1 gives the middle point of AB and AD i don't understand why it's "yes" for the first variant |
No subject | Madi | 1679. Scrooge's Tower | 10 Jan 2009 14:04 | 1 |
why the second test is NO ? |