#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;
int m=n+1;
vector<int> v;
for (int i=0;m>0;i++){
m-=p[i];
if (m<0) break;
v.pb(m);
}
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;
int m=n+1;
vector<int> v;
for (int i=0;m>0;i++){
m-=p[i];
if (m<0) break;
v.pb(m);
}
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 |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
288 ms |
428 KB |
Output is correct |
3 |
Correct |
261 ms |
344 KB |
Output is correct |
4 |
Correct |
277 ms |
344 KB |
Output is correct |
5 |
Correct |
313 ms |
344 KB |
Output is correct |
6 |
Correct |
296 ms |
344 KB |
Output is correct |
7 |
Correct |
327 ms |
344 KB |
Output is correct |
8 |
Correct |
306 ms |
344 KB |
Output is correct |
9 |
Correct |
284 ms |
344 KB |
Output is correct |
10 |
Correct |
308 ms |
344 KB |
Output is correct |
11 |
Correct |
276 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 |
0 ms |
344 KB |
Partially correct |
2 |
Partially correct |
293 ms |
428 KB |
Partially correct |
3 |
Partially correct |
298 ms |
344 KB |
Partially correct |
4 |
Partially correct |
328 ms |
344 KB |
Partially correct |
5 |
Partially correct |
315 ms |
344 KB |
Partially correct |
6 |
Partially correct |
298 ms |
340 KB |
Partially correct |
7 |
Partially correct |
271 ms |
344 KB |
Partially correct |
8 |
Partially correct |
342 ms |
344 KB |
Partially correct |
9 |
Partially correct |
314 ms |
344 KB |
Partially correct |
10 |
Partially correct |
282 ms |
344 KB |
Partially correct |
11 |
Partially correct |
266 ms |
344 KB |
Partially correct |
12 |
Incorrect |
0 ms |
344 KB |
Not correct |
13 |
Halted |
0 ms |
0 KB |
- |