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;
using P=pair<int,int>;
vector<P> v;
int n;
void init(int N, int A[], int B[]) {
for(int i=0;i<N;i++){
v.emplace_back(A[i],B[i]);
}
n=N;
sort(v.begin(),v.end());
}
int can(int M, int K[]) {
sort(K,K+M);
vector<int> deg(M);
int id=0;
for(int i=0;i<n;i++){
while(id<M&°[id]==K[id]){
id++;
}
if(id==M){
return 1;
}
if(v[i].first>K[id]){
return 0;
}
if(v[i].first<=K[id]&&K[id]<=v[i].second){
deg[id]++;
}
}
while(id<M&°[id]==K[id]){
id++;
}
return (id==M);
}
# | 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... |