| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
为什么ce呢/*
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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator