#include "king.h"
#include <bits/stdc++.h>
long long SendInfo(std::vector<int> W, std::vector<int> C) {
int N = W.size();
std::multiset<int> CC(C.begin(),C.end());
std::sort(W.begin(),W.end());
for(int i=0;i<N;i++) {
auto it=CC.lower_bound(W[i]);
if(it==CC.end()) return W[i]-1;
CC.erase(it);
}
return W[N-1];
}
#include "vassal.h"
#include <bits/stdc++.h>
long long BB;
std::set<std::pair<int,int>> S;
void Init(long long B, std::vector<int> C){
int N = C.size();
BB = B;
for(int i=0;i<N;i++) S.insert({C[i],i});
}
int Maid(int W){
int ret;
if(W>BB) return -1;
auto it=S.lower_bound(std::make_pair(W,-1));
ret=it->second;
S.erase(it);
return ret;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
1044 KB |
Correct |
2 |
Correct |
11 ms |
1048 KB |
Correct |
3 |
Correct |
11 ms |
1076 KB |
Correct |
4 |
Correct |
11 ms |
1044 KB |
Correct |
5 |
Correct |
11 ms |
1048 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
81 ms |
8380 KB |
Correct |
2 |
Correct |
133 ms |
13776 KB |
Correct |
3 |
Correct |
142 ms |
15216 KB |
Correct |
4 |
Correct |
145 ms |
14956 KB |
Correct |
5 |
Correct |
147 ms |
14956 KB |
Correct |
6 |
Correct |
146 ms |
14960 KB |
Correct |
7 |
Correct |
145 ms |
15216 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
97 ms |
8144 KB |
B = 993890 |
2 |
Partially correct |
177 ms |
14028 KB |
B = 996221 |
3 |
Partially correct |
166 ms |
15220 KB |
B = 706117 |
4 |
Incorrect |
187 ms |
15208 KB |
Wrong |
5 |
Halted |
0 ms |
0 KB |
- |