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 <vector>
#include <iostream>
using namespace std;
vector<int> arr(500001);
void init(int N, int A[], int B[]) {
arr.clear();
fill(arr.begin(), arr.end(), 0);
for(int i = 0;i < N;i++){
for(int j = A[i];j <= B[j];j++){
arr[i] += 1;
}
}
// for(int i = 0;i < 20;i++){
// cout << arr[i] << " ";
// }cout << endl;
}
int can(int M, int K[]) {
vector<int> temp = arr;
for(int i=0;i<M;i++){
if(temp[K[i]] < K[i]){
return 0;
}
temp[K[i]] -= K[i];
}
return 1;
}
# | 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... |