# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1132851 | Gray | Zalmoxis (BOI18_zalmoxis) | C++20 | 125 ms | 15328 KiB |
#include <bits/stdc++.h>
#include <cassert>
#include <iomanip>
#include <tuple>
#include <vector>
using namespace std;
#define ll int
#define ull unsigned long long
#define ld long double
#define ff first
#define ss second
#define ln "\n"
#define mp make_pair
#define INF 2e18
#define MOD 1e9+7
void get(ll x, ll &i, vector<ll> &a, vector<ll> &res, set<ll> &spec){
if (i<(ll)a.size() and a[i]==x){
res.push_back(a[i]);
i++; return;
}else if (i<(ll)a.size() and a[i]<x){
get(x-1, i, a, res, spec);
get(x-1, i, a, res, spec);
}else if (i==(ll)a.size() or a[i]>x){
res.push_back(x); spec.insert(res.size()-1);
}
}
void print(ll x, ll &k){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |