답안 #988649

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
988649 2024-05-25T11:38:03 Z vjudge1 Super Dango Maker (JOI22_dango3) C++17
100 / 100
1960 ms 808 KB
#include<bits/stdc++.h>
#include "dango3.h"

using namespace std;

vector<int> ans, v2, x;
bool mark[100005];
vector<int> dango[100];

void Solve(int n, int m) {
    for (int i = 1; i <= n * m; i++) {
        int l = -1, r = m - 1, mid;
        while(l + 1 != r) {
            mid = (l + r) / 2;

            for (int j = 1; j <= n * m; j++) mark[j] = true;
            for (int i = 0; i <= mid; i++) {
                for (int j: dango[i]) mark[j] = false;
            }
            mark[i] = false;
            x.clear();
            for (int j = 1; j <= n * m; j++) if(mark[j]) x.push_back(j);
            int dm = Query(x);
            if(dm == m - mid - 2) l = mid;
            else r = mid;
        }
        dango[r].push_back(i);
    }
    for (int i = 0; i < m; i++) Answer(dango[i]);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 344 KB Output is correct
2 Correct 14 ms 596 KB Output is correct
3 Correct 14 ms 348 KB Output is correct
4 Correct 14 ms 344 KB Output is correct
5 Correct 13 ms 348 KB Output is correct
6 Correct 13 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 429 ms 348 KB Output is correct
2 Correct 427 ms 596 KB Output is correct
3 Correct 507 ms 808 KB Output is correct
4 Correct 490 ms 564 KB Output is correct
5 Correct 422 ms 348 KB Output is correct
6 Correct 423 ms 552 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1751 ms 624 KB Output is correct
2 Correct 1730 ms 620 KB Output is correct
3 Correct 1954 ms 628 KB Output is correct
4 Correct 1960 ms 624 KB Output is correct
5 Correct 1683 ms 604 KB Output is correct
6 Correct 1712 ms 628 KB Output is correct