Show all threads Hide all threads Show all messages Hide all messages |
Useful test | Yury_Semenov | 1058. Chocolate | 7 Jul 2023 17:22 | 1 |
5 0 0 4 0 4 2 2 4 0 2 answer: 3.640719 |
The input contains float numbers | Igor Parfenov | 1058. Chocolate | 23 Aug 2022 20:36 | 1 |
Be careful, the input numbers are float, though sample and all tests here have only integer numbers. It appears first at <= 6th test. |
Stupid Eps | DarksideCoder | 1058. Chocolate | 26 May 2022 13:46 | 1 |
please give me some tests. |
Why WA #38? | dukhno | 1058. Chocolate | 29 Jan 2022 14:34 | 2 |
accuracy was most likely the problem for me |
What is test 9? | guilty spark | 1058. Chocolate | 13 Aug 2021 17:35 | 1 |
Getting WA #9. My solution is bruteforce after dividing the lines |
The sample output may not be correct. | Rotter Tarmination | 1058. Chocolate | 3 Oct 2020 16:23 | 1 |
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? |
To admins | dukhno | 1058. Chocolate | 8 Dec 2019 10:27 | 1 |
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 |
Some tests need | organmusic | 1058. Chocolate | 6 Jan 2017 03:14 | 1 |
I would like some tests, in particular test #3. Thank you. |
A few tests that helped me to find an error. | Victor Barinov (TNU) | 1058. Chocolate | 12 Nov 2016 02:53 | 3 |
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 | organmusic | 1058. Chocolate | 15 Jul 2016 02:10 | 1 |
Please publish here some tests All test cases invented by me passed but I have got here WA on test 3 |
What is test 3? | organmusic | 1058. Chocolate | 2 Jul 2016 02:15 | 1 |
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 |
Idea for linear solution :) | Punkrocker | 1058. Chocolate | 2 Jul 2016 01:53 | 4 |
Not very hard to prove, then the breakage-line 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 |
what is the test number 2? | Eugene Ovechkin | 1058. Chocolate | 30 Jan 2016 06:42 | 3 |
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. |
NEED translate into RUSSIAN (to admins) | daminus | 1058. Chocolate | 23 Jan 2014 20:12 | 2 |
Please, write there translated (RUSSIAN) version of this problem!!!! or you can send there for my adress daminus_corp@mail.ru > Thanks!!!! Вам даны координаты вершин полигона, надо найти такую линию, концы которой лежат на сторонах или вершинах многоугольника, что она разделит данный многоугольник на два равных по площади многоугольника. |
A question. | Gukoff | 1058. Chocolate | 2 Oct 2013 14:47 | 4 |
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) |
Test cases wanted (with answers possibly) | Ivan Georgiev | 1058. Chocolate | 24 Apr 2011 23:49 | 7 |
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 counter-clockwise order so this is correct: 4 0 0 10 50 0 100 -10 50 |
help help | SCUQIFUGUANG | 1058. Chocolate | 29 Mar 2011 10:37 | 1 |
Whether the barycenter of the polygon is must on the break-line ? thanks ~ |
Problem 1058 "Chocolate". New tests were added. (+) | Sandro (USU) | 1058. Chocolate | 7 Nov 2010 21:59 | 2 |
87 authors lost AC after rejudge. Good luck! More tests were added. Read site news. |
Problem 1058 "Chocolate". TL now is equal to 1 sec (+) | Sandro (USU) | 1058. Chocolate | 25 Sep 2009 18:25 | 1 |
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. |
At last I have solved it!!! There is my solution | Виктор (marilyn_manson@bk.ru) | 1058. Chocolate | 9 Jan 2009 00:41 | 5 |
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 Hm-m-m (+) Dmitry 'Diman_YES' Kovalioff 21 Jun 2004 22:21 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 Hm-hm-hm Dmitry "Logam" Kobelev [TSOGU] 9 Jan 2009 00:41 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. |