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;
}
#include "vassal.h"
#include <bits/stdc++.h>
using namespace std;
set<pair<int,int>> S;
void Init(long long B, std::vector<int> C2){
for(int i=0;i<C2.size();i++) {
S.insert(pair<int,int>(C2[i],i));
}
}
int Maid(int W){
set<pair<int,int>>::iterator it = S.lower_bound(pair<int,int>(W,-1));
if(it == S.end()) {
return -1;
}
S.erase(it);
//cout<<W<<' '<<(*it).second<<'\n';
return (*it).second;
}
Compilation message (stderr)
vassal.cpp: In function 'void Init(long long int, std::vector<int>)':
vassal.cpp:6:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<C2.size();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... |