Submission #798443

#TimeUsernameProblemLanguageResultExecution timeMemory
798443XJP12Best Place (NOI17_bestplace)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vii; int main(){ int n; vector<pair<int,int>> v; for(int i=0; i<n; i++){ int a,b; cin>>a,b; v.push_back({a,b}); } cout<<a<<" "<<b<<endl; }

Compilation message (stderr)

bestplace.cpp: In function 'int main()':
bestplace.cpp:11:11: warning: right operand of comma operator has no effect [-Wunused-value]
   11 |   cin>>a,b;
      |           ^
bestplace.cpp:14:8: error: 'a' was not declared in this scope
   14 |  cout<<a<<" "<<b<<endl;
      |        ^
bestplace.cpp:14:16: error: 'b' was not declared in this scope
   14 |  cout<<a<<" "<<b<<endl;
      |                ^