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

求助

Posted by Eldor at 2014-08-30 18:52:05 on Problem 1007
#include<stdio.h>
int main()
{
	int m,n,nk;
	scanf("%d %d",&nk,&m);
	n=nk+1;
	char dna[m][n];
	char dna_x[m][m];
	int i,j,k,h,r,t;
	for(i=0;i<m;i++)
	
	{
		for(j=0;j<n;j++)
			scanf("%c",&dna[i][j]);
			}
			

	 for(k=0;k<m;k++)
	{
		 if((k%2==0)&&(k!=1))
	 {
		 for(h=0;h<n;h++)
		 dna_x[k+1][h]=dna[k][h];	
		 }
	else
	{
		for(h=0;h<n;h++)
		 dna_x[k-1][h]=dna[k][h];				
		
		}
	     }
	   
   for(r=m-1;r>=0;r--)
   {
	   for(t=0;t<n;t++)
	   printf("%c",dna_x[r][t]);
   }

	   
	return 0;
	
	}

我在GCC里调 没问题
提交后就是出错、、

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