# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
223082 | 2020-04-14T16:52:15 Z | emil_physmath | Sorting (IOI15_sorting) | C++17 | 14 ms | 384 KB |
#include "sorting.h" #include <vector> using namespace std; int findSwapPairs(int n, int a[], int m, int x[], int y[], int p[], int q[]) { for (int i = 0; i < n; ++i) { swap(a[x[i]], a[y[i]]); vector<int> b(a, a + n); for (int j = i + 1; j < n; ++j) swap(b[x[j]], b[y[j]]); for (int j = 0; j < n; ++j) if (a[j] == i) { p[i] = j; break; } for (int j = 0; j < n; ++j) if (a[j] == b[i]) { q[i] = j; break; } swap(a[p[i]], a[q[i]]); } return n; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 256 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 256 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 256 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 256 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 14 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 14 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |