Submission #979351

#TimeUsernameProblemLanguageResultExecution timeMemory
979351ramalzaherMouse (info1cup19_mouse)C++14
0 / 100
0 ms600 KiB
#include <bits/stdc++.h> #include "grader.h" using namespace std; #define ll long long #define pll pair<ll,ll> #define pii pair<int,int> #define fs first #define sc second #define tlll tuple<ll,ll,ll> void solve (int N ){ vector<int> v; vector<int> q;int n = N ; int ans[N+2] ; for(int i = 1;i<=N;i++) { v.push_back(i); q.push_back(N+22) ; } for(int i = 1; i <= n ; i ++ ) { q[0] = i ; for(int j = 0 ;j < n ; j ++ ) { if(query(q) == 1) {ans[j] = i ; break ; } //for(auto it : q )cout<<it<<" " ; cout<<endl; if(j+1 < n ) swap(q[j] , q[j+1]) ; } q[n-1] = N+22; } vector<int> vv ; for(int i = 0; i < N ; i ++ ) { vv.push_back(ans[i]) ; } query(vv); return ; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...