# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
375285 | Mamnoon_Siam | Swap (BOI16_swap) | C++17 | 199 ms | 191724 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;
using ll = long long;
using ii = pair<int, int>;
using vi = vector<int>;
#define all(v) begin(v), end(v)
#define sz(v) (int)(v).size()
#define fi first
#define se second
const int N = 2e3 + 3;
vi dp[N][N];
int a[N], n, nn;
vi merge(vi p, vi q) {
vi r;
int pw = 1;
int i = 0, j = 0;
while(i < sz(p) or j < sz(q)) {
r.insert(r.end(), p.begin()+i, p.begin()+min(sz(p), i+pw));
r.insert(r.end(), q.begin()+j, q.begin()+min(sz(q), j+pw));
i = min(i+pw, sz(p));
j = min(j+pw, sz(q));
pw *= 2;
}
return r;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |