# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
621007 | Hazem | Sorting (IOI15_sorting) | C++14 | 4 ms | 340 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 <bits/stdc++.h>
using namespace std;
int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
int n = N;
int cur = 0;
swap(S[0],S[1]);
for(int i=0;i<n;i++)
if(S[i]==0){
P[cur] = 1;
Q[cur] = i;
cur++;
swap(S[i],S[1]);
}
swap(S[0],S[1]);
for(int i=0;i<n;i++)
if(S[i]==1){
P[cur] = 1;
Q[cur] = i;
cur++;
swap(S[i],S[1]);
}
for(int i=2;i<n;i++)
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... |