|
|
The test lasts 8 sec on my PC. But I got AC in 0.1 sec. I want to know if my PC is too slow or my compiler optimization not working. Thanks, Ade input: first line: 5000 2500 second line is : 1500 "1", 2000 "2", 1500 "3" third line is: 2500 1250 output: 14243163 My AC program also gives this result. I don't think the tests for the problem are very hard. Using Haskell my program solves this in about 0.5 secs but gets an AC in .031 secs (which I think is the lowest time you can get now), so they could definitely make the problems harder. I don't know, my program passes this test in 0.001341s. on my local PC. I got AC in 0.015s. The tests for this program are probably just fine. The Haskell program could be compiled without optimizations or someone has a wooden PC. Any suggestions about test 8 data? It would be great, if somebody can provide corner case test. Thanks. Edited by author 14.10.2012 16:33 Edited by author 14.10.2012 16:33 7 6 1 1 1 1 1 5 5 1 3 Answer is 3. have you more than 3? why 3? {1,2,3,4,5,6} {1,2,3,4,5,7} {1,2,3,4,6,7} {1,2,3,5,6,7} {1,2,4,5,6,7} {1,3,4,5,6,7} dw bout him. My AC solution gives 6. Does non-decreasing mean that is an increasing sequence of numbers? "non-decreasing" includes the possibility that some numbers are equal to the prior number. |
|
|