# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
945212 | 2024-03-13T14:21:40 Z | onepunchac168 | Super Dango Maker (JOI22_dango3) | C++17 | 517 ms | 848 KB |
#include "dango3.h" #include <bits/stdc++.h> using namespace std; vector <int> tmp[25]; #define pb push_back void Solve(int n, int m) { int dem=0; vector <int> target; for (int i=1;i<=n*m;i++) { target.push_back(i); } while (m>5) { dem++; vector <int> need; vector <int> needa; for (int i=0;i<target.size();i++) { vector <int> cnt; for (int j=i+1;j<target.size();j++) { cnt.push_back(target[j]); } for (auto v:need) { cnt.push_back(v); } if (Query(cnt)>=m-5) { needa.pb(target[i]); } else need.pb(target[i]); } for (auto v:needa) { tmp[dem].pb(v); } swap(need,target); m-=5; } if (m>0) { dem++; for (auto v:target) { tmp[dem].push_back(v); } } for (int i=1;i<=dem;i++) { vector <int> rr=tmp[i]; int kk=rr.size()/n; while (rr.size()>n) { kk--; vector <int> need; vector <int> needa; for (int i=0;i<rr.size();i++) { vector <int> cnt; for (int j=i+1;j<rr.size();j++) { cnt.push_back(rr[j]); } for (auto v:need) { cnt.push_back(v); } if (Query(cnt)>=kk) { needa.pb(rr[i]); } else need.pb(rr[i]); } Answer(needa); swap(need,rr); } Answer(rr); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 344 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 | Correct | 6 ms | 348 KB | Output is correct |
2 | Correct | 6 ms | 344 KB | Output is correct |
3 | Correct | 6 ms | 348 KB | Output is correct |
4 | Correct | 6 ms | 348 KB | Output is correct |
5 | Correct | 5 ms | 348 KB | Output is correct |
6 | Correct | 5 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 140 ms | 604 KB | Output is correct |
2 | Correct | 148 ms | 600 KB | Output is correct |
3 | Correct | 171 ms | 620 KB | Output is correct |
4 | Correct | 168 ms | 604 KB | Output is correct |
5 | Correct | 148 ms | 604 KB | Output is correct |
6 | Correct | 138 ms | 612 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 517 ms | 848 KB | Wrong Answer [3] |
2 | Halted | 0 ms | 0 KB | - |