# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
132339 | 2019-07-18T17:44:45 Z | reda | Sorting (IOI15_sorting) | C++14 | 2 ms | 424 KB |
#include<bits/stdc++.h> using namespace std ; # include "sorting.h" vector<pair<int,int>> v; int findSwapPairs(int N, int S[], int M, int X[], int Y[], int p[], int q[]) { for(int i=0;i<N;i++) { v.push_back(make_pair(S[i],i)); } int c=0; sort(v.begin(),v.end()); int i=0,j=0; while(i<N) { if(v[i].first != S[i]){i++;} else { q[j]=i; p[j]=v[i].second; c++; j++; i++; } } return c; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 424 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 424 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |