#include "king.h"
#include <vector>
long long SendInfo(std::vector<int> W, std::vector<int> C) {return 0;}
#include <bits/stdc++.h>
#include "vassal.h"
using namespace std;
typedef pair<int, int> ii;
set<ii> chairs;
void Init(long long B, vector<int> C){
int n = C.size();
for (int i=0; i<n; i++){
chairs.insert(make_pair(C[i],i));
}
}
int Maid(int w){
auto it = chairs.lower_bound(make_pair(w,0));
if (it == chairs.end()) return -1;
else {
int ans = (*it).second;
chairs.erase(it);
return ans;
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
800 KB |
Correct |
2 |
Correct |
9 ms |
796 KB |
Correct |
3 |
Correct |
9 ms |
752 KB |
Correct |
4 |
Correct |
8 ms |
792 KB |
Correct |
5 |
Correct |
10 ms |
792 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
61 ms |
7172 KB |
Correct |
2 |
Correct |
101 ms |
11940 KB |
Correct |
3 |
Correct |
112 ms |
12996 KB |
Correct |
4 |
Correct |
109 ms |
12908 KB |
Correct |
5 |
Correct |
110 ms |
13148 KB |
Correct |
6 |
Correct |
109 ms |
13004 KB |
Correct |
7 |
Correct |
108 ms |
13008 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
71 ms |
7068 KB |
Correct |
2 |
Correct |
133 ms |
12088 KB |
Correct |
3 |
Correct |
119 ms |
12996 KB |
Correct |
4 |
Correct |
141 ms |
13152 KB |
Correct |
5 |
Correct |
138 ms |
12996 KB |
Correct |
6 |
Correct |
138 ms |
12976 KB |
Correct |
7 |
Correct |
124 ms |
13000 KB |
Correct |
8 |
Correct |
118 ms |
13000 KB |
Correct |