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<iostream> #include<stdlib.h> int qf(const void* a,const void *b) { return *(int*)a-*(int*)b; } using namespace std; int main() { int i,j,k,m,n,max,min,total,t; int a[280],b[280],sum; char c; cin>>m; while(m--) { min=1001;max=0; cin>>n; for(i=1;i<=n;i++) cin>>c>>a[i]>>b[i]; qsort(a+1,i-1,4,qf); qsort(b+1,i-1,4,qf); min=a[1]; max=b[i-1]; sum=0;k=1;t=1; for(i=min;i<=max;i++) { if(i==a[t]) {sum++;t++;} if(i==b[k]) {sum--;k++;} c=sum+64; if(sum==0) continue; else cout<<c; } cout<<endl; } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator