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) {
return 0;
}
#include "vassal.h"
#include <algorithm>
std::vector<std::pair<int, int>> chair;
void Init(long long B, std::vector<int> C){
int N = C.size();
for (int i = 0; i < N; i++) {
chair.push_back(std::pair<int,int>(C[i], i));
}
sort(chair.begin(), chair.end());
}
int Maid(int W){
for (int i = 0; i < chair.size(); i++) {
if (chair[i].first >= W) {
chair[i].first = 0;
return chair[i].second;
}
}
return -1;
}
Compilation message (stderr)
vassal.cpp: In function 'int Maid(int)':
vassal.cpp:17:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < chair.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... |