#include "king.h"
long long SendInfo(std::vector<int> W, std::vector<int> C) {
return 0;
}
#include "vassal.h"
#include <bits/stdc++.h>
#define F first
#define S second
#define mp make_pair
#define pb push_back
//#define ll __int128
#define ll long long
#define LEFT(a) ((a)<<1)
#define RIGHT(a) (LEFT(a) + 1)
#define MID(a,b) ((a+b)>>1)
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define y1 y122
using namespace std;
const int N = 1000005;
set < pair < int, int > > S;
set < pair < int, int > >::iterator I;
int n;
void Init(long long B, std::vector<int> C){
int n = (int)C.size();
for (int i = 0; i < n; i++)
S.insert ({C[i], i});
}
int Maid(int W){
I = S.lower_bound ({W, 0});
if (I == S.end())
return -1;
int pas = (*I).S;
S.erase (I);
return pas;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
1060 KB |
Correct |
2 |
Correct |
11 ms |
1060 KB |
Correct |
3 |
Correct |
10 ms |
1048 KB |
Correct |
4 |
Correct |
10 ms |
1060 KB |
Correct |
5 |
Correct |
10 ms |
544 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
62 ms |
5948 KB |
Correct |
2 |
Correct |
114 ms |
9640 KB |
Correct |
3 |
Correct |
111 ms |
10448 KB |
Correct |
4 |
Correct |
119 ms |
10448 KB |
Correct |
5 |
Correct |
113 ms |
10452 KB |
Correct |
6 |
Correct |
114 ms |
10448 KB |
Correct |
7 |
Correct |
115 ms |
10444 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
77 ms |
5944 KB |
Correct |
2 |
Correct |
139 ms |
9648 KB |
Correct |
3 |
Correct |
135 ms |
10460 KB |
Correct |
4 |
Correct |
147 ms |
10444 KB |
Correct |
5 |
Correct |
167 ms |
10456 KB |
Correct |
6 |
Correct |
154 ms |
10452 KB |
Correct |
7 |
Correct |
132 ms |
10348 KB |
Correct |
8 |
Correct |
125 ms |
10448 KB |
Correct |