#include "king.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
ll SendInfo(vi W, vi C) {
multiset<int>s;
int n=C.size();
for(int i=0; i<n; i++)
s.insert(C[i]);
int ans=0;
for(int i=0; i<n; i++){
auto it=s.lower_bound(W[i]);
if(it==s.end())break;
s.erase(it);
ans++;
}
return ans;
}
#include "vassal.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int>pi;
int pref=0;
multiset<pi>s;
void Init(ll B, vi C){
pref=B;
int n=C.size();
for(int i=0; i<n; i++)
s.insert({C[i],i});
}
int Maid(int W){
if(!pref)return -1;
if(W>=s.rbegin()->first)return -1;
pref--;
int ans=s.rbegin()->second;
s.erase(s.find(*s.rbegin()));
return ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
484 KB |
Correct |
2 |
Correct |
0 ms |
484 KB |
Correct |
3 |
Incorrect |
0 ms |
492 KB |
Wrong |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
48 ms |
7784 KB |
Wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
54 ms |
7816 KB |
Wrong |
2 |
Halted |
0 ms |
0 KB |
- |