#include "light.h"
#include <bits/stdc++.h>
#define pb push_back
#define int long long
using namespace std;
int n,p[27];
void prepare(){
n=1;
p[0]=1;
for (int i=1;i<27;i++) p[i]=p[i-1]*5;
}
std::pair<long long, std::vector<long long>> join(long long x){
n+=x;
vector<int> v;v.pb(n);
for (int i=1;n-p[i]>0;i++){
v.pb(n-p[i]);
}
sort(v.begin(),v.end());
if (v[0]!=1) v.pb(1);
sort(v.begin(),v.end());
return {x*5,v};
}
std::pair<long long, std::vector<long long>> leave(long long x){
n-=x;
vector<int> v;v.pb(n);
for (int i=1;n-p[i]>0;i++){
v.pb(n-p[i]);
}
sort(v.begin(),v.end());
if (v[0]!=1) v.pb(1);
sort(v.begin(),v.end());
return {x*5,v};
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
293 ms |
344 KB |
Output is correct |
3 |
Correct |
289 ms |
344 KB |
Output is correct |
4 |
Correct |
305 ms |
344 KB |
Output is correct |
5 |
Correct |
297 ms |
344 KB |
Output is correct |
6 |
Correct |
314 ms |
344 KB |
Output is correct |
7 |
Correct |
285 ms |
344 KB |
Output is correct |
8 |
Correct |
288 ms |
344 KB |
Output is correct |
9 |
Correct |
315 ms |
344 KB |
Output is correct |
10 |
Correct |
325 ms |
344 KB |
Output is correct |
11 |
Correct |
296 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Not correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
1 ms |
344 KB |
Partially correct |
2 |
Partially correct |
288 ms |
432 KB |
Partially correct |
3 |
Partially correct |
297 ms |
344 KB |
Partially correct |
4 |
Partially correct |
337 ms |
344 KB |
Partially correct |
5 |
Partially correct |
296 ms |
344 KB |
Partially correct |
6 |
Partially correct |
299 ms |
344 KB |
Partially correct |
7 |
Partially correct |
313 ms |
344 KB |
Partially correct |
8 |
Partially correct |
310 ms |
344 KB |
Partially correct |
9 |
Partially correct |
292 ms |
344 KB |
Partially correct |
10 |
Partially correct |
298 ms |
344 KB |
Partially correct |
11 |
Partially correct |
328 ms |
344 KB |
Partially correct |
12 |
Incorrect |
0 ms |
344 KB |
Not correct |
13 |
Halted |
0 ms |
0 KB |
- |