Submission #499486

#TimeUsernameProblemLanguageResultExecution timeMemory
499486AramJKutije (COCI21_kutije)C++14
0 / 70
22 ms32136 KiB
#include <iostream> #include <map> using namespace std; int main(){ int n,m,q; cin>>n>>m>>q; int c[n]; pair<int,int>pa[n]; for(int i=0;i<n;i++){ cin>>c[i]; pa[i].first=i+1; pa[i].second=c[i]; } int h,f; string a[q]; for(int i=0;i<q;i++){ cin>>h>>f; if(h==pa[i].first&&f==pa[i].second) { a[i]="DA"; } else if (h==pa[i].second&&f==pa[i].first){ a[i]="DA"; } else{ a[i]="NE"; } } for(int i=0;i<q;i++){ cout<<a[i]<<endl; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...