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

为什么ce呢

Posted by fnoi11bfsyue at 2016-09-16 22:01:53 on Problem 1028 and last updated at 2016-09-16 22:09:20
/*
Main.cpp
LINK : fatal error LNK1104: cannot open file 'lnk8FD.tmp'
*/
#include<cstdio>
#include<cstring>
char str[10],a[110][77]={"http://www.acm.org/"};
int i,l;
int main(){
	//freopen("poj1028.in","r",stdin);
	i=l=0;
	while(1){
		scanf("%s",str);
		if(strcmp(str,"VISIT")==0){
			l=i++;
			scanf("%s",a[i]);
			printf("%s\n",a[i]); 
		}
		if(strcmp(str,"BACK")==0){
			i--;
			if(i>=0)printf("%s\n",a[i]);
			else{printf("Ignored\n"); i++;}
		}
		if(strcmp(str,"FORWARD")==0){
			i++;
			if(i-1<=l)printf("%s\n",a[i]);
			else{printf("Ignored\n"); i--;}
		}
		if(strcmp(str,"QUIT")==0)return 0;
	}
	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