#include "king.h"
#include<bits/stdc++.h>
using namespace std;
long long SendInfo(std::vector<int> W, std::vector<int> C) {
int i,j,n = W.size();
sort(W.begin() , W.end());
for(i=j=0; i<n && j<n ;i++,j++){
for(;j<n && C[j] < W[i] ; j++);
}
return i ? W[i-1] : 0;
}
#include "vassal.h"
#include<bits/stdc++.h>
using namespace std;
multiset< pair<int,int> > S;
multiset< pair<int,int> > :: iterator it;
long long B;
void Init(long long BB, std::vector<int> C){
int i, n = C.size();
B = BB;
for(i=0;i<n;i++)
S.insert(make_pair(C[i],i));
}
int Maid(int W){
if(W > B) return -1;
it = S.lower_bound(make_pair(W,0));
if(it == S.end()) return -1;
int i = it -> second;
S.erase(it);
return i;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
792 KB |
Correct |
2 |
Correct |
10 ms |
1036 KB |
Correct |
3 |
Correct |
10 ms |
1040 KB |
Correct |
4 |
Correct |
11 ms |
1044 KB |
Correct |
5 |
Correct |
10 ms |
1036 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
63 ms |
5932 KB |
Correct |
2 |
Correct |
106 ms |
9632 KB |
Correct |
3 |
Correct |
117 ms |
10428 KB |
Correct |
4 |
Correct |
109 ms |
10424 KB |
Correct |
5 |
Correct |
110 ms |
10432 KB |
Correct |
6 |
Correct |
115 ms |
10444 KB |
Correct |
7 |
Correct |
112 ms |
10424 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
79 ms |
5916 KB |
B = 993847 |
2 |
Partially correct |
149 ms |
9632 KB |
B = 996200 |
3 |
Partially correct |
133 ms |
10436 KB |
B = 706116 |
4 |
Partially correct |
156 ms |
10432 KB |
B = 998466 |
5 |
Partially correct |
154 ms |
10432 KB |
B = 995867 |
6 |
Partially correct |
152 ms |
10420 KB |
B = 997501 |
7 |
Partially correct |
132 ms |
10428 KB |
B = 706123 |
8 |
Partially correct |
112 ms |
10424 KB |
B = 278507 |