# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
568712 | 2022-05-26T06:01:57 Z | joelau | Super Dango Maker (JOI22_dango3) | C++17 | 2131 ms | 600 KB |
#include "dango3.h" #include <bits/stdc++.h> using namespace std; vector<int> lst[30],v; void Solve(int N, int M) { for (int i = 0; i < N*M; ++i) v.push_back(i+1); while (!v.empty()) { int x = v.back(); v.pop_back(); int low = 0, high = M; while (high - low > 1) { int mid = (low+high)/2; int n = 0; for (int i = 0; i < mid; ++i) { n += lst[i].size(); for (int j = 0; j < lst[i].size(); ++j) v.push_back(lst[i][j]); } int q = Query(v); if (q == mid-1) high = mid; else low = mid; for (int i = 0; i < n; ++i) v.pop_back(); } lst[low].push_back(x); } for (int i = 0; i < M; ++i) Answer(lst[i]); }
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 | 1 ms | 340 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 14 ms | 368 KB | Output is correct |
2 | Correct | 13 ms | 340 KB | Output is correct |
3 | Correct | 16 ms | 304 KB | Output is correct |
4 | Correct | 18 ms | 404 KB | Output is correct |
5 | Correct | 9 ms | 368 KB | Output is correct |
6 | Correct | 12 ms | 340 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 364 ms | 436 KB | Output is correct |
2 | Correct | 367 ms | 436 KB | Output is correct |
3 | Correct | 455 ms | 472 KB | Output is correct |
4 | Correct | 515 ms | 460 KB | Output is correct |
5 | Correct | 377 ms | 452 KB | Output is correct |
6 | Correct | 330 ms | 428 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1355 ms | 512 KB | Output is correct |
2 | Correct | 1307 ms | 524 KB | Output is correct |
3 | Correct | 2131 ms | 600 KB | Output is correct |
4 | Correct | 2114 ms | 488 KB | Output is correct |
5 | Correct | 1329 ms | 552 KB | Output is correct |
6 | Correct | 1346 ms | 596 KB | Output is correct |