답안 #944219

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
944219 2024-03-12T11:18:09 Z alextodoran Super Dango Maker (JOI22_dango3) C++17
7 / 100
325 ms 604 KB
/**
 _  _   __  _ _ _  _  _ _
 |a  ||t  ||o    d | |o  |
| __    _| | _ | __|  _ |
| __ |/_  | __  /__\ / _\|

**/

#include <bits/stdc++.h>
#include "dango3.h"

using namespace std;

typedef long long ll;

int Query (const vector <int> &x);
void Answer (const vector <int> &a);

void Solve (int N, int M) {
    bool used[N * M];
    fill(used, used + N * M, false);
    for (int k = 0; k < M; k++) {
        bool in[N * M];
        fill(in, in + N * M, false);
        vector <int> x;
        for (int i = 0; i < N * M; i++) {
            if (used[i] == false) {
                x.push_back(i + 1);
                in[i] = true;
                if (Query(x) == 1) {
                    break;
                }
            }
        }
        vector <int> sol;
        for (int i = 0; i < N * M; i++) {
            in[i] = false;
            vector <int> x;
            for (int j = 0; j < N * M; j++) {
                if (in[j] == true) {
                    x.push_back(j + 1);
                }
            }
            if (Query(x) == 0) {
                sol.push_back(i + 1);
                in[i] = true;
            }
        }
        Answer(sol);
        for (int i : sol) {
            used[i - 1] = true;
        }
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 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 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 15 ms 348 KB Output is correct
2 Correct 14 ms 348 KB Output is correct
3 Correct 24 ms 604 KB Output is correct
4 Correct 22 ms 348 KB Output is correct
5 Correct 11 ms 348 KB Output is correct
6 Correct 10 ms 440 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 174 ms 344 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 325 ms 604 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -