Submission #892570

# Submission time Handle Problem Language Result Execution time Memory
892570 2023-12-25T14:05:43 Z vjudge1 Super Dango Maker (JOI22_dango3) C++17
0 / 100
79 ms 608 KB
#include "dango3.h"

#include <vector>

#include <bits/stdc++.h>
 
#define pb push_back
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()

using namespace std;

void rec(vector<int> &v, int m){
	if(m == 1){
		Answer(v);
		return;
	}
	
	vector<int> new_v;
	for(int i = 0; i < (int)v.size(); i++){
		new_v.pb(*v.begin());
		v.erase(v.begin());
		int x = Query(v);
		if(x < m/2){
			v.pb(new_v.back());
			new_v.pop_back();
		}
	}
	rec(v, m/2);
	rec(new_v, m - m/2);
}

void Solve(int n, int m) {
	vector<int> a;
	for(int i = 1; i <= n * m; i++) a.pb(i);
	rec(a, m);
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 20 ms 568 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 79 ms 608 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -