提交记录
#include<bits/stdc++.h>
using namespace std;
string tin[5],tout[5];
int f;
int main(){
ios::sync_with_stdio(false);
int t,n,m;
cin>>t>>n>>m;
for(int i=1;i<=m;i++){
string s;
cin>>s;
tin[i]="freopen(\""+s+".in\",\"r\",stdin);";
tout[i]="freopen(\""+s+".out\",\"w\",stdout);";
}
for(int i=1;i<=n;i++){
f=1;
for(int j=1;j<=m;j++){
string si,so;
cin>>si>>so;
if(si!=tin[j]&&f==1){
if(si.substr(0,10)=="//freopen("&&si.find(");")!=-1){
f=2;
}else{
f=3;
}
}
if(so!=tout[j]&&f==1){
if(so.substr(0,10)=="//freopen("&&so.find(");")!=-1){
f=2;
}else{
f=3;
}
}
}
if(f==1){
cout<<"PION2202 RP++."<<endl;
}else if(f==2){
cout<<"Wrong file operation takes you to your ancestors along with your 3 years' efforts on OI."<<endl;
}else{
cout<<"Good luck and have fun."<<endl;
}
}
}