#include "king.h"
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
typedef pair<LL, LL> pll;
int n;
vector<int> tw, tc;
LL SendInfo(vector<int> w, vector<int> c){
n=w.size();
tw=w;
tc=c;
sort(tw.begin(), tw.end());
sort(tc.begin(), tc.end());
int p=n-1;
LL num=0;
for(int i=n-1; i>=0; i--){
for(; p>=0; p--){
if(tc[i]>=tw[p]){
num++;
p--;
break;
}
}
}
return num;
}
#include "vassal.h"
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
typedef pair<LL, LL> pll;
int BB;
int N;
vector<pair<int, int> > Tc;
set<pair<int, int> > s;
void Init(long long B, std::vector<int> C){
N = C.size();
BB = (int)B;
for(int i=0; i<N; i++){
Tc.pb({C[i], i});
}
sort(Tc.begin(), Tc.end());
for(int i=N-BB; i<N; i++){
s.insert(Tc[i]);
}
}
int Maid(int W){
set<pair<int, int> >::iterator it;
it=s.lower_bound(make_pair(W, -987654321));
if(it==s.end())return -1;
int ret=it->second;
s.erase(it);
return ret;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
1048 KB |
Correct |
2 |
Correct |
10 ms |
1044 KB |
Correct |
3 |
Correct |
10 ms |
1044 KB |
Correct |
4 |
Correct |
11 ms |
972 KB |
Correct |
5 |
Correct |
10 ms |
1048 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
69 ms |
6676 KB |
Correct |
2 |
Correct |
114 ms |
10944 KB |
Correct |
3 |
Correct |
110 ms |
9584 KB |
Correct |
4 |
Correct |
127 ms |
12024 KB |
Correct |
5 |
Correct |
127 ms |
11560 KB |
Correct |
6 |
Correct |
125 ms |
11432 KB |
Correct |
7 |
Correct |
114 ms |
9644 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
86 ms |
6680 KB |
B = 50991 |
2 |
Partially correct |
153 ms |
11196 KB |
B = 91406 |
3 |
Partially correct |
128 ms |
9636 KB |
B = 49847 |
4 |
Partially correct |
169 ms |
11944 KB |
B = 99850 |
5 |
Partially correct |
171 ms |
11948 KB |
B = 99598 |
6 |
Partially correct |
187 ms |
11948 KB |
B = 99746 |
7 |
Partially correct |
129 ms |
9640 KB |
B = 49910 |
8 |
Correct |
102 ms |
7220 KB |
Correct |