# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
572471 | model_code | Permutation (APIO22_perm) | C++17 | 3 ms | 468 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.
/*
* TASK: ROS/cdgp001/Increasing subsequences
* solution 3/2 log n
* Author: Karol Pokorski
*/
#include <bits/stdc++.h>
#include "perm.h"
using namespace std;
typedef long long int LL;
void apply_gadget(vector<int>& v,
const vector<int>& gadget) {
vector<int> gadget_items;
for (int x : gadget) if (x > 0) gadget_items.push_back(x);
sort(gadget_items.begin(), gadget_items.end());
for (int x : gadget_items)
for (int& y : v)
if (y >= x) y++;
int n_size = v.size() + gadget.size();
for (int x : gadget) {
if (x <= 0) v.push_back(n_size + x);
else v.push_back(x);
}
}
vector<int> dec2bin(LL x) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |