| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 289692 | b00n0rp | Poi (IOI09_poi) | C++17 | 312 ms | 23800 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector <int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> ii;
#define pb push_back
#define INF 100000000
#define mp make_pair
int main() {
	
	ios::sync_with_stdio(false);
	int n,t,p;
	cin >> n >> t >> p;
	int a[n+1][t+1],td[n+1],tv[t+1],pnt[n+1];
	//td - tasks_done, tv - tasks_value, pnt - points
	fill(td,td+n+1,0);
	fill(tv,tv+t+1,0);
	fill(pnt,pnt+n+1,0);
	for (int i = 1; i <= n; i++){
	    for (int j = 1; j <= t; j++){
	        cin >> a[i][j];
	        if (a[i][j]){
	            td[i] ++;
	        }
	        else{
	            tv[j] ++;
	        }
	    }
	}
	for (int i = 1; i <= n; i++){
	    for (int j = 1; j <= t; j++){
	        if (a[i][j]){
	            pnt[i] += tv[j];
	        }
	    }
	}
	int phil = pnt[p],rank = 1,tdp = td[p];
	cout << phil << " ";
	for (int i = 1; i <= n; i++){
	    if (i == p) continue;
	    else if (pnt[i] < phil) continue;
	    else if (pnt[i] > phil) rank ++;
	    else{
	        if (td[i] < tdp) continue;
	        else if (td[i] > tdp) rank ++;
	        else{
	            if (i < p) rank ++;
	        }
	    }
	}
	cout << rank << endl;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
