# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
795554 | Josia | Sorting (IOI15_sorting) | C++11 | 1 ms | 444 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 <bits/stdc++.h>
using namespace std;
int findSwapPairs(int N, int _S[], int M, int X[], int Y[], int P[], int Q[]) {
assert(M >= N);
vector<int> S(N);
for (int i = 0; i<N; i++) S[i] = _S[i];
for (int i = 0; i<N; i++) {
for (int j = i; j<N; j++) {
if (S[j] == i) {
swap(S[i], S[j]);
P[i]=i;
Q[i]=j;
break;
}
}
}
return N;
}
Compilation message (stderr)
# | 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... |