|
|
back to boardwhat's the trick? 3% of the ac rating..... what's the trick? 3% of the ac rating..... A lot of wrong tests - is all you need for low AC rating. I don't find mistakes in my program, but WA6 too my prog returns: 10.0 1.0 1000000 179000001 10.0 9.9 1 1 1.1 1.0 12345 123456 10.0 10.0 10 0 "Impossible" answer never returns
4.4 4.3 1000000 Maybe 14926? My AC program outputs 29851 How did you got that??? I use n*(y-x)/(1-y) (14926+4.4*1000)/(14926+1000000)=4.34999793088.. ((14926+4.4*1000)/(14926+1000000)):0:1=4.3 Edited by author 07.10.2006 21:08 You formula is incorrect. What if y == 1.0 ??? You are dividing by 0 ? y:=y+0.05-eps without rounding 1.0 will not be achieved Edited by author 07.10.2006 21:21 first: not (14926+4.4*1000)/(14926+1000000)=4.34999793088.. but (14926+4.4*1000000)/(14926+1000000)=4.34999793088.. second: not (14926+4.4*1000)/(14926+1000000)=4.34999793088.. but (14926+4449999)/(14926+1000000)=4.399261621 third: (29851+4449999)/(29851+1000000)=4.349998204 Yes you are right - i've made mistake while printing: 1000 -> 1000000, Thank you but i don't understand how we should compute not rounded X value I think that this task more harder than it seems after first reading:)
Edited by author 07.10.2006 22:45 x*n can be X=(x+.05)*n while (X/n>=x+0.05)X-- Edited by author 08.10.2006 00:45 mine is also 29851, but i still wa@6. I used y=y+0.05 in my program and get WA6. Why x should be increased x=x+0.05? 1.1 1.0 12345 My prog:24676 But Ihave Wa11 1.1 1.0 12345 My prog:24676 But Ihave Wa11 Can't understand Ans ((1.149999999) * 12345 + 24676) / (12345 + 24676) > 1.5 My Ans is 24692 for test 1.1 1.0 12345 rigth answer IMHO 24676, 24676 < 123456 my AC program works on this test cases 4.4 3.4 12478 5094 10 3.4 23577 63033 9.9 8.3 1000000 217687 4.6 1.2 12997 176760 6.6 2.2 44766 157576 10 1 2 359 2 1.9 1000000 105263 Edited by author 18.10.2006 02:45 Ivanidze, did you get AC? 9.9 8.3 1000000 217688 - 217687 makes into over 8.35 -> 8.4 6.6 2.2 44766 157577 - 157576 makes into over 2.25 -> 2.3 2.0 1.9 1000000 105264 - 105263 makes into over 1.95 -> 2.0 9.9 8.3 1000000 217688 - 217687 makes into over 8.35 -> 8.4 6.6 2.2 44766 157577 - 157576 makes into over 2.25 -> 2.3 2.0 1.9 1000000 105264 - 105263 makes into over 1.95 -> 2.0 Really? I think you are mistaken. For example: 6.6 2.2 44766 x<6.65=>x*n<6.65*n=297693.9 MAX(x*n)=297693, not 297694 because 297694/44766=6.6500..->6.7 (297693+157576)/(44766+157576)=2.24999752....->2.2 I suppose 9.9 8.3 1000000 217687 6.6 2.2 44766 157576 2.0 1.9 1000000 105263
Edited by author 10.10.2006 18:54 May be this test is useful. At least, it helped me :) 7.8 2.3 100 407 In this snare (x+0.05)*n is integer. In this case we should use (x+0.05)*n-1. Thank you. I had: "... SI:=(ceil((x+0.05)*n)-1)*100; ..." And now I have "... SI:=(ceil((x+0.05)*n-1e-10)-1)*100; ..." AC I think 7.8 2.3 100 must be 408. Am I right? AC rating became 2% try to submit your code 50 times and you'll get AC:))) How many times do I need to submit to get 1% rating??) Edited by author 22.02.2016 19:36 |
|
|