Submission #568704

#TimeUsernameProblemLanguageResultExecution timeMemory
568704dantoh000Super Dango Maker (JOI22_dango3)C++17
2 / 100
4040 ms1012 KiB
#include "dango3.h" #include <bits/stdc++.h> using namespace std; int vis[10005]; void Solve(int N, int M) { vector<int> SOL[M]; for (int i = 0; i < N; i++){ unordered_set<int> idx; for (int j = 1; j <= N*M; j++) idx.insert(j); int cur = M; vector<int> corr; for (int j = 1; j <= N*M; j++){ if (vis[j]) continue; idx.erase(j); vector<int> v; for (auto x : idx) v.emplace_back(x); int res = Query(v); if (res < cur){ vis[j] = 1; corr.push_back(j); cur = res; } else idx.insert(j); } /*printf("group %d: ",i); for (auto x : corr) printf("%d ",x); printf("\n");*/ for (int j = 0; j < M; j++){ SOL[j].push_back(corr[j]); } } for (int i = 0; i < M; i++) { Answer(SOL[i]); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...