# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
408827 | MDario | 정렬하기 (IOI15_sorting) | C++11 | 172 ms | 22516 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "sorting.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
int n, s[200001], m, x[600001], y[600001];
bool f(ll xf){
int s1[200001];
for(int i=0; i<n; i++){
s1[i]=s[i];
}
int c=0;
for(int i=0; i<xf; i++){
swap(s1[x[i]], s1[y[i]]);
}
for(int i=0; i<n; i++){
while(s1[i]!=i){
c++;
swap(s1[i], s1[s1[i]]);
}
}
return (c<=xf);
}
int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
n=N;
m=M;
bool b=1;
for(int i=0; i<n; i++){
s[i]=S[i];
# | 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... |