제출 #1090650

#제출 시각아이디문제언어결과실행 시간메모리
1090650owoovo정렬하기 (IOI15_sorting)C++17
20 / 100
1 ms600 KiB
#include "sorting.h" int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) { int ans=0,vis[110]={0}; for(int i=0;i<N;i++){ if(vis[i]||S[i]==i)continue; int now=S[i]; vis[i]=1; while(now!=i){ vis[now]=1; P[ans]=now; Q[ans]=i; now=S[now]; ans++; } } return ans; }

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

sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:3:39: warning: unused parameter 'M' [-Wunused-parameter]
    3 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
      |                                   ~~~~^
sorting.cpp:3:46: warning: unused parameter 'X' [-Wunused-parameter]
    3 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
      |                                          ~~~~^~~
sorting.cpp:3:55: warning: unused parameter 'Y' [-Wunused-parameter]
    3 | int findSwapPairs(int N, int S[], 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...