제출 #710008

#제출 시각아이디문제언어결과실행 시간메모리
710008PixelCatSuper Dango Maker (JOI22_dango3)C++17
2 / 100
1 ms468 KiB
#include "dango3.h" #include <bits/stdc++.h> #define For(i, a, b) for(int i = a; i <= b; i++) #define Forr(i, a, b) for(int i = a; i >= b; i--) #define F first #define S second #define all(x) x.begin(), x.end() #define sz(x) ((int)x.size()) #define eb emplace_back // #define int LL using namespace std; using LL = long long; using pii = pair<int, int>; namespace { vector<int> cand; vector<int> res; int amyamya() { vector<int> v(all(res)); for(auto &i:cand) v.eb(i); while(sz(v) && Query(v) != 0) { v.pop_back(); } int k = sz(v) - sz(res); swap(cand[k], cand.back()); k = cand.back(); cand.pop_back(); return k; } } // namespace void Solve(int32_t N, int32_t M) { assert(max(N, M) <= 4); For(i, 1, N * M) { cand.eb(i); } For(i, 1, M) { res.clear(); For(j, 1, N) res.eb(amyamya()); // For(j, 0, N - 1) cout << res[j] << " \n"[j == N - 1]; Answer(res); } } /* g++ -std=c++14 -O2 -o grader grader.cpp dango3.cpp & grader.exe < input.txt > output.txt 2> error.txt */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...