Submission #545299

# Submission time Handle Problem Language Result Execution time Memory
545299 2022-04-04T08:20:51 Z Trisanu_Das Best Place (NOI17_bestplace) C++17
Compilation error
0 ms 0 KB
#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

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