# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1108066 | 2024-11-02T16:17:13 Z | Aviansh | Sorting (IOI15_sorting) | C++17 | 2 ms | 348 KB |
#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[]) { int r = 0; for(int i = 0;i<n;i++){ int ind = find(s+i,s+n,i)-s; swap(s[i],s[ind]); if(i!=ind){ p[r]=i; q[r]=ind; r++; } } for(;r<m;r++){ p[r]=0; q[r]=0; } for(int i = 0;i<n;i++){ assert(s[i]==i); } return r; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 336 KB | Output is correct |
4 | Incorrect | 1 ms | 336 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 336 KB | Output is correct |
4 | Incorrect | 1 ms | 336 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Incorrect | 1 ms | 336 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 336 KB | Output is correct |
4 | Incorrect | 1 ms | 336 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 336 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 336 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |