| ||||||||||
| 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 | |||||||||
Re:n 是可以等于0的 !In Reply To:2894求教 Posted by:xuezhimeng at 2006-07-25 16:38:15 > 我的程序老是
> Presentation Error
> 这是怎么回事啊?谁能帮助我啊?不甚感激!
> //Presentation Error????????????????????
> #include<stdio.h>
> #include<iostream>
> using namespace std;
>
> int main()
> {
> int t;
> int i,j,k;
> scanf("%d",&t);
> for(i=0;i<t;i++)
> {
> k=0;
> int n;
> scanf("%d",&n);
>
> if(n > 0 && n<=26)
> {
> int c[1005];
>
> int max=0,min=0;
> int a,b;
> char ch;
> int sum=0;
>
> for(j=0;j<1005;j++)
> c[j] = 0;
>
> cin>>ch>>a>>b;
> c[a] += 1;
> c[b] += -1;
> min=a;
> max=b;
>
> for(j=1;j<n;j++)
> {
>
> cin>>ch;
> cin>>a>>b;
> c[a] += 1;
> c[b] += -1;
>
> if(max < b)
> max = b;
> if(min > a)
> min=a;
> }
> for(j=min;j<=max;j++)
> {
> sum += c[j];
> if(sum!=0)
> {
> ch=sum+'A'-1;
> printf("%c",ch);
> }
> }
> 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