답안 #971684

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
971684 2024-04-29T07:47:51 Z 12345678 Super Dango Maker (JOI22_dango3) C++17
7 / 100
1731 ms 624 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>=1; 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);
    }
}

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 0 ms 344 KB Output is correct
2 Correct 0 ms 596 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 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 344 KB Output is correct
2 Correct 12 ms 348 KB Output is correct
3 Correct 22 ms 348 KB Output is correct
4 Correct 23 ms 348 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 348 KB Output is correct
2 Correct 565 ms 596 KB Output is correct
3 Incorrect 1042 ms 596 KB Wrong Answer [3]
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1731 ms 624 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -