# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
167386 | faremy | Sorting (IOI15_sorting) | C++14 | 3 ms | 632 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 "sorting.h"
#include <algorithm>
#include <vector>
const int MAXN = 2e5;
int perm[MAXN];
bool seen[MAXN];
std::vector<int> left;
std::vector<int> right;
int reversePerm[MAXN];
void setup(int swaps, int permSize, int initPerm[], int swapLeft[], int swapRight[])
{
for (int iPos = 0; iPos < permSize; iPos++)
{
perm[iPos] = initPerm[iPos];
seen[iPos] = false;
}
for (int iSwap = 0; iSwap < swaps; iSwap++)
std::swap(perm[swapLeft[iSwap]], perm[swapRight[iSwap]]);
}
bool floodfill(int pos)
{
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |