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"
long long SendInfo(std::vector<int> W, std::vector<int> C) {
int N = W.size();
return 0;
}
#include "vassal.h"
#include<set>
#include<algorithm>
long long BB;
int siz;
std::multiset<std::pair<int, int> > a;
void Init(long long B, std::vector<int> C){
int N = C.size();
siz=N;
for(int i=0; i<N; i++){
a.insert(std::make_pair(C[i], i));
}
// ToDo
}
int Maid(int W){
std::multiset<std::pair<int, int> >::iterator ite;
ite=a.upper_bound(std::make_pair(W-1, siz));
if(ite==a.end()){
return -1;
}else{
std::pair<int, int> now=*ite;
a.erase(ite);
return now.second;
}
}
Compilation message (stderr)
king.cpp: In function 'long long int SendInfo(std::vector<int>, std::vector<int>)':
king.cpp:4:6: warning: unused variable 'N' [-Wunused-variable]
int N = W.size();
^
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |