checker

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
423 B
4
Indexable
Never
#include<bits/stdc++.h>
using namespace std;

int main(){
	int n, m;
	cin >> n>> m;
	vector<int> a(n+1);
	for(int i = 1; i <= n; i++){
		cin >> a[i];
	}
	while(m--){
		int x;
		bool good = 0;
		while(cin >> x && x!=0){
			//cout << x << " " <<abs(x) << endl;
			if(x*a[abs(x)]>0){
				good = 1;

			}
		}
		if(!good){
			cout << "WA" << endl;
			return 0;
		}
	}
	cout << "correct!" << endl;


}
Leave a Comment