# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
384608 | Leonardo_Paes | Teams (IOI15_teams) | C++17 | 4099 ms | 8412 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 "teams.h"
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> pii;
#define f first
#define s second
vector<pii> e;
void init(int N, int A[], int B[]) {
for(int i=0; i<N; i++){
e.push_back({B[i], A[i]});
}
sort(e.begin(), e.end());
}
int can(int M, int K[]) {
sort(K, K+M);
vector<pii> wtf(M);
for(int i=0; i<M; i++){
wtf[i] = {K[i], K[i]};
}
int i = 0;
for(pii p : e){
for(int i=0; i<M; i++){
if(p.s <= wtf[i].f){
wtf[i].s--;
break;
}
}
}
bool ans = 1;
for(int i=0; i<M; i++){
if(wtf[i].s != 0) ans = 0;
}
return ans;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |