#include <iostream>
#include <vector>
#include <algorithm>
#include "library.h"
using namespace std;
void Solve(int n) {
vector<int> front;
vector<int> back;
vector<int> left; for (int i = 0; i < n; ++i) left.push_back(i);
// while (left.size()) {
// int l = 0, r = left.size();
// while (l < r - 1) {
// int mid = (l + r) >> 1;
// vector<int> first(n), second(n);
// for (int i = 0; i < left.size(); ++i) {
// if (i >= l && i < mid) first[left[i]] = 1;
// else second[left[i]] = 1;
// }
// int q1 = Query(first), q2 = Query(second);
// if (q1 >= q2) r = mid;
// else l = mid;
// }
// int ind = 0;
// for (int i = 0; i < left.size(); ++i) if (left[i] == l) ind = i;
// left.erase(left.begin() + ind);
// vector<int> arr(n);
// arr[front.back()] = 1, arr[l] = 1;
// int q = Query(arr);
// if (q == 1) front.push_back(l);
// else back.push_back(l);
// }
vector<int> ans;
for (int num : front) ans.push_back(num + 1);
reverse(back.begin(), back.end());
for (int num : back) ans.push_back(num + 1);
Answer(ans);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Wrong Answer [4] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Wrong Answer [4] |
2 |
Halted |
0 ms |
0 KB |
- |