| ||||||||||
| 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 | |||||||||
2894总是WA 谁能给组错的测试数据或者给改一下啊#include<stdio.h>
#include<string.h>
int main(){
int i,j,m,n,k,x,y;
char a[1000],c,f;
int b[1000],d[1000],e[1000];
scanf("%d",&k);
n=0;
while(k--){
memset(b,0,sizeof(b));
scanf("%d",&m);
if(m==0)
continue;
getchar();
for(i=0;i<m;i++){
scanf("%c %d %d",&a[i],&d[i],&e[i]);
getchar();
if(n<e[i])
n=e[i];
}
for(i=0;i<m;i++){
x=d[i];y=e[i];
for(j=x;j<y;j++)
b[j]++;
}
for(i=1;i<n;i++){
for(j=1;j<=26;j++){
if(b[i]==j){
c=b[i]+'A'-1;
printf("%c",c);
break;
}
}
}
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