# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
570043 | 2022-05-28T13:34:51 Z | jamezzz | Super Dango Maker (JOI22_dango3) | C++17 | 1345 ms | 860 KB |
#include "dango3.h" #include <bits/stdc++.h> using namespace std; namespace{ int n,m; } void dnc(vector<int> v){ if(v.size()==n){ Answer(v); return; } vector<int> l,r,mark(v.size(),0); int good=v.size()/n; for(int i=0;i<v.size();++i){ vector<int> ask; for(int j=0;j<v.size();++j){ if(j==i||mark[j])continue; ask.push_back(v[j]); } if(Query(ask)>=good/2)l.push_back(v[i]),mark[i]=1; else r.push_back(v[i]); } dnc(l),dnc(r); } void Solve(int N, int M){ n=N;m=M; vector<int> v; for(int i=1;i<=n*m;++i){ v.push_back(i); } dnc(v); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | 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 | 304 KB | Output is correct |
5 | Correct | 1 ms | 340 KB | Output is correct |
6 | Correct | 1 ms | 300 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 14 ms | 304 KB | Output is correct |
2 | Correct | 14 ms | 380 KB | Output is correct |
3 | Correct | 14 ms | 340 KB | Output is correct |
4 | Correct | 14 ms | 380 KB | Output is correct |
5 | Correct | 15 ms | 340 KB | Output is correct |
6 | Correct | 13 ms | 340 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 334 ms | 564 KB | Output is correct |
2 | Correct | 308 ms | 560 KB | Output is correct |
3 | Correct | 327 ms | 632 KB | Output is correct |
4 | Correct | 343 ms | 564 KB | Output is correct |
5 | Correct | 306 ms | 588 KB | Output is correct |
6 | Correct | 314 ms | 572 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1193 ms | 756 KB | Output is correct |
2 | Correct | 1236 ms | 752 KB | Output is correct |
3 | Correct | 1291 ms | 860 KB | Output is correct |
4 | Correct | 1345 ms | 748 KB | Output is correct |
5 | Correct | 1182 ms | 824 KB | Output is correct |
6 | Correct | 1135 ms | 748 KB | Output is correct |