Hello, my friends ! I composed a very interesting test 1000 10 2 5 5 5 5 my program found 135.00, obviously correct. Then, I tested this 1000 10 3 5 5 5 5 and I got 116.57. This is correct, too. For the following test 10 10 4 5 5 5 5 my answer is 45.00 Is there any different kind of data set for I get WA 14 ? >> Angle in degrees (with 2 digits after decimal point), that gives the desired direction of fireball. If there are several such angles your program should output the minimal one. 1. Could angle be negative? 2. If YES, then does angle should be minimal "BY MODULO" OR minimal "BY VALUE"? Thanks. 0.00<=Angle<360.0 Rounded angle may probably become 360.00. Anyway, I had no protection against that and got AC. When I add "if (fi==0) fi=360;" in my code I got WA#2, until this moment I got WA#14. Edited by author 08.10.2011 18:16 In fact, you should consider, that until the last collision, fireball can fly through the wizard and the target. Sorry once again... Problem Author На самом деле надо считать, что вплоть до последнего столкновения файрболл может пролетать сквозь чародея и цель. Еще раз прошу прощения. Автор задачи. Text is still unclear... if fireball is passing through the enemy and not loosing its level, so why do 0level one hit the enemy? this contradicts to statement (fireball can pass through any obstacle except wall)... even more  why in this case 0level fireball is not hitting us? Edited by author 06.08.2011 21:40 In my solution there is a product "width * N" squared, wich in maximum (1000*100)^2 = 10^10 gives more than INT_MAX. I use signed int and I've still got AC, while my program gives 1.#IND on the test 1000 1000 100 1 1 4 5 I suppose you should add boundary tests or soften condition to, for example, "max width and hight <= 100". Statement is updated. Read Site news. I can create new tests for this problem with N up to 100. Since with current limitations the problem has much more easier solution... subj Yes:)) Edited by author 16.10.2004 21:14 Yes it can, but it will fly through. I also considered case when n==0 && x1==x2 && y1==y2. In this case I output 0.00 Why the sample output is 45.0 but not 315.0? 128101=5+10+10+(108) 128101<>5+10+10+8 I nad 315.00 for a long time till I fixed all bugs :) Note that situation mirrors around OX/OY when you hit a wall. What is the answer for the following testcase? 10 10 2 9 9 8 8 Is the answer equals to 45.00 ? Thanks for help. Edited by author 30.08.2007 01:14 Try this test. When I've found this bug, my program received AC: Sample input: 3 3 1 2 2 1 1 Sample output: 108.43 Good luck! 4 1000 2 2 10 2 1 Answer 250.02 Good Luck & Have Fun My program returns 250.02 but I still have WA on #13 4 1000 2 2 990 2 999 Answer 70.02 1000 4 2 10 2 1 2 Answer 160.02 1000 4 2 990 2 999 2 Answer 19.98 Now I think you Got AC. P.S. I wish you good luck. :) Edited by author 19.12.2005 03:08 please can someone give me test#14 cause i realy don't know what's wrong that's: 10 10 6 5 5 5 5 my answer is 11.31, and I've drawn the picture, everything is right! could anybody tell me what the standard output is? what's your output? I think if the answer is 45.00, the fireball has ALREADY touched B, with only 2 touched of the wall!!!????!!!! I output "45.00", and passed case 16...faint The direction of throw is selected such way that thrown fireball hits the target exactly after N collisions with the room walls. So (N+1)th collision is the collision with the target I meant that the fireball should NOT touch B during the first N collisions. But in fact, I could. and that touch won't be considered a collision!!!!!!!!! 
