Submission #499506

#TimeUsernameProblemLanguageResultExecution timeMemory
499506AbitoKutije (COCI21_kutije)C++17
0 / 70
857 ms17484 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n,m,q; cin>>n>>m>>q; map<int,pair<int,int>> x; for (int i=1;i<=n;i++) { x[i].first=i; } int c; for (int i=1;i<=n;i++) { cin>>c; x[c].second=i; } int a,b; string ans[q]; while (q--) { cin>>a>>b; if (x[a].first==b || x[a].second==b) { cout<<"DA"<<endl; } else cout<<"NE"<<endl; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...