Submission #1130186

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11301862024-12-27 14:46:52PekibanLibrary (JOI18_library)C++17
0 / 100
20 ms416 KiB
#include <bits/stdc++.h>
#include "library.h"
using namespace std;
void Solve(int n) {
int f = 0;
vector<int> a(n, 1);
for (int i = 0; i < n; ++i) {
a[i] = 0;
if (Query(a) == 1) {
f = i+1;
break;
}
a[i] = 1;
}
vector<int> ans = {f};
for (int i = 1; i < n; ++i) {
vector<int> S = a;
while (1) {
vector<int> S1(n, 0), S2(n, 0);
int C = 0, t = 0, sz = 0;
for (int j = 0; j < n; ++j) sz += S[j];
if (!sz) exit(0);
for (int j = 0; j < n; ++j) {
if (S[j]) {
if (C < (sz+1)/2) S1[j] = 1, t = j+1;
else {
S2[j] = 1;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...