# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
434552 | ismoilov | 정렬하기 (IOI15_sorting) | C++14 | 6 ms | 332 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;
bool check(int a[], int n){
for(int i = 0; i < n; i ++)
if(a[i] != i)
return 0;
return 1;
}
int findSwapPairs(int n, int s[], int m, int x[], int y[], int p[], int q[]) {
while(!check(s, n)){
for(int i = 0; i < n; i ++){
for(int j = 0; j < n; j ++){
if(s[j] == i){
swap(s[j], s[i]);
p[i] = i, q[i] = j;
}
}
}
}
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... |