| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 893080 | Macker | Poi (IOI09_poi) | C++17 | 181 ms | 8904 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
 
using namespace std;
typedef long long ll;
typedef long double ld;
#define all(v) v.begin(), v.end()
//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx2")
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n, p, o; cin >> n >> p >> o; o--;
    vector<vector<bool>> c(n, vector<bool>(p)); vector<int> t(p);
    vector<tuple<int, int, int>> res(n);
    for (int i = 0; i < n; i++) {
        get<2>(res[i]) = i;
        for (int j = 0; j < p; j++) {
            int a; cin >> a;
            if(a == 0){
                t[j]++;
            }
            else{
                get<1>(res[i])--;
            }
            c[i][j] = a;
        }
    }
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < p; j++) {
            get<0>(res[i]) -= c[i][j] * t[j];
        }
    }
    sort(all(res));
    for (int i = 0; i < n; i++) {
        if(get<2>(res[i]) == o){
            cout << -get<0>(res[i]) << " " << i + 1 << "\n";
        }
    }
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
