|
|
вернуться в форумПоказать все сообщения Спрятать все сообщенияMy solution with O(n*x) get AC in 0.171. However for max test it would have 15000*32000=480 000 000 iterations. On my not so fast PC(ADM 1800+) it works 1 - 1.3 sec, so i think it wouldn't pass TL of 0.25sec. The test is: 15000 32000 1 32000 2 32000 3 .......... 32000 15000 Very good information. Admins should pay attention on it. This question about real effectivness of our algorithms. Edited by author 01.07.2007 10:41 Edited by author 01.07.2007 10:41 Nevertheless some other algo with complexivity O(n^2) works well... ... which is quite sad for the ones that spent all eternity, which means about 10 minutes, to write the most straight-forward index tree and produce an N*logN algorithm... 10 minutes are not forever eternity are days, months, years, centuries, millennia ... |
|
|