Submission #532928

#TimeUsernameProblemLanguageResultExecution timeMemory
532928devariaotaStar triangles (IZhO11_triangle)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; map<int, int> mpx; map<int, int> mpy; pair<int, int> coor[n+5]; for(int i = 1; i<=n; i++) { int a, b; cin >> a >> b; coor[i] = {a, b}; mpx[a]++; mpy[b]++; } long long total1 = 0; for(int i = 1; i<=n; i++) { total1 += 1ll*mpx[coor[i].first]-1)*(mpy[coor[i].second]-1); } cout << total1 << endl; }

Compilation message (stderr)

triangle.cpp: In function 'int main()':
triangle.cpp:24:39: error: expected ';' before ')' token
   24 |     total1 += 1ll*mpx[coor[i].first]-1)*(mpy[coor[i].second]-1);
      |                                       ^
      |                                       ;