Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
请问,这代码错在哪啊,忘牛人指点#include "stdio.h" #include "stdlib.h" #define N 1001 int main(){ int test; int i=0,n,k,j=0; int x[N]; int a,b;char c; scanf("%d",&test); for(i=0;i<test;i++) { for(j=0;j<N;j++) x[j]=0; scanf("%d",&n);fflush(stdin); for(j=0;j<n;j++) { fflush(stdin); scanf("%c%d%d",&c,&a,&b); for(k=a;k<b;k++) x[k]=x[k]+1; } for(j=0;j<N;j++) if(x[j]>0) printf("%c",'A'+x[j]-1); printf("\n"); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator