Submission #979353

# Submission time Handle Problem Language Result Execution time Memory
979353 2024-05-10T17:02:31 Z ramalzaher Mouse (info1cup19_mouse) C++14
0 / 100
0 ms 432 KB
#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) ; }
     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;
    }
    vector<int> vv ;
    for(int i = 0; i < N ; i ++ ) {
        vv.push_back(ans[i]) ;
    }

  query(vv);

	return ;
}
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 432 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 432 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 432 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -