# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
923172 | 2024-02-06T19:19:59 Z | alexdd | Super Dango Maker (JOI22_dango3) | C++17 | 172 ms | 848 KB |
#include "dango3.h" #include <bits/stdc++.h> using namespace std; int n,m; vector<int> ord; void scoate_unu() { int ult=-1; vector<int> aux; for(int i=0;i<ord.size();i++) { aux.push_back(ord[i]); if(Query(aux)==1) { ult=i; break; } } aux.clear(); for(int i=ult;i>=0;i--) { vector<int> cv = aux; for(int j=i-1;j>=0;j--) cv.push_back(ord[j]); if((int)aux.size()+i+1==n || i==ult || Query(cv)==0) { aux.push_back(ord[i]); ord.erase(ord.begin()+i); } } ///scoate din ord Answer(aux); } void Solve(int N, int M) { n=N; m=M; for(int i=1;i<=n*m;i++) ord.push_back(i); random_shuffle(ord.begin(),ord.end()); for(int i=1;i<m;i++) { scoate_unu(); } Answer(ord); } /** 3 2 3 3 1 2 1 2 */
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 1 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 344 KB | Output is correct |
2 | Correct | 5 ms | 348 KB | Output is correct |
3 | Correct | 4 ms | 348 KB | Output is correct |
4 | Correct | 4 ms | 348 KB | Output is correct |
5 | Correct | 4 ms | 344 KB | Output is correct |
6 | Correct | 4 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 73 ms | 344 KB | Wrong Answer [3] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 172 ms | 848 KB | Wrong Answer [3] |
2 | Halted | 0 ms | 0 KB | - |