# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1080001 | 2024-08-29T05:57:15 Z | Trumling | Sorting (IOI15_sorting) | C++14 | 1 ms | 348 KB |
#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; int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) { ll pos[N]; for(int i=0;i<N;i++) { pos[S[i]]=i; } // for(int i=0;i<N;i++) // cout<<pos[i]<<' '; // cout<<'\n'; for(int i=0;i<N;i++) { P[i]=pos[i]; Q[i]=i; if(pos[i]>i) swap(P[i],Q[i]); pos[S[i]]=pos[i]; S[pos[i]]=S[i]; S[i]=i; pos[i]=i; } for(int i=0;i<N;i++) cout<<S[i]<<' '; return N; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Expected EOLN |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Expected EOLN |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Expected EOLN |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Expected EOLN |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Expected EOLN |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Expected EOLN |
2 | Halted | 0 ms | 0 KB | - |