约定:
所有的网址都没有空格,最长的网址为70
总的操作次数不超过1000
原代码:
#include<iostream>
#include<iomanip>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<string>
#include<stdlib.h>
#include<time.h>
//#include<bits/stdc++.h>
#include<stack>
#include<queue>
#include<deque>
using namespace std;
string a[1001];
string b;
int main(){
a[0]="http://www.hzxjhs.com/";
int j=1;
while(cin>>b){
if(b=="VISIT"){
cin>>a[j];
cout<<a[j]<<endl;
j++;
}else if(b=="BACK") cout<<a[--j]<<endl;
else if(b=="FORWARD") cout<<a[++j]<<endl;
else if(b=="QUIT") break;
else cout<<"Ignored"<<endl;
}
return 0;
}
结果(全错):
compiled successfully
time: 7ms, memory: 3544kb, score: 0, status: Wrong Answer
> test 1: time: 1ms, memory: 3532kb, points: 0, status: Wrong Answer
> test 2: time: 0ms, memory: 3540kb, points: 0, status: Wrong Answer
> test 3: time: 2ms, memory: 3392kb, points: 0, status: Wrong Answer
> test 4: time: 1ms, memory: 3400kb, points: 0, status: Wrong Answer
> test 5: time: 1ms, memory: 3532kb, points: 0, status: Wrong Answer
> test 6: time: 0ms, memory: 3440kb, points: 0, status: Wrong Answer
> test 7: time: 0ms, memory: 3304kb, points: 0, status: Wrong Answer
> test 8: time: 1ms, memory: 3532kb, points: 0, status: Wrong Answer
> test 9: time: 1ms, memory: 3544kb, points: 0, status: Wrong Answer
> test 10: time: 0ms, memory: 3376kb, points: 0, status: Wrong Answer
请改一改,谢谢。