# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1144681 | 12345678 | Zalmoxis (BOI18_zalmoxis) | C++20 | 94 ms | 63048 KiB |
#include <bits/stdc++.h>
using namespace std;
const int nx=1e6+5;
int n, k, a[nx], cnt;
stack<pair<int, int>> s;
vector<int> res[nx];
void insert(pair<int, int> x)
{
if (s.empty()) s.push(x);
else
{
if (s.top().first==x.first) s.pop(), insert({x.first+1, x.second});
else s.push(x);
}
}
void show(int x)
{
if (cnt==k) return cout<<x<<' ', void();
else cnt++, show(x-1), show(x-1);
}
int main()
{
cin.tie(NULL)->sync_with_stdio(false);
cin>>n>>k;
for (int i=1; i<=n; i++) cin>>a[i];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |