# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
10093 | gs14004 | 대표 선수 (KOI11_player) | C++98 | 292 ms | 13504 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 <cstdio>
#include <algorithm>
#include <utility>
#include <vector>
using namespace std;
typedef pair<int,int> pi;
vector<pi> a;
int n,m;
int v[1005], cnt;
int main(){
int t;
scanf("%d %d",&n,&m);
for (int i=0; i<n; i++) {
for (int j=0; j<m; j++) {
scanf("%d",&t);
a.push_back(pi(t,i+1));
}
}
sort(a.begin(),a.end());
int ep = 0;
int res = 1e9;
for (int i=0; i<a.size(); i++) {
while (cnt < n && ep < a.size()) {
if(v[a[ep].second] == 0) cnt++;
v[a[ep].second]++;
ep++;
}
if(ep == a.size()) break;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |