要得到某个结果,可以有很多种方式,算法就是为了寻找一条最快的方式. 而评判其好坏的标准就是时间复杂度. O(1): 我们把执行一次的时间复杂度定义为O(1) sum = a +b; cout << sum <<endl; O(n): for(int i = 0; i < n ;++n) { //do something. } O(n2): for(int i = 0; i < n ;++n) { for(int j = 0; j < n ;++n) { //do
Oulipo Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 36916 Accepted: 14904 Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quot