# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
672116 | Lobo | Swap (BOI16_swap) | C++17 | 69 ms | 35752 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;
const long long inf = (long long) 1e18 + 10;
const int inf1 = (int) 1e9 + 10;
#define int long long
#define dbl long double
#define endl '\n'
#define sc second
#define fr first
#define mp make_pair
#define pb push_back
#define all(x) x.begin(), x.end()
const int maxn = 4e5+10;
int n, p[maxn], id[maxn], ans[maxn], up[maxn];
set<int> st[maxn];
void solve() {
cin >> n;
for(int i = 1; i <= n; i++) {
cin >> p[i];
st[i].insert(p[i]);
}
st[0].insert(n+1);
for(int i = 1; i <= n; i++) {
int lc = 2*i; if(lc > n) lc = 0;
int rc = 2*i+1; if(rc > n) rc = 0;
int a = inf;
# | 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... |