Submission #1081678

# Submission time Handle Problem Language Result Execution time Memory
1081678 2024-08-30T09:07:44 Z nikd A Light Inconvenience (CEOI23_light) C++17
0 / 100
317 ms 344 KB
#include <bits/stdc++.h>
#define ll long long
using namespace std;

ll n;
void prepare(){
    n = 1;
}

pair<long long, vector<long long>> join(long long p){
    n+=p;
    vector<ll> sol;
    ll temp = 2;
    while(n-temp+2>0){
        sol.push_back(n-temp+2);
        temp<<=1;
    }
    if(sol[sol.size()-1]!=1){
        sol.push_back(1);
    }
    reverse(sol.begin(), sol.end());
    return {p, sol};
}

pair<long long, vector<long long>> leave(long long p){
    n-=p;
    vector<ll> sol;
    ll temp = 2;
    while(n-temp+2>0){
        sol.push_back(n-temp+2);
        temp<<=1;
    }
    if(sol[sol.size()-1]!=1){
        sol.push_back(1);
    }
    reverse(sol.begin(), sol.end());
    return {p, sol};
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 267 ms 344 KB Correct
3 Correct 297 ms 344 KB Correct
4 Incorrect 317 ms 344 KB Not correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Correct
2 Correct 302 ms 344 KB Correct
3 Correct 288 ms 344 KB Correct
4 Incorrect 292 ms 344 KB Not correct
5 Halted 0 ms 0 KB -