Submission #223353

#TimeUsernameProblemLanguageResultExecution timeMemory
223353tqbfjotldMatching (COCI20_matching)C++14
5 / 110
5 ms256 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n; scanf("%d",&n); vector<pair<pair<int,int>,int> >v; for (int x = 0; x<n; x++){ int a,b; scanf("%d%d",&a,&b); v.push_back({{a,b},x}); } sort(v.begin(),v.end()); printf("DA\n"); for (int x = 0; x<n; x+=2){ printf("%d %d\n",v[x].second+1,v[x+1].second+1); } }

Compilation message (stderr)

matching.cpp: In function 'int main()':
matching.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
matching.cpp:10:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d",&a,&b);
         ~~~~~^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...