Submission #998464

#TimeUsernameProblemLanguageResultExecution timeMemory
998464efishelSuper Dango Maker (JOI22_dango3)C++17
2 / 100
2337 ms608 KiB
#include "dango3.h" //Emmanuel B //dango #include <bits/stdc++.h> using namespace std; using lli=int; #define pb push_back #define deb(x) cout<<#x<<": "<<x<<endl; #define deb2(x,y) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl; void Solve(int N, int M) { vector<bool> visited (N*M+5,0); vector<vector<lli>> ans; for(lli xd=1; xd<=N*M; ++xd){ if(visited[xd]) continue; ans.pb({xd}); lli last=xd; visited[last]=true; for(lli i=1; i<=N*M; ++i){ if(visited[i]) continue; vector<int> x; for(int j=1; j<=N*M; ++j){ if(j==last || j==i) continue; x.pb(j); } int a=Query(x); if(a!=M-1){ ans[ans.size()-1].pb(i); visited[i]=true; } } } for(lli i=0; i<M; ++i){ vector<lli> x; for(lli j=0; j<N; ++j){ x.pb(ans[j][i]); } Answer(x); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...