# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
655599 | 2022-11-04T23:01:22 Z | horiseun | Poi (IOI09_poi) | C++11 | 270 ms | 12028 KB |
#include <iostream> #include <vector> #include <tuple> #include <algorithm> using namespace std; int n, t, p; bool solved[2005][2005]; int score[2005]; vector<tuple<int, int, int>> v; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cin >> n >> t >> p; for (int i = 1; i <= n; i++) { for (int j = 1; j <= t; j++) { cin >> solved[i][j]; } } for (int i = 1; i <= t; i++) { for (int j = 1; j <= n; j++) { score[i] += (!solved[j][i]); } } for (int i = 1; i <= n; i++) { int temp = 0, c = 0; for (int j = 1; j <= t; j++) { temp += (solved[i][j] ? score[j] : 0); c += solved[i][j]; } v.push_back({temp, c, i}); } sort(v.begin(), v.end()); for (int i = 0; i < v.size(); i++) { if (get<2>(v[i]) == p) { cout << get<0>(v[i]) << " " << i + 1 << "\n"; return 0; } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 340 KB | Output isn't correct |
2 | Incorrect | 0 ms | 340 KB | Output isn't correct |
3 | Incorrect | 0 ms | 340 KB | Output isn't correct |
4 | Incorrect | 0 ms | 332 KB | Output isn't correct |
5 | Incorrect | 0 ms | 340 KB | Output isn't correct |
6 | Incorrect | 1 ms | 332 KB | Output isn't correct |
7 | Incorrect | 1 ms | 468 KB | Output isn't correct |
8 | Incorrect | 1 ms | 468 KB | Output isn't correct |
9 | Incorrect | 1 ms | 476 KB | Output isn't correct |
10 | Incorrect | 4 ms | 728 KB | Output isn't correct |
11 | Incorrect | 8 ms | 1108 KB | Output isn't correct |
12 | Incorrect | 14 ms | 1620 KB | Output isn't correct |
13 | Incorrect | 41 ms | 2892 KB | Output isn't correct |
14 | Incorrect | 58 ms | 3972 KB | Output isn't correct |
15 | Incorrect | 100 ms | 5564 KB | Output isn't correct |
16 | Incorrect | 108 ms | 6092 KB | Output isn't correct |
17 | Incorrect | 163 ms | 7972 KB | Output isn't correct |
18 | Incorrect | 177 ms | 9128 KB | Output isn't correct |
19 | Incorrect | 237 ms | 11276 KB | Output isn't correct |
20 | Incorrect | 270 ms | 12028 KB | Output isn't correct |