제출 #1098368

#제출 시각아이디문제언어결과실행 시간메모리
1098368alexander707070정렬하기 (IOI15_sorting)C++14
0 / 100
3 ms348 KiB
#include<bits/stdc++.h> #include "sorting.h" #define MAXN 200007 using namespace std; int n,m; int pos[MAXN],s[MAXN]; 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 f=0;f<n;f++){ if(s[f]==i){ P[i]=i; Q[i]=f; swap(s[i],s[f]); } } } while(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:10:46: warning: unused parameter 'X' [-Wunused-parameter]
   10 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
      |                                          ~~~~^~~
sorting.cpp:10:55: warning: unused parameter 'Y' [-Wunused-parameter]
   10 | 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...