Untitled diff

Created Diff never expires
1 removal
26 lines
1 addition
26 lines
#include <bits/stdc++.h>
#include <bits/stdc++.h>
using namespace std;
using namespace std;
int main(int argc, char const *argv[]) {
int main(int argc, char const *argv[]) {
#ifndef ONLINE_JUDGE
#ifndef ONLINE_JUDGE
freopen("in", "r", stdin);
freopen("in", "r", stdin);
#endif
#endif
int n,m,num; cin>>n>>m;
int n,m,num; cin>>n>>m;
for(int i=0; i<n; i++) {
for(int i=0; i<m; i++) {
int k; cin>>k;
int k; cin>>k;
vector<int> arr(k);
vector<int> arr(k);
unordered_map<int, bool> mp;
unordered_map<int, bool> mp;
for(int i=0; i<k; i++) {
for(int i=0; i<k; i++) {
cin>>arr[i];
cin>>arr[i];
mp[arr[i]] = 1;
mp[arr[i]] = 1;
}
}
bool f = 0;
bool f = 0;
for(int i=0; i<k && !f; i++) {
for(int i=0; i<k && !f; i++) {
if(mp.count(-arr[i])) {
if(mp.count(-arr[i])) {
f = 1; break;
f = 1; break;
}
}
}
}
if(!f) {
if(!f) {
cout<<"YES\n"; return 0;
cout<<"YES\n"; return 0;
}
}
} cout<<"NO\n";
} cout<<"NO\n";
}
}