|
|
back to boardTLE Posted by Viktor 17 Dec 2012 20:19 Don't use cin/cout or Scanner in java. Re: TLE Seriously? 10^5, it's so few! Only cin, only hardcore! You shoudn't use cin/cout in every problem, in which n is big enough(n > 1000, for example) Edited by author 17.12.2012 23:02 Re: TLE Posted by ASK 15 Feb 2014 15:21 cin/cout is not TLE, as long as you do cin.sync_with_stdio(false); Re: TLE Yes, you may think that the number of edge can be as large as n * (n - 1) / 2, which is O(n^2), where n is the number of vertex of the graph. (10^5)^2 = 10^10. is a rather large scale data for 1 second. |
|
|