Submission #520962

#TimeUsernameProblemLanguageResultExecution timeMemory
520962lordlorincSorting (IOI15_sorting)C++17
0 / 100
2 ms332 KiB
#include "sorting.h" int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) { int res = 0; for (int i = 0; i < N; i++){ int pos = -1; for (int j = 0; j < N; j++){ if (S[j] == i) pos = j; } if (pos == i) continue; P[res] = i; Q[res] = pos; res++; } return res; }

Compilation message (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...