Submission #771900

#TimeUsernameProblemLanguageResultExecution timeMemory
771900BlockOGPoi (IOI09_poi)C++14
Compilation error
0 ms0 KiB
#include <iostream> using namespace std; /* 5 3 2 0 0 1 1 1 0 1 0 0 1 1 0 1 1 0 */ int solved[2000][2000]; int amt_solved[2000]; int not_solved[2000]; int score[2000]; int main() { int n, t, p; cin >> n >> t >> p; p--; for (int i = 0; i < n; i++) { for (int j = 0; j < t; j++) { cin >> solved[i][j]; if (solved[i][j]) amt_solved[i]++; else not_solved[j]++; } } for (int i = 0; i < n; i++) { for (int j = 0; j < t; j++) { if (solved[i][j]) score[i] += not_solved[j]; } } int place = 1; for (int i = 0; i < n; i++) { if (i == p) continue; if (score[i] > score[p]) place++; else if (score[i] == score[p]) { if (amt_solved[i] > amt_solved[p]) place++; else if (amt_solved[i] == amt_solved[p]) if (i < p) place++; } } cout << score[p] << ' ' << place << << endl; }

Compilation message (stderr)

poi.cpp: In function 'int main()':
poi.cpp:49:41: error: expected primary-expression before '<<' token
   49 |     cout << score[p] << ' ' << place << << endl;
      |                                         ^~