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:我觉的我的方法比大家简单多了,提交却是WA,有那位高手能指点一下吗?

Posted by hnlwt123 at 2008-07-31 20:05:28 on Problem 1028
In Reply To:我觉的我的方法比大家简单多了,提交却是WA,有那位高手能指点一下吗? Posted by:adam123 at 2007-07-05 19:26:10
> # include <stdio.h>
> int main()
> {
> 	static char a[102][72]={{"http://www.acm.org/"}},b[8];
> 	int i,j;
> 	for(i=0;;)
> 		{
> 			scanf("%s",b);
> 			if(*b=='Q')
> 				break;
> 			else if(*b=='V')
> 			{
> 				i++;
> 				scanf("%s",a[i]);
> 				printf("%s\n",a[i]);
> 				for(j=i+1;j<102;j++)
> 					*a[j]=0;
> 			}
> 			else if(*b=='B')
> 			{
> 				i--;
> 				if(i>=0)
> 				printf("%s\n",a[i]);
> 				else {i++;
> 					printf("Ignored\n");
> 					}
> 			}
> 			else if(*b=='F')
> 			{
> 				i++;
> 				if(*a[i]!='\0')
> 				printf("%s\n",a[i]);
> 				else printf("Ignored\n");
> 			}
> 		}
> 	return 0;
> }
> 
> 

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