Submission #1102983

#TimeUsernameProblemLanguageResultExecution timeMemory
1102983PioneerSorting (IOI15_sorting)C++17
0 / 100
3 ms336 KiB
#include "sorting.h" #include <bits/stdc++.h> using namespace std; const int MAX=200000; int n,m; vector<int> s; int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) { n=N,m=M; vector<pair<int,int>> swaps; for(int i=0;i<n;i++)s.push_back(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]); } } } return n; }

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