# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
61245 | Miyukine | Zalmoxis (BOI18_zalmoxis) | C++14 | 287 ms | 24192 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i=(a); i<=(b); ++i)
const int maxn = 1e6 + 5;
typedef pair <int, int> PII;
int tab[maxn], n, k, used;
int stos[maxn], DL = 0;
vector <PII> insert, help;
void updatestos()
{
while (stos[DL] == stos[DL - 1])
{
DL--;
stos[DL]++;
}
}
void rozloz()
{
for (auto u : insert)
{
if (used < k && u.second > 0)
{
++used;
help.push_back(make_pair(u.first, u.second - 1));
help.push_back(make_pair(u.first, u.second - 1));
}
else help.push_back(make_pair(u.first, u.second));
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |