Submission #499725

#TimeUsernameProblemLanguageResultExecution timeMemory
499725AbitoKutije (COCI21_kutije)C++14
0 / 70
815 ms2080 KiB
#include <bits/stdc++.h> using namespace std; pair<int,int> x[1000+15]; int main() { int n,m,q; cin>>n>>m>>q; for (int i=1;i<=n;i++) { x[i].first=i; } int l; for (int j=0;j<m;j++){ for (int i=1;i<=n;i++) { cin>>l; x[l].second=i; }} int a,b; while (q--) { cin>>a>>b; if (a==b) cout<<"DA"<<endl; else if (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...