# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
892521 | 2023-12-25T13:06:39 Z | Aiperiii | Super Dango Maker (JOI22_dango3) | C++17 | 492 ms | 736 KB |
#include "dango3.h" #include <bits/stdc++.h> using namespace std; void Solve(int n,int m){ queue < pair < vector <int> ,int > > q; vector <int> in; vector <vector <int> > ans; for(int i=1;i<=n*m;i++){ in.push_back(i); } q.push({in,m}); while(!q.empty()){ vector <int> v=q.front().first; int k=q.front().second/2; q.pop(); if(k==0){ ans.push_back(v); } else{ vector <int> used(v.size()); for(int i=0;i<v.size();i++){ used[i]=1; vector <int> x; for(int j=0;j<v.size();j++){ if(used[j]==0)x.push_back(v[j]); } if(Query(x)<k)used[i]=0; } vector <int> g1,g2; for(int i=0;i<v.size();i++){ if(used[i]==0)g1.push_back(v[i]); else g2.push_back(v[i]); } q.push({g1,k}); q.push({g2,k}); } } for(auto x : ans){ Answer(x); } return; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 344 KB | Wrong Answer [4] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 108 ms | 616 KB | Wrong Answer [4] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 492 ms | 736 KB | Wrong Answer [4] |
2 | Halted | 0 ms | 0 KB | - |