Submission #998698

#TimeUsernameProblemLanguageResultExecution timeMemory
998698SharkySuper Dango Maker (JOI22_dango3)C++17
22 / 100
2563 ms856 KiB
// let's hope this works #include "dango3.h" #include <bits/stdc++.h> using namespace std; namespace { int var = 0; } // namespace random_device rd; mt19937 g(rd()); void Solve(int N, int M) { vector<int> p; for (int i = 1; i <= N * M; i++) p.push_back(i); shuffle(p.begin(), p.end(), g); vector<int> sus(N * M + 1, 0); vector<vector<int>> amogus(M + 1); vector<vector<bool>> rizz(M + 1, vector<bool> (N * M + 1, 0)); for (int ii = 1; ii <= N * M; ii++) { int i = p[ii - 1]; for (int it = 1; it <= M; it++) { if ((int) amogus[it].size() == N) continue; amogus[it].push_back(i); rizz[it][i] = 1; vector<int> alice; for (int j = 1; j <= N * M; j++) if (!rizz[it][j]) alice.push_back(j); if (Query(alice) < M - 1) { amogus[it].pop_back(); rizz[it][i] = 0; } else break; } } for (int it = 1; it <= M; it++) Answer(amogus[it]); }

Compilation message (stderr)

dango3.cpp:9:5: warning: '{anonymous}::var' defined but not used [-Wunused-variable]
    9 | int var = 0;
      |     ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...