# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
259680 | 2020-08-08T09:10:53 Z | errorgorn | Secret Permutation (RMI19_permutation) | C++14 | 3739 ms | 256 KB |
#include "permutation.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define ii pair<ll,ll> #define iii pair<ii,ll> #define fi first #define se second #define endl '\n' #define debug(x) cout << #x << " is " << x << endl; #define rep(x,start,end) for(auto x=(start)-((start)>(end));x!=(end)-((start)>(end));((start)<(end)?x++:x--)) #define all(x) (x).begin(),(x).end() #define sz(x) (int)(x).size() void solve(int n) { vector<int> v,ans(n); rep(x,1,n+1) v.push_back(x); do{ if (query(v)==n-1){ rep(x,0,n) ans[v[x]-1]=x+1; //rep(x,0,n) cout<<ans[x]<<" "; cout<<endl; answer(ans); return; } } while (next_permutation(all(v))); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 13 ms | 256 KB | Partially correct |
2 | Partially correct | 0 ms | 256 KB | Partially correct |
3 | Partially correct | 5 ms | 256 KB | Partially correct |
4 | Partially correct | 9 ms | 256 KB | Partially correct |
5 | Partially correct | 2 ms | 256 KB | Partially correct |
6 | Partially correct | 1 ms | 256 KB | Partially correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 13 ms | 256 KB | Partially correct |
2 | Partially correct | 0 ms | 256 KB | Partially correct |
3 | Partially correct | 5 ms | 256 KB | Partially correct |
4 | Partially correct | 9 ms | 256 KB | Partially correct |
5 | Partially correct | 2 ms | 256 KB | Partially correct |
6 | Partially correct | 1 ms | 256 KB | Partially correct |
7 | Execution timed out | 3739 ms | 256 KB | Time limit exceeded (wall clock) |
8 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 13 ms | 256 KB | Partially correct |
2 | Partially correct | 0 ms | 256 KB | Partially correct |
3 | Partially correct | 5 ms | 256 KB | Partially correct |
4 | Partially correct | 9 ms | 256 KB | Partially correct |
5 | Partially correct | 2 ms | 256 KB | Partially correct |
6 | Partially correct | 1 ms | 256 KB | Partially correct |
7 | Execution timed out | 3739 ms | 256 KB | Time limit exceeded (wall clock) |
8 | Halted | 0 ms | 0 KB | - |