답안 #971690

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
971690 2024-04-29T07:49:58 Z 12345678 Super Dango Maker (JOI22_dango3) C++17
7 / 100
1766 ms 932 KB
#include "dango3.h"
#include <bits/stdc++.h>

using namespace std;

const int nx=1e4+5;

int used[nx], n, m;

int query()
{
    vector<int> qrs;
    for (int i=1; i<=n*m; i++) if (!used[i]) qrs.push_back(i);
    return Query(qrs);
}

void Solve(int N, int M) {
    n=N, m=M;
    for (int i=M; i>=2; i--)
    {
        vector<int> res;
        for (int j=1; j<=N*M; j++)
        {
            if (res.size()==N) break;
            if (used[j]) continue;
            used[j]=1;
            if (query()==i-1) res.push_back(j);
            else used[j]=0;
        }
        Answer(res);
    }
    vector<int> res;
    for (int i=1; i<=N*M; i++) if (!used[i]) res.push_back(i);
    Answer(res);
}

Compilation message

dango3.cpp: In function 'void Solve(int, int)':
dango3.cpp:24:27: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   24 |             if (res.size()==N) break;
      |                 ~~~~~~~~~~^~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 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 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 344 KB Output is correct
2 Correct 12 ms 344 KB Output is correct
3 Correct 21 ms 348 KB Output is correct
4 Correct 21 ms 512 KB Output is correct
5 Correct 5 ms 348 KB Output is correct
6 Correct 6 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 501 ms 596 KB Output is correct
2 Correct 563 ms 600 KB Output is correct
3 Incorrect 1043 ms 596 KB Wrong Answer [3]
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1766 ms 932 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -