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

Re:为什么我在积极的机器上答案正确,可是却wrong answer??

Posted by joe_van at 2005-03-16 13:05:19 on Problem 1007
In Reply To:为什么我在积极的机器上答案正确,可是却wrong answer?? Posted by:maomaolxm at 2004-07-15 13:52:22
> #include <stdio.h>
> #define NAX 100
> #define MAX 1000
> void main()
> {
> 	int p,n,i,j,k,m,b[MAX];
> 	char a[NAX][NAX];
> 	printf("请给出DNA串的碱基数和串数,以空格隔开\n");
> 	scanf("%d %d\n",&n,&p);
> 	for(i=0;i<p;i++)
> 	{
> 		for(j=0;j<=n;j++)
> 		{
> 			scanf("%c",&a[i][j]);
> 		}
> 	}
> 	for(i=0;i<p;i++)
> 	{
> 		b[i]=0;
> 		for(j=0;j<n;j++)
> 		{
> 			for(k=j+1;k<n;k++)
> 			{
> 				if(a[i][j]>a[i][k])  b[i]++;
> 			}
> 		}
> 	}
> 	for(i=0;i<p;i++)
> 	{
> 		m=i;
> 		for(j=0;j<p;j++)
> 		{
> 			if(b[m]>b[j])
> 			{
> 				m=j;
> 			}
> 		}
> 		b[m]=MAX;
> 		for(k=0;k<n;k++)
> 		{
> 			printf("%c",a[m][k]);
> 		}
> 		printf("\n");
> 	}
> 	
> }
因为printf("请给出DNA串的碱基数和串数,以空格隔开\n");
   导致

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