Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

程序 Presentation Error ,谁能帮我看看啊,是什么问题?谢谢帮忙!

Posted by xuezhimeng at 2006-07-25 10:10:30
#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++)
	{
		char ch;
		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>>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 1;

}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator