# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
580733 | 2022-06-21T17:38:08 Z | otonozadze | Super Dango Maker (JOI22_dango3) | C++17 | 3955 ms | 576 KB |
#include "dango3.h" #include<bits/stdc++.h> #define pb push_back using namespace std; // namespace void Solve(int N, int M) { vector<int> qur; vector<int> a[M+1]; for(int i=1; i<=N*M; i++){ int l=1; int r=M; while(l<r){ qur.clear(); int m=(l+r+1)/2; int fix[N*M+1]; for(int j=1; j<=N*M; j++){ fix[j]=0; } fix[i]=1; for(int x=0; x<a[m].size(); x++){ fix[a[m][x]]=1; } for(int j=1; j<=N*M; j++){ if(fix[j]){ continue; } qur.pb(j); } int ans=Query(qur); if(ans==M-1){ l=m; }else{ r=m-1; } } a[l].pb(i); } for(int i=1; i<=M; i++){ Answer(a[i]); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 340 KB | Output is correct |
2 | Correct | 1 ms | 340 KB | Output is correct |
3 | Correct | 1 ms | 340 KB | Output is correct |
4 | Correct | 1 ms | 340 KB | Output is correct |
5 | Correct | 1 ms | 340 KB | Output is correct |
6 | Correct | 1 ms | 340 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 33 ms | 360 KB | Output is correct |
2 | Correct | 32 ms | 340 KB | Output is correct |
3 | Correct | 31 ms | 340 KB | Output is correct |
4 | Correct | 26 ms | 300 KB | Output is correct |
5 | Correct | 27 ms | 480 KB | Output is correct |
6 | Correct | 32 ms | 352 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1031 ms | 488 KB | Output is correct |
2 | Correct | 1002 ms | 444 KB | Output is correct |
3 | Correct | 1042 ms | 460 KB | Output is correct |
4 | Correct | 1031 ms | 576 KB | Output is correct |
5 | Correct | 997 ms | 448 KB | Output is correct |
6 | Correct | 959 ms | 456 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3832 ms | 552 KB | Output is correct |
2 | Correct | 3955 ms | 556 KB | Output is correct |
3 | Correct | 3941 ms | 572 KB | Output is correct |
4 | Correct | 3801 ms | 576 KB | Output is correct |
5 | Correct | 3715 ms | 560 KB | Output is correct |
6 | Correct | 3600 ms | 572 KB | Output is correct |