# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
781082 | 2023-07-12T17:22:23 Z | aZvezda | Super Dango Maker (JOI22_dango3) | C++17 | 95 ms | 516 KB |
#include "dango3.h" #include <bits/stdc++.h> using namespace std; namespace { int variable_example = 1; } // namespace void Solve(int n, int m) { vector<int> lft = {}; for(int i = 1; i <= n * m; i ++) { lft.push_back(i); } for(int i = 0; i < m; i ++) { vector<int> group = {}; random_shuffle(lft.begin(), lft.end()); int last = lft.size(); for(int j = 0; j < n; j ++) { int l = 0, r = last; int more = n - j; while(last != more && l < r - 1) { int m = (l + r) / 2ll; auto now = group; for(int k = 0; k < m; k ++) { now.push_back(lft[k]); } if(Query(now) >= 1) { r = m; } else { l = m; } } group.push_back(lft[l]); swap(lft[lft.size() - 1], lft[l]); lft.pop_back(); last = r; } Answer(group); } }
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 | 340 KB | Output is correct |
5 | Correct | 1 ms | 340 KB | Output is correct |
6 | Correct | 0 ms | 340 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 340 KB | Output is correct |
2 | Correct | 3 ms | 340 KB | Output is correct |
3 | Correct | 3 ms | 340 KB | Output is correct |
4 | Correct | 3 ms | 340 KB | Output is correct |
5 | Correct | 3 ms | 340 KB | Output is correct |
6 | Correct | 3 ms | 388 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 33 ms | 340 KB | Output is correct |
2 | Correct | 33 ms | 340 KB | Output is correct |
3 | Correct | 33 ms | 340 KB | Output is correct |
4 | Correct | 33 ms | 340 KB | Output is correct |
5 | Correct | 33 ms | 340 KB | Output is correct |
6 | Correct | 33 ms | 340 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 95 ms | 516 KB | Wrong Answer [3] |
2 | Halted | 0 ms | 0 KB | - |