제출 #1102985

#제출 시각아이디문제언어결과실행 시간메모리
1102985Pioneer정렬하기 (IOI15_sorting)C++17
20 / 100
3 ms504 KiB
#include "sorting.h" #include <bits/stdc++.h> using namespace std; const int MAX=200000; int n,m; int s[MAX]; int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) { n=N,m=M; for(int i=0;i<n;i++)s[i]=S[i]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(s[j]==i){ P[i]=i,Q[i]=j; swap(s[i],s[j]); } } } while(n>0&&P[n-1]==Q[n-1])n--; return n; }

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

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