|
|
вернуться в форумDon't use cin/cout or Scanner in java. 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 cin/cout is not TLE, as long as you do cin.sync_with_stdio(false); 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. |
|
|