听取WA声一片求助
查看原帖
听取WA声一片求助
615166
zhouzihang3楼主2023/3/24 19:05
#include<iostream>
using namespace std;
int n,m,lxbook[2018];
string a[1010],b[2068],c[2068];
int main(){
	cin>>n;
	cin>>n>>m;
	for(int i=0;i<m;i++){
		cin>>a[i];
		b[2*i]+="freopen(";
		b[2*i]+='"';b[2*i]+=a[i]+".in"+'"'+','+'"'+'r'+'"'+','+"stdin);";
		b[2*i+1]+="freopen(";
		b[2*i+1]+='"';b[2*i+1]+=a[i]+".out"+'"'+','+'"'+'w'+'"'+','+"stdout);";
	}
	for(int i=0;i<n;i++){
		for(int j=0;j<2*m;j++){
			cin>>c[j];
			if(c[j]!=b[j]){
				int len=c[j].size();
				if(lxbook[i]!=0&&lxbook[i]!=1){
					continue;
				}
				if(c[j]=="//"+b[j]){
					lxbook[i]=2;
				}else{
					lxbook[i]=1;
				}
			}
		}
	}
	for(int i=0;i<m;i++){
		if(lxbook[i]==1){
			cout<<"Good luck and have fun."<<endl;
		}else if(lxbook[i]==2){
			cout<<"Wrong file operation takes you to your ancestors along with your 3 years' efforts on OI."<<endl;
		}else{
			cout<<"PION2202 RP++."<<endl;
		}
	}
	
	return 0;
}

啊听取WA声一片到底错哪了

2023/3/24 19:05
加载中...