| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 221209 | tatyam | Poi (IOI09_poi) | C++17 | 157 ms | 8908 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
using tuplis = array<int, 3>;
#define name2(a,b,c,...) c
#define rep1(b) for(int i = 0; i < b; i++)
#define rep2(i,b) for(int i = 0; i < b; i++)
#define rep(...) name2(__VA_ARGS__,rep2,rep1)(__VA_ARGS__)
#define each(i,a) for(auto&& i : a)
#define all(a) begin(a), end(a)
int main(){
    int n, t, p;
    cin >> n >> t >> p;
    p--;
    vector<vector<bool>> a(t, vector<bool>(n));
    rep(n) rep(j, t){
        char c;
        while(~(c = getchar()) & 48);
        a[j][i] = c & 1;
    }
    vector<int> point(t);
    rep(t) point[i] = n - accumulate(all(a[i]), 0);
    vector<tuplis> b(n);
    rep(n){
        b[i][2] = i;
        rep(j, t) if(a[j][i]){
            b[i][0] -= point[j];
            b[i][1]--;
        }
    }
    sort(all(b));
    rep(n) if(b[i][2] == p) cout << -b[i][0] << ' ' << i + 1 << endl;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
