답안 #998667

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
998667 2024-06-14T13:15:36 Z Sharky Super Dango Maker (JOI22_dango3) C++17
7 / 100
2423 ms 756 KB
// i hope this works

#include "dango3.h"
#include <bits/stdc++.h>
using namespace std;

namespace {
}  // namespace

random_device rd;
mt19937 g(rd());

void Solve(int N, int M) {
    vector<int> p;
    for (int i = 1; i <= N * M; i++) p.push_back(i);
    shuffle(p.begin(), p.end(), g);
    vector<int> sus(N * M + 1, 0);
    for (int it = 1; it <= M; it++) {
        vector<int> amogus;
        for (int ii = 1; ii <= N * M; ii++) {
            int i = p[ii - 1];
            if (sus[i]) continue;
            amogus.push_back(i);
            sus[i] = 1;
            vector<int> alice;
            for (int j = 1; j <= N * M; j++) if (sus[j] != 1) alice.push_back(j);
            if (Query(alice) < M - 1) {
                amogus.pop_back();
                sus[i] = 0;
            }
        }
        Answer(amogus);
        for (auto& baby : amogus) sus[baby] = 2;
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 360 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 520 KB Output is correct
2 Correct 19 ms 348 KB Output is correct
3 Correct 17 ms 344 KB Output is correct
4 Correct 17 ms 344 KB Output is correct
5 Correct 17 ms 348 KB Output is correct
6 Correct 17 ms 528 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1245 ms 600 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2423 ms 756 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -