|
|
back to boardComplexity:O(N*LOG(N)),TIME:0,031 sec WHO IS BETTER??? Complexity:O(0),TIME:0 sec Can you tell me the idea how to solve the problem in O(n*log(n)) ? 770478 15:56:13 28 фев 2005 TECTOBOP 1019 Pascal Accepted 0.015 339 КБ 816394 15:41:20 8 апр 2005 Fu Dong 1019 Pascal Accepted 0.015 660 K My complexity is O(N^2), but I used Hash Table ,so the Time is 0.015 sec. 849412 00:19:10 17.05.2005 KingPin 1019 Pascal Accepted 0.015 173 КБ I used Cartesian tree. So, complexity is O(n*log(n)) |
|
|