#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 ;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
600 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
600 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
600 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |