Submission #944219

#TimeUsernameProblemLanguageResultExecution timeMemory
944219alextodoranSuper Dango Maker (JOI22_dango3)C++17
7 / 100
325 ms604 KiB
/** _ _ __ _ _ _ _ _ _ |a ||t ||o d | |o | | __ _| | _ | __| _ | | __ |/_ | __ /__\ / _\| **/ #include <bits/stdc++.h> #include "dango3.h" using namespace std; typedef long long ll; int Query (const vector <int> &x); void Answer (const vector <int> &a); void Solve (int N, int M) { bool used[N * M]; fill(used, used + N * M, false); for (int k = 0; k < M; k++) { bool in[N * M]; fill(in, in + N * M, false); vector <int> x; for (int i = 0; i < N * M; i++) { if (used[i] == false) { x.push_back(i + 1); in[i] = true; if (Query(x) == 1) { break; } } } vector <int> sol; for (int i = 0; i < N * M; i++) { in[i] = false; vector <int> x; for (int j = 0; j < N * M; j++) { if (in[j] == true) { x.push_back(j + 1); } } if (Query(x) == 0) { sol.push_back(i + 1); in[i] = true; } } Answer(sol); for (int i : sol) { used[i - 1] = true; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...