以下算法的时间复杂度()voidmatrimult(inta[M][N],intb[N][L],intc[M][L])//{inti,j,k;for(i=0;i
A: O(n*l)
B: O(m*l)
C: O(m*n)
D: O(m*n*l)
A: O(n*l)
B: O(m*l)
C: O(m*n)
D: O(m*n*l)
举一反三
- 【单选题】以下算法的时间复杂度() void matrimult(int a[M][N],int b[N][L],int c[M][L]) // { int i,j,k; for(i=0;i<M;i++) for(j=0;j<L;j++) c[i][j]=0; for(i=0;i<M;i++) for(j=0;j<L;j++) for(k=0;k<N;k++) c[i][j]+=a[i][k]*b[k][j]; } A. O(n*l) B. O(m*l) C. O(m*n) D. O(m*n*l)
- The 3rd homeworkListen to the following, spell the words in English and translate into Chinese._________________ [ʃeip]• _________________['traiæŋɡl]• ____________[raund]• _______________ ['əuvl]• _______________ [hɑ:t]• _______________ [stɑ:(r)]• _______________ [riŋ]• _______________ [ˈrektæŋɡl]• __________[skweə(r)]• _______________ ['daiəmənd]• _______________ [kju:b]• _______________ [kəʊn]_______________ ['kʌlə(r)]• _______________ [(h)wait] _______________ [blæk]• _______________ ['jeləu] _______________ [ɡri:n]• _______________ [red] _______________ ['silvə(r)]• _______________ ['ɡəuldən] _______________ [piŋk]• _______________ [braun] _______________ [blu:]• _______________ ['pə:pl] _______________ [ɡrei]• _______________ ['aivəri]_______________ [məˈtiəriəl]• _______________ ['leðə(r)] _______________ [klɔθ]• _______________ ['plæstik] _______________ ['rʌbə(r)]• _______________ [ˈmetl] _______________ [wud]_______________ ['tekstʃə(r)]• _______________ [sɔft]• _______________ [hɑ:d]• _______________ ['tendə(r)] _______________ [rʌf]• _______________ [smu:ð] _______________ ['stiki]_______________ [weit ənd ˈvɔlju:m]• _______________ ['sentiˌmi:tə] =(cm)• _______________ ['miliˌmi:tə] =mm• _______________ ['kiləˌmi:tə]=km• _______________ [intʃ] (1 _____ =25.4mm)• _______________ [mail] (1_____=1.609km)• _______________ [ɡræm]=g• _______________ [ˈkiləgræm] =kg.• _______________[paund] (1______=0.4536kg)• _______________ [tʌn](1______ =1000kg)
- 输出一个二维数组b[m][n]中所有元素值的时间复杂度为( )。 A: O(n) B: O(m+n) C: O(m) D: O(m*n)
- 分析下面程序段的时间复杂度: for (i=0; i<n; i++) for (j=0; j<m; j++) A[i][j]=0;[/i] A: O(m*n) B: O(m*m) C: O(m) D: O(n*n)
- 下面程序段的时间复杂度是()。for (i=0;i<n;i++) for (j=0;j<m;j++) A[i][j]=0;[/i] A: O(m*n) B: O(m) C: O(n) D: O(n*n)