首页 > 代码库 > mode-c++

mode-c++

JYW友情馈赠。

 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <algorithm> 5 #define lx 2000 6 using namespace std; 7  8 struct edge{ 9     int u,v,next;10 }eg[maxm];11 12 int mm(int a,int b, int &c){ return 0; }13 14 int main(){15 16     freopen("stdin.in","r",stdin);17     freopen("stdout.out","w",stdout); //文件输入输出18 19     int cas,n;20     scanf("%d",&cas);21     while (cas--){22     }  //处理多组数据23 24     char vac[lx][lx];25     scanf("%d",&n);26     scanf("%c",&vac[0][0]);27     for (int i=1;i<=n;i++) scanf("%s",vac[i] + 1);//读入字符串28     29     int k[lx];30     scanf("%d",&n);31     for (int  i=1;i<=n;i++) scanf("%d",k+i);32     sort(k+1,k+n+1);  //从1到n默认从小到大排序33     34     fclose(stdin); fclose(stdout);35     exit(0); //退出整个程序,fclose可不写36     37     int a=0,b;38     b=a++; printf("a=%d b=%d\n",a,b);39     b=++a; printf("a=%d b=%d\n",a,b); //前者是先赋值后加,后者先加后赋值40     41     int p;42     scanf("%d",&p);43     switch (p){44         case 0:45         case 1:46         case 2:printf("Orz Jry\n"); break;47         case 3:printf("Orz Jc\n"); break;48         case 4:49         case 5:printf("Orz Dzy\n"); break;50     } //相当于case,但是单独一个case:右边一定要加break,不然会执行其他case51 52     return 0;53 }

 

mode-c++