Submission #544602

#TimeUsernameProblemLanguageResultExecution timeMemory
544602sidonSuper Dango Maker (JOI22_dango3)C++17
100 / 100
1066 ms804 KiB
#include <bits/stdc++.h> #include "dango3.h" using namespace std; void dfs(vector<int> a, int m) { if(m < 1) return; if(m < 2) return Answer(a); vector<int> L, R; for(int i = size(a); i--; ) { vector<int> q(L); for(int j = i; j--; ) q.push_back(a[j]); (Query(q) < m / 2 ? L : R).push_back(a[i]); } dfs(L, m / 2), dfs(R, m - m / 2); } void Solve(int N, int M) { vector<int> a(N*M); iota(begin(a), end(a), 1); dfs(a, M); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...