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 W[0]*100 + W[1]*10 + W[2]*1;
return 0;
}
/* cerberus97 - Hanit Banga */
#include <iostream>
#include <iomanip>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include "vassal.h"
using namespace std;
#define pb push_back
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)
typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
const int N = 1e5 + 10;
ll BB;
set<pii> available;
void Init(ll B, std::vector<int> C) {
int N = C.size();
BB = B;
for (int i = 0; i < N; ++i) {
available.insert({C[i], i});
}
// ToDo
}
int Maid(int W) {
auto it = available.lower_bound({W, -1});
if (it != available.end()) {
int ans = it->second;
available.erase(it);
return ans;
} else {
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... |