#include <bits/stdc++.h>
#include "grader.h"
#define pb push_back
using namespace std;
#define F first
#define sz size()
#define S second
#define in insert
#define all(v) v.begin(), v.end()
#define FOR(x, n, m, d) for(int x = n; x <= m; x += d)
#define FORR(x, n) for(int i = x; i >= n; i --)
#define nikita ios_base::sync_with_stdio(0), cin.tie(0);
const int N = 256+5;
int n,m,k,tt,ans,sum=0,l, r, x, y, cnt, block = 448;
void solve(int n){
vector<int>q, v;
FOR(i, 1, n, 1){
q.pb(i);
}
FOR(i, 1, 5040, 1){
next_permutation(all(q));
ans = query(q);
if(ans == n){
return;
}
}
}
/*
signed main()
{
nikita
tt = 1;
if(!tt)cin >> tt;
FOR(i, 1, tt, 1){
solve();
}
}
*/
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |