#include "king.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define FOR(i, a, b) for(int i = (int)a; i <= (int)b; i++)
#define DEC(i, a, b) for(int i = (int)a; i >= (int)b; i--)
typedef pair<int, int> pi;
#define f first
#define s second
#define pb push_back
#define all(v) v.begin(), v.end()
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
ll SendInfo(vector<int> W, vector<int> C) {
return 0;
}
#include "vassal.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define FOR(i, a, b) for(int i = (int)a; i <= (int)b; i++)
#define DEC(i, a, b) for(int i = (int)a; i >= (int)b; i--)
typedef pair<int, int> pi;
#define f first
#define s second
#define pb push_back
#define all(v) v.begin(), v.end()
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
set<pi> c;
void Init(long long B, vector<int> C){
FOR(i, 0, C.size()-1) c.insert(pi(C[i], i));
}
int Maid(int w){
auto it = c.lower_bound(pi(w, -1));
if (it == c.end()) return -1;
int res = it->s; c.erase(it);
return res;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
1024 KB |
Correct |
2 |
Correct |
9 ms |
792 KB |
Correct |
3 |
Correct |
9 ms |
788 KB |
Correct |
4 |
Correct |
8 ms |
792 KB |
Correct |
5 |
Correct |
9 ms |
788 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
59 ms |
7104 KB |
Correct |
2 |
Correct |
98 ms |
11928 KB |
Correct |
3 |
Correct |
106 ms |
12976 KB |
Correct |
4 |
Correct |
109 ms |
12988 KB |
Correct |
5 |
Correct |
120 ms |
12816 KB |
Correct |
6 |
Correct |
108 ms |
12836 KB |
Correct |
7 |
Correct |
106 ms |
12988 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
69 ms |
7140 KB |
Correct |
2 |
Correct |
132 ms |
11904 KB |
Correct |
3 |
Correct |
121 ms |
12996 KB |
Correct |
4 |
Correct |
133 ms |
12980 KB |
Correct |
5 |
Correct |
135 ms |
12984 KB |
Correct |
6 |
Correct |
138 ms |
13108 KB |
Correct |
7 |
Correct |
122 ms |
12996 KB |
Correct |
8 |
Correct |
113 ms |
12832 KB |
Correct |