#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(c[i]>=w[i]){
num++;
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 |
532 KB |
Correct |
2 |
Incorrect |
10 ms |
1048 KB |
Wrong |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
53 ms |
4504 KB |
Wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
61 ms |
4504 KB |
Wrong |
2 |
Halted |
0 ms |
0 KB |
- |