Submission #1012287

#TimeUsernameProblemLanguageResultExecution timeMemory
1012287aykhnSorting (IOI15_sorting)C++17
0 / 100
1 ms436 KiB
#include "sorting.h" #include <bits/stdc++.h> using namespace std; int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) { for (int R = 0; R <= M + 5; R++) { int f = -1; for (int i = 0; i < N; i++) { if (S[i] != i) { f = i; break; } } if (f == -1) return R; X[R] = f, Y[R] = S[f]; swap(S[f], S[S[f]]); } return -12398; }

Compilation message (stderr)

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