Submission #1069667

# Submission time Handle Problem Language Result Execution time Memory
1069667 2024-08-22T07:56:11 Z Abito A Light Inconvenience (CEOI23_light) C++17
0 / 100
1 ms 344 KB
#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;
	for (int i=0;n-p[i]+1>0;i++){
		v.pb(n-p[i]+1);
	}
	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;
	for (int i=1;n-p[i]+1>0;i++){
		v.pb(n-p[i]+1);
	}
	sort(v.begin(),v.end());
	if (v[0]!=1) v.pb(1);
	sort(v.begin(),v.end());
	return {x*5,v};
}
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -