Show all threads Hide all threads Show all messages Hide all messages  About Statement  Felix_Mate  1822. Hugo II's War  5 Feb 2017 21:09  1  "King Hugo II wants to state the number x in his recruitment order. The king needs as many soldiers as possible for his military campaign. However, if the recruitment takes more than t days, the enemy may learn about the imminent intrusion and strike first. Help Hugo II find the maximal possible value of x." We must find "maximal possible value of x" with "if the recruitment takes more than t days, the enemy may learn about the imminent intrusion and strike first" without "The king needs as many soldiers as possible for his military campaign"!!!  Why need long long type?  666666  1822. Hugo II's War  15 Mar 2015 21:45  1  I got WA at #4 by using int type but got AC by using long long I don't understand... I think the max of date is 1e6(maybe n=1e4 and every ti=100, in this way the sum time is 1e6 and it's max) Am I wrong? Who can tell me plz Edited by author 15.03.2015 21:47  What a test 14?  SS123  1822. Hugo II's War  9 Jun 2013 18:38  1  Give some tests, please...  WA#7  Oyster  1822. Hugo II's War  22 Sep 2011 20:41  2  WA#7 Oyster 20 Sep 2011 01:01 I keep getting WA for test #7, any tips? Sorry, my fault  I was handling input data incorrectly, hoping on certain nodes order. Got AC after fix :) Edited by author 27.09.2011 20:37 Edited by author 27.09.2011 20:38  any hint?  Pavel  1822. Hugo II's War  12 Sep 2011 14:25  5  Hi, as I understand, this is a problem on dynamic programming. I see only one solution  go through the whole tree and compute the values for each node from the leaves up to the root of the tree. And on each level the full search should be done. For example, if we want to compute value for a node with p childs with already computed x_1, x_2, .., x_p values, then try 1/p, 2/p, ... p/p as a possible solution for this node. please, give me any hint on this problem. Edited by author 29.03.2011 20:27 Re: any hint? Vedernikoff 'Goryinyich' Sergey (HSE: АОП) 29 Mar 2011 21:43 Try to think about how the answer for every node (and for the whole tree) depends on x? A hint Artem Khizha [DNU] 1 Apr 2011 02:13 Use dichitomy (binary search), Luke! ОK, what answer to this test: 106 10 1 1 1 5 1 5 1 5 1 5 2 1 ... 2 1 (70 times: 2 1) 2 100 ... 2 100 (30 times: 2 100) The answer is 80.0000000, but I think, it's incorrect a little bit. Because it is said in the condition "the king needs as many soldiers as possible". If x = 80, then the king will have only 4 soldiers, while if x = 70, the king will have 74 soldiers. So I thought binary search doesn't work there, i.e. the numebr of soldiers is more important, than the total time of preparing to the war (the only thing is necessary is the total time should be not greater than max allowed time). But it's not true. The most important is to maximize the percent in the answer.  WA#6  Elday  1822. Hugo II's War  4 Sep 2011 19:26  2  WA#6 Elday 10 Apr 2011 01:33 Maybe, someone can help with test? =) In test #6, a nobelman might have some vassals, whose numbers are greater than himself. Good luck.  Checker is fixed (+)  Samsonov Alex [USU]  1822. Hugo II's War  20 Mar 2011 00:31  1  We do apologize for this error. The runs from the contest are rejudged.  What is right answer for n=1?  olpetOdessaONU [1 2/3]  1822. Hugo II's War  19 Mar 2011 18:03  4  No :D Should be 100.00000000 Bad checker... I've got so much penalty time...  WA #1  2rf  1822. Hugo II's War  19 Mar 2011 16:36  7  WA #1 2rf 19 Mar 2011 15:57 I write in Java, I know that answer for test 1 is 50, and even when I add following lines to my code: if (Math.abs(l  50) > 1e4) { while (true); } out.printf("%.9f", l); I recieve WA. What can be wrong? Re: WA #1 daftcoder [Yaroslavl SU] 19 Mar 2011 16:17 Same strange thing. I AC'eed this problem several days ago from 2nd try. But there is something... strange. Great, it's not only me. Can admins make some statement about this problem? Can you at least show me what my program outputs at test #1 ? Is the 1st test equal to the sample? I'm not sure, first two numbers in test 1 are "6 3", but I was lazy to check it further. Most probably, 1st test is sample. Re: WA #1 KIRILL(Arkhangelsk  PomorSU) 19 Mar 2011 16:34 test 1 is same as sample checker is wrong seems it compares answers as strings Edited by author 19.03.2011 16:40 Thanks a lot. For all who wants to solve this problem right now: output your answer with exactly 8 digits after decimal point. Edited by author 19.03.2011 16:36 

