제출 #65853

#제출 시각아이디문제언어결과실행 시간메모리
65853mirbek01정렬하기 (IOI15_sorting)C++17
0 / 100
5 ms428 KiB
#include "sorting.h" # include <bits/stdc++.h> using namespace std; int findSwapPairs(int n, int ar[], int m, int x[], int y[], int p[], int q[]) { int sz = 0; for (int i = n - 1; i >= 0; i --){ bool fl = 1; for(int j = 0; j < n; j ++){ if(ar[j] != j) fl = 0; } if(fl) break; swap(ar[0], ar[1]); for (int j = i - 1; j >= 0; j --){ if ( ar[j] == i ){ swap(ar[j], ar[i]); p[sz] = i; q[sz] = j; sz++; break; } } } return sz; }

컴파일 시 표준 에러 (stderr) 메시지

sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:7:40: warning: unused parameter 'm' [-Wunused-parameter]
 int findSwapPairs(int n, int ar[], int m, int x[], int y[], int p[], int q[])
                                        ^
sorting.cpp:7:49: warning: unused parameter 'x' [-Wunused-parameter]
 int findSwapPairs(int n, int ar[], int m, int x[], int y[], int p[], int q[])
                                                 ^
sorting.cpp:7:58: warning: unused parameter 'y' [-Wunused-parameter]
 int findSwapPairs(int n, int ar[], int m, int x[], int y[], int p[], int q[])
                                                          ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...