제출 #1162935

#제출 시각아이디문제언어결과실행 시간메모리
1162935skibididopSuper Dango Maker (JOI22_dango3)C++20
100 / 100
296 ms800 KiB
#include "dango3.h" #include <bits/stdc++.h> using namespace std; namespace { int variable_example = 1; int c[10001], n; } // namespace void calcans(vector<int> cur){ int cnt = cur.size() / n; if(cnt == 1){ Answer(cur); return; } int nd = cnt / 2; vector<int> l = {}, r = {}; while(cur.size() > 0){ int x = cur.back(); cur.pop_back(); vector<int> q = cur; for(auto e : l) q.push_back(e); int ret = Query(q); if(ret < nd){ l.push_back(x); }else{ r.push_back(x); } } calcans(l); calcans(r); } void Solve(int N, int M) { n = N; vector<int> al = {}; for(int i = 1; i <= N * M; i++) al.push_back(i); calcans(al); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...