#include <bits/stdc++.h>
#define fr(i, n, m) for(int i = (n); i < (m); i ++)
#define pb push_back
#define st first
#define nd second
#define all(x) begin(x),end(x);
using namespace std;
typedef long long ll;
#include "king.h"
long long SendInfo(std::vector<int> W, std::vector<int> C) {
int N = W.size();
return 0;
}
#include <bits/stdc++.h>
#define fr(i, n, m) for(int i = (n); i < (m); i ++)
#define pb push_back
#define st first
#define nd second
#define all(x) begin(x),end(x);
using namespace std;
typedef long long ll;
/*#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;
}
*/
#include "vassal.h"
long long BB;
set<pair<int,int> > s;
void Init(long long B, std::vector<int> C){
int N = C.size();
fr(i, 0, N) s.insert({C[i], i});
BB = B;
// ToDo
}
int Maid(int W){
auto u = s.lower_bound({W, 1e5});
if(u == s.end()) return -1;
s.erase(u);
return u->nd;
}
Compilation message
king.cpp: In function 'long long int SendInfo(std::vector<int>, std::vector<int>)':
king.cpp:13:6: warning: unused variable 'N' [-Wunused-variable]
int N = W.size();
^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
1048 KB |
Correct |
2 |
Correct |
11 ms |
1144 KB |
Correct |
3 |
Correct |
11 ms |
952 KB |
Correct |
4 |
Correct |
10 ms |
536 KB |
Correct |
5 |
Correct |
11 ms |
1044 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
64 ms |
5940 KB |
Correct |
2 |
Correct |
106 ms |
9628 KB |
Correct |
3 |
Correct |
118 ms |
10484 KB |
Correct |
4 |
Correct |
121 ms |
10440 KB |
Correct |
5 |
Correct |
119 ms |
10440 KB |
Correct |
6 |
Correct |
127 ms |
10428 KB |
Correct |
7 |
Correct |
119 ms |
10440 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
81 ms |
5940 KB |
Correct |
2 |
Correct |
152 ms |
9628 KB |
Correct |
3 |
Correct |
164 ms |
10364 KB |
Correct |
4 |
Correct |
168 ms |
10440 KB |
Correct |
5 |
Correct |
183 ms |
10428 KB |
Correct |
6 |
Correct |
177 ms |
10592 KB |
Correct |
7 |
Correct |
138 ms |
10436 KB |
Correct |
8 |
Correct |
137 ms |
10432 KB |
Correct |