| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 507595 | tabr | Poi (IOI09_poi) | C++17 | 201 ms | 16036 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#ifdef tabr
#include "library/debug.cpp"
#else
#define debug(...)
#endif
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n, m, p;
    cin >> n >> m >> p;
    p--;
    vector<vector<int>> a(n, vector<int>(m));
    vector<int> b(m);
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            cin >> a[i][j];
            b[j] += !a[i][j];
        }
    }
    vector<tuple<int, int, int>> c(n);
    for (int i = 0; i < n; i++) {
        get<2>(c[i]) = -i;
        for (int j = 0; j < m; j++) {
            get<0>(c[i]) += a[i][j] * b[j];
            get<1>(c[i]) += a[i][j];
        }
    }
    sort(c.rbegin(), c.rend());
    for (int i = 0; i < n; i++) {
        if (get<2>(c[i]) == -p) {
            cout << get<0>(c[i]) << " " << i + 1 << '\n';
        }
    }
    return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
