I have got AC on this problem. In the description, it says "accuracy to 0.0001". In the code which I submitted, I use printf("%.4lf\n", min_breakage); to match the point. When I use the sample input, my output is 3.0000. But the sample output is 3. So I think the sample output may be wrong. Or both the two outputs are correct? I solved the problem geometrically in Microsoft VS C ++. At first, my solution was WA 8, but after I added 100 to the input coordinates, I started getting WA 38. But as I did not try to work with accuracy, I still got WA 38. I tried everything. Please tell me, is 38 test really drawn up correctly? Or at least tell me what my mistake is. I would like to see a test similar to 38. I am sure that I solved the problem correctly I would like some tests, in particular test #3. Thank you. 4 0 0 1 0 0 1 1 1 0.7071 3 0 0 1 0 0 1 0.6436 3 1 0 1 0 0 1 0.9102 Thank you. But... C:\Casual\Task1058>task1058.exe <test12.txt 0.7071 C:\Casual\Task1058>task1058.exe <test13.txt 0.6436 C:\Casual\Task1058>task1058.exe <test14.txt 0.9102 I can hardly ever understand anything. My program cannot pass test #3. Please publish here some tests All test cases invented by me passed but I have got here WA on test 3 All tests have published here passes. Test 3 gives WA persistently. What is it like? I fixed 4 digits after decimal point of a result (that is, for example: 3.0000) Does it matter? Edited by author 02.07.2016 02:19 Edited by author 02.07.2016 02:19 Not very hard to prove, then the breakageline must create EQUAL ANGLES with sides, connected by it. This idea immediately gives the O(N^3) algorithm. But it could be improved even to O(N). :) Edited by author 20.08.2008 20:22 It could be corners instead of sides for the following input. 6 0 0 2 1 4 0 4 4 2 3 0 4 to Erick Wilts CONVEX poligon I try to solve different polygons that i feign myself. And everything is OK include some special cases like two equal points or all points in the same line. But when i try to submit solution test number 2 break all my hopes. What is the input data for test 2 and expected answer? thanks a lot I have same situation as author. Tried few different approaches  WA #2. Can we please have the data?) Thanks in advance Geometric solution I wrote has the same problem. With pass all of my own tests it got WA on test2. If it could be, please, give me test2 and output for it. Please, write there translated (RUSSIAN) version of this problem!!!! or you can send there for my adress daminus_corp@mail.ru > Thanks!!!! Вам даны координаты вершин полигона, надо найти такую линию, концы которой лежат на сторонах или вершинах многоугольника, что она разделит данный многоугольник на два равных по площади многоугольника. My solution is geometrical, it passes all of my tests, except of one, where one side has a length of 0. But I got WA on test #2, so: 1) Can a polygon have a side with length of 0? 2) Can somebody give me any tests for this problem? 1) I'm pretty sure it can't, since otherwise my AC solution has a big chance to divide by zero. 2) 3 0 0 3 0 0 3 answer: 1.9308 Yeah, this is a pretty simple test but it actually helped me to overcome that WA #2. @Chitanda Eru, but 1.9308 aint correct. UPD: it is. Edited by author 30.09.2013 02:21 but N — the number of polygon vertices (4 ≤ N ≤ 50) I'm tired of getting WA; can someone give answer to the test 4 0 0 10 50 0 100 10 50 Thank you. incorrect test: the vertices must be in the counterclockwise order so this is correct: 4 0 0 10 50 0 100 10 50 Whether the barycenter of the polygon is must on the breakline ? thanks ~ 87 authors lost AC after rejudge. Good luck! More tests were added. Read site news. Old TL was set according to slow testing computer. Now more than half of AC solutions work in 0.1 sec and faster. So we decided to decrease TL to 1 sec. 10 authors lost AC. My decision: 1.) We consider polygon such what it is, we spend 2 straight linees in parallel OX, one passes through the lowermost point, another through the uppermost. We spend a third  a line of a break on middle between a theme to two. We look at fragments. If the area of the top fragment is more, then we lift a line of a break on 1/4 all intervals, else is lowered. Then shift on 1/8 etc. To put it briefly, binary search we find height of a horizontal that it divided into equal fragments. 2.) We turn a figure, concerning any fixed point on a small corner (about 0.01 radian) 3.) We carry out action number 1. And so we shall consider all possible variants. Certainly sooner or later it is necessary to stop to rotate a figure. It at turn on 180 degrees from an initial arrangement of a figure. My decision works for 0.078 seconds and 253 Kb. What your thunk about it? GOOD LUCK! I am sorry for bad English My solution differs from yours one, but I think your idea is interesting. I've solved it in a classical way using 2 binary searches  the first one inside the second, and then just a constants optimization... Thank for good words :) Can you explain your method for me? You know my email. Edited by author 21.06.2004 23:05 Edited by author 20.08.2008 20:22 I used similar idea and checked 10000 angles, but had wa10. Then I replaced it into 1000 and got AC. Now i'm wonder why, it seems to me accuracy lowered then. in the description, it says the length must be write with accuracy to 0,0001. does it mean 1 or 0.0001 ?? it means 4 exact digits but why the sample output is 3?(3.0000) Because 33.0000 < 0.0001 This problem contains one unobvious and unpleasant trick. In statement it is said that result must be output with "accuracy to 0.0001". But in fact you must output result rounded up to fourth digit after decimal point. So, if you output answer with some additional precision, you'll get WA. For example, I got "Accepted" when corrected line writeln (finres:0:5); to writeln (finres:0:4); in my program. It means that your solution is not very accurate. My solution outputs a value "as is" without any truncation (just System.out.println(min);) and gets AC. Problem 1058 WA @ Test #32! I supposed it to be the problem of precision. But, I don't know why...... Could somebody help me, for example, give me a test? Thx a lot. i got wrong ans in #9 . what is it? Edited by author 08.04.2008 22:41 
