| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 921526 | josanneo22 | Poi (IOI09_poi) | C++17 | 181 ms | 16196 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#pragma warning(suppress : 4996)
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define L(i,j,k) for(int i=(j);i<=(k);++i)
#define R(i,j,k) for(int i=(j);i>=(k);--i)
#define all(x) x.begin(),x.end()
#define me(x,a) memset(x,a,sizeof(x))
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr); cout.tie(nullptr);
    int N, M; int id;  cin >> N >> M >> id;
    vector<int> people_not_scoring(M + 1, N);
    vector<vector<int>> a(N + 1, vector<int>(M + 1));
    L(i, 1, N) {
        L(j, 1, M) {
            cin >> a[i][j];
            people_not_scoring[j] -= (a[i][j]);
        }
    }
    vector<i64> score(N + 1);
    L(i, 1, N) L(j, 1, M) score[i] += a[i][j] * people_not_scoring[j];    
    vector<int> ord(N);
    iota(all(ord), 1);
    sort(all(ord), [&](int i, int j) {
        if (score[i] == score[j]) return i < j;
        return score[i] > score[j];
    });
    L(i, 0, N - 1) {
        if (ord[i] == id) {
            cout << score[id] << ' ' << i + 1 << '\n';
            return 0;
        }
    }
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
