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 ldc_hust at 2009-09-03 21:59:56 on Problem 2894
#include<stdio.h>
int main(void)
{
	int t,n,i,max,min,j,count;
	int data[26][2];
	char ch;
	scanf("%d",&t);
	while(t)
	{
		t--;
		scanf("%d",&n);
		if(n == 0)
			continue;
		max=0;
		min=1001;
		for(i=0;i<n;i++)
		{
			getchar();
			scanf("%c%d%d",&ch,&data[i][0],&data[i][1]);
			if(max<data[i][1])
				max=data[i][1];
			if(min>data[i][0])
				min=data[i][0];
		}
		for(i=min;i<max;i++)
		{
			count=0;
			for(j=0;j<n;j++)
				if(i >= data[j][0] && i < data[j][1])
					count++;
			if(count)
				printf("%c",'A'+count-1);

		}
		printf("\n");
	}
	return 0;
}



//如果可以将原因发到我的POJ邮箱,本人不胜感激啊!

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