Show all threads Hide all threads Show all messages Hide all messages |

for WA15 | Arseny Babushkin (aytel)'` | 2008. Swifty | 21 Apr 2017 23:41 | 1 |

for WA15 **Arseny Babushkin (aytel)'`** 21 Apr 2017 23:41 if you get it, try to change g. i misread the statement and my g was equal to 9.81, not 9.8, then i fixed it and got AC |

I think there is something wrong | MishaRash | 2008. Swifty | 19 Jan 2016 17:34 | 4 |

I solved this problem theoretically and checked ability of a jump by counting the discriminant of square equation. I got WA on tests 30-32 using floating point numbers and trying to find good precision (type double in C) and rewrote my program using long integer type (long long) with no precisions. The first thing I noticed is that I got WA on test 20 when I say that jump is possible if D>=0. If I check D>0, I get WA on test 32. I'm sure it's not correct, because if D=0 exactly jump is still possible. I thought the problem could be in overflowing. Despite long long must be enough, I rewrote the program in Python 3 to avoid overflowing for sure and nothing changed. So I think I am right and there are wrong tests. I can show my source code if needed.
*Edited by author 20.07.2015 18:27* By the way, I got AC on FreePascal using the condition that is less strict because of precisions. Approve this. Only condition D >= 0 allows test like this 0 0 1 0 0 0 2 There is additional check needed. This magic works: L^2*g^2<=(V^2-g*(y2-y1))^2 implem. in long long(g=98/10) |

Test 9 | Agabek | 2008. Swifty | 19 Oct 2015 02:57 | 3 |

Test 9 **Agabek** 10 Nov 2013 00:11 Re: Test 9 **Vedernikoff 'Goryinyich' Sergey (HSE: АОП)** 10 Nov 2013 15:41 Don't know what kind of test it is, but precision troubles are quite likely in this problem. So, solve problem in integers to avoid them. I had WA on test 9 with a wrong formula for the movement equations, that worked on the samples, but was too weak to solve these tests (it would say "yes" to both): 14 0 20 0 10 0 0 Yes 14 0 20 0 9 0 0 No |

If you have WA 30+ | Disintegrator | 2008. Swifty | 22 Jul 2014 01:59 | 2 |

Try different epsilons. I got AC with solution that had WA 30,32,34 before that. And all that i changed was epsilon. Better solution would be to do all calculation in integer types (e.g. long long) - thus you avoid precision issues. |

WA13 | Rodrigo Paim | 2008. Swifty | 25 May 2014 23:54 | 1 |

WA13 **Rodrigo Paim** 25 May 2014 23:54 Hello there, I keep getting wrong answer for test 13 and I have no clue whatsoever of the reason. I am using integer values (long long) in this problem and always check if the flea can go left->right->left->head OR right->left->right->head. Moreover, I consider different scenarios: * Pure vertical jump (dx = 0), and I only allow an upward jump in this case (otherwise it would be a simple fall with no effort); * Horizontal jump (dy = 0): I apply the formula for the maximum horizontal range (with theta = 45 degrees); * Upward jump with horizontal move: I calculate the minimum initial horizontal and vertical speeds (as it is a parabolic trajectory, I try to check if there is an initial configuration such that the vertex of the parabola (with Vy = 0) coincides with the final position; * Fall with horizontal move (dy < 0 and dx != 0): In this case, I consider that the flea only has non null initial horizontal speed and check if the horizontal distance is enough to reach the final point. So that is it. Thank you very much for eventual answers.
*Edited by author 25.05.2014 23:55* |

Test 29 | exwRabbits_AlMag(VNTU) | 2008. Swifty | 17 Jan 2014 14:10 | 1 |

Test 29 **exwRabbits_AlMag(VNTU)** 17 Jan 2014 14:10 I have only one place where i'm dealing with doubles - trying to check B*B<4*A*C. Can it be a problem? If not, then probably something else is screwed up. UPD: Yes, in my case it was precision. I got rid of doubles in that check - got AC.
*Edited by author 17.01.2014 14:53* |

WA#32 | rydah | 2008. Swifty | 13 Nov 2013 04:11 | 4 |

WA#32 **rydah** 11 Nov 2013 21:34 AC'ed authors, how could you fix this? Re: WA#32 **Vedernikoff 'Goryinyich' Sergey (HSE: АОП)** 12 Nov 2013 00:57 Try to do all calculations in integer numbers I even replaced all the doubles with integers. But the result is the same. Re: WA#32 **Vedernikoff 'Goryinyich' Sergey (HSE: АОП)** 13 Nov 2013 04:11 In my formula, overflow is possible even in long long, if computed straightforwardly. So, check that in your algo no overflow occurs. |

Test 11 | letsifer0 | 2008. Swifty | 11 Nov 2013 17:03 | 1 |

Test 11 **letsifer0** 11 Nov 2013 17:03 I have WA#11, though my decision is consisted only from integer numbers. What is possible problem?
*Edited by author 11.11.2013 17:03*
*Edited by author 11.11.2013 17:04*
*Edited by author 11.11.2013 17:04* |

TEST 22 | rydah | 2008. Swifty | 11 Nov 2013 00:08 | 4 |

I got WA#22. What is possible problem here? Re: TEST 22 **Vedernikoff 'Goryinyich' Sergey (HSE: АОП)** 10 Nov 2013 20:03 Precision issues are quite possible in this problem - so, try to solve it in integer numbers. Re: TEST 22 **Kungurtsev [USU][Psych Up club]** 10 Nov 2013 22:04 But I saw AC solution in double without epsilon :) Re: TEST 22 **Vedernikoff 'Goryinyich' Sergey (HSE: АОП)** 11 Nov 2013 00:08 If you're quite lucky or tests are weak - it is possible, but anyway quite risky on the real contest. |