#include "king.h"
#include <bits/stdc++.h>
#define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define iter(a) a.begin(), a.end()
#define riter(a) a.rbegin(), a.rend()
#define lsort(a) sort(iter(a))
#define gsort(a) sort(riter(a))
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define pf(a) push_front(a)
#define pob pop_back()
#define pof pop_front()
#define F first
#define S second
#define printv(a, b) {bool pvaspace=false; \
for(auto pva : a){ \
if(pvaspace) b << " "; pvaspace=true;\
b << pva;\
}\
b << "\n";}
#define pii pair<int, int>
#define pll pair<ll, ll>
#define modadd(a, b) (((a % MOD) + (b % MOD)) % MOD)
#define modtimes(a, b) (((a % MOD) * (b % MOD)) % MOD)
//#define TEST
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
const ll MOD = 1000000007;
const ll MAX = 2147483647;
long long SendInfo(std::vector<int> W, std::vector<int> C) {
lsort(W);
lsort(C);
int wp = 0, cp = 0;
int ans = 0;
int n = W.size();
while(wp < n && cp < n){
if(W[wp] <= C[cp]){
ans++;
wp++;
}
cp++;
}
return ans;
}
#include "vassal.h"
#include <bits/stdc++.h>
#define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define iter(a) a.begin(), a.end()
#define riter(a) a.rbegin(), a.rend()
#define lsort(a) sort(iter(a))
#define gsort(a) sort(riter(a))
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define pf(a) push_front(a)
#define pob pop_back()
#define pof pop_front()
#define F first
#define S second
#define printv(a, b) {bool pvaspace=false; \
for(auto pva : a){ \
if(pvaspace) b << " "; pvaspace=true;\
b << pva;\
}\
b << "\n";}
#define pii pair<int, int>
#define pll pair<ll, ll>
#define modadd(a, b) (((a % MOD) + (b % MOD)) % MOD)
#define modtimes(a, b) (((a % MOD) * (b % MOD)) % MOD)
//#define TEST
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
const ll MOD = 1000000007;
const ll MAX = 2147483647;
long long BB;
std::vector<int> c;
int n;
vector<bool> b;
void Init(long long B, std::vector<int> C){
BB = B;
c = C;
n = c.size();
b.resize(n);
}
int Maid(int W){
int s = lower_bound(iter(c), W) - c.begin();
for(; s < n; s++){
if(b[s]) continue;
b[s] = true;
return s;
}
return -1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
1040 KB |
Correct |
2 |
Correct |
10 ms |
536 KB |
Correct |
3 |
Correct |
10 ms |
1044 KB |
Correct |
4 |
Correct |
11 ms |
1044 KB |
Correct |
5 |
Correct |
11 ms |
1040 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
57 ms |
3680 KB |
Correct |
2 |
Correct |
110 ms |
5656 KB |
Correct |
3 |
Correct |
269 ms |
6084 KB |
Correct |
4 |
Correct |
109 ms |
6200 KB |
Correct |
5 |
Correct |
123 ms |
5948 KB |
Correct |
6 |
Correct |
119 ms |
6204 KB |
Correct |
7 |
Correct |
287 ms |
6200 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
73 ms |
3708 KB |
B = 50991 |
2 |
Partially correct |
130 ms |
5668 KB |
B = 91406 |
3 |
Partially correct |
304 ms |
6208 KB |
B = 49847 |
4 |
Partially correct |
134 ms |
6208 KB |
B = 99850 |
5 |
Partially correct |
144 ms |
6204 KB |
B = 99598 |
6 |
Partially correct |
127 ms |
6084 KB |
B = 99746 |
7 |
Partially correct |
279 ms |
6212 KB |
B = 49910 |
8 |
Correct |
99 ms |
6088 KB |
Correct |