| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 383303 | Iwanttobreakfree | Poi (IOI09_poi) | C++17 | 752 ms | 24044 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
	long long int n,t,p;
	cin>>n>>t>>p;
	p--;
	vector<pair<long long int,pair<long long int,long long int> > > puntos(n);
	int task[n][t];
	for(int i=0;i<n;i++){
	puntos[i].second.second=n-i;
	puntos[i].first=0;
	puntos[i].second.first=0;	
	}
	for(int i=0;i<n;i++){
		for(int j=0;j<t;j++){
			cin>>task[i][j];
		}
	}
	for(int i=0;i<t;i++){
		int cont=0;
		for(int j=0;j<n;j++){
			if(task[j][i]==0)cont++;
		}
		for(int j=0;j<n;j++){
			if(task[j][i]==1){
			puntos[j].first+=cont;
			puntos[j].second.first++;	
			}
		}
	}
	cout<<puntos[p].first<<' ';
	sort(puntos.rbegin(),puntos.rend());
	for(int i=0;i<n;i++){
		if(puntos[i].second.second==n-p)cout<<i+1;
		//cout<<puntos[i].first<<' '<<puntos[i].second.first<<' '<<puntos[i].second.second<<'\n';
	}
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
