Submission #1080962

#TimeUsernameProblemLanguageResultExecution timeMemory
1080962TrumlingSorting (IOI15_sorting)C++14
0 / 100
3 ms432 KiB
#include "sorting.h" #include<bits/stdc++.h> using namespace std; #define F first #define S second #define pb push_back #define all(x) x.begin(),x.end() #define INF 9999999999999999 typedef long long ll; ll n; int findSwapPairs(int N, int Se[], int M, int X[], int Y[], int P[], int Q[]) { n=N; for(int i=0;i<N;i++) for(int j=0;j<N;j++) if(Se[j]==i) { P[i]=min(j,i); Q[i]=max(i,j); swap(Se[j],Se[i]); } return N; }

Compilation message (stderr)

sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:13:40: warning: unused parameter 'M' [-Wunused-parameter]
   13 | int findSwapPairs(int N, int Se[], int M, int X[], int Y[], int P[], int Q[])
      |                                    ~~~~^
sorting.cpp:13:47: warning: unused parameter 'X' [-Wunused-parameter]
   13 | int findSwapPairs(int N, int Se[], int M, int X[], int Y[], int P[], int Q[])
      |                                           ~~~~^~~
sorting.cpp:13:56: warning: unused parameter 'Y' [-Wunused-parameter]
   13 | int findSwapPairs(int N, int Se[], 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...