中国大学MOOC: @for(fa(i):@sum(sh(j):x(i,j))>=a(i));所对应的下列模型中形式正确的是
举一反三
- 下面模型段语句表达错误的是 A: min=@sum(links(i,j):c(i,j)*x(i,j)); B: min=@sum(links:c*x); C: @for(vd(j):@sum(wh(i):x(i,j))=d(j)); D: @sum(vd(j):@for(wh(i):x(i,j))=d(j));
- 下面约束段语句表达正确的是 A: @for(wh(i):@sum(vd(j):x(i,j))<=a(i)); B: for(wh(i):@sum(vd(j):x(i,j))<=ai(i)); C: @for(wh(i):@sum(vd(j):x(i,j))<=a(i); D: @for(wh(i):sum(vd(j):x(i,j))<=ai(i));
- 中国大学MOOC: 以下代码的复杂度是( )。x=0; for(i=1; i for (j=i; j< n j span> x++;
- 中国大学MOOC: Dim i,j,x For i=i To 20 step 2 x=0 For j=i To 20 step 3 x=x+1 Next j Next i Textl.Value=Str(x)End Sub文本框中显示的结果
- 中国大学MOOC: 写出下面程序执行后的运行结果。#include <stdio.h>int main(){int x[]={1,3,5,7,2,4,6,0},i,j,k;for(i=0;i<3;i++)for (j=2;j>=i;j--)if(x[j+1]>x[j]) { k=x[j]; x[j]=x[j+1]; x[j+1]=k;}for(i=0;i<3;i++)for(j=4;j<7-i;j++)if(x[j+1]>x[j]) { k=x[j]; x[j]=x[j+1]; x[j+1]=k;}for (i=0;i<3;i++)for(j=4;j<7-i;j++)if(x[j]>x[j+1]) { k=x[j]; x[j]=x[j+1]; x[j+1]=k;}for (i=0;i<8;i++) printf("%d",x[i]); return 0;}