Submission #545299

#TimeUsernameProblemLanguageResultExecution timeMemory
545299Trisanu_DasBest Place (NOI17_bestplace)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second int main(){ int n; cin >> n; pair<int, int> arr[n]; for(int i = 0; i < n; i++) cin >> arr[i].ff >> arr[i].ss; if(n == 2){ cout << arr[0].ff << ' ' arr[0].ss << '\n'; } }

Compilation message (stderr)

bestplace.cpp: In function 'int main()':
bestplace.cpp:10:29: error: expected ';' before 'arr'
   10 |     cout << arr[0].ff << ' ' arr[0].ss << '\n';
      |                             ^~~~
      |                             ;