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 "king.h"
#include<bits/stdc++.h>
using namespace std;
long long SendInfo(std::vector<int> W, std::vector<int> C) {
return 0;
int i,j,n = W.size();
sort(W.begin() , W.end());
for(i=j=0; i<n && j<n ;i++,j++){
for(;j<n && C[j] < W[i] ; j++);
}
return i ? W[i-1] : 0;
}
#include "vassal.h"
#include<bits/stdc++.h>
using namespace std;
multiset< pair<int,int> > S;
multiset< pair<int,int> > :: iterator it;
long long B;
void Init(long long BB, std::vector<int> C){
int i, n = C.size();
B = BB;
for(i=0;i<n;i++)
S.insert(make_pair(C[i],i));
}
int Maid(int W){
it = S.lower_bound(make_pair(W,0));
if(it == S.end()) return -1;
int i = it -> second;
S.erase(it);
return i;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |