# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
876241 | 2023-11-21T13:10:57 Z | danikoynov | Super Dango Maker (JOI22_dango3) | C++17 | 169 ms | 756 KB |
#include "dango3.h" #include <bits/stdc++.h> using namespace std; int get_query(vector < int > lf, vector < int > rf) { for (int cur : rf) lf.push_back(cur); return Query(lf); } void sub_solve(vector < int > &d) { if (Query(d) == 0) return; vector < int > lf, rf; for (int i = 0; i < d.size(); i ++) { if (rand() % 2 == 0) lf.push_back(d[i]); else rf.push_back(d[i]); } sub_solve(lf); sub_solve(rf); vector < int > df; for (int cur : lf) df.push_back(cur); for (int cur : rf) df.push_back(cur); int cnt = Query(df); for (int t = 0; t < cnt; t++) { vector < int > secure, trash; while(!df.empty()) { int bk = df.back(); df.pop_back(); if (get_query(df, secure) == 0) secure.push_back(bk); else trash.push_back(bk); } Answer(secure); df = trash; } d = df; } void Solve(int N, int M) { vector < int > d; for (int i = 1; i <= N * M; i ++) d.push_back(i); sub_solve(d); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 756 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 348 KB | Output is correct |
2 | Correct | 3 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 | 3 ms | 348 KB | Output is correct |
6 | Correct | 3 ms | 444 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 77 ms | 604 KB | Output is correct |
2 | Correct | 77 ms | 604 KB | Output is correct |
3 | Correct | 62 ms | 604 KB | Output is correct |
4 | Correct | 60 ms | 600 KB | Output is correct |
5 | Correct | 75 ms | 600 KB | Output is correct |
6 | Correct | 56 ms | 600 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 169 ms | 600 KB | Wrong Answer [3] |
2 | Halted | 0 ms | 0 KB | - |