結果

問題 No.934 Explosive energy drink
ユーザー aa
提出日時 2019-11-29 22:10:11
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 285 ms / 2,000 ms
コード長 1,727 bytes
コンパイル時間 1,395 ms
コンパイル使用メモリ 165,920 KB
実行使用メモリ 24,288 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:33:47
合計ジャッジ時間 5,733 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
24,036 KB
testcase_01 AC 282 ms
23,328 KB
testcase_02 AC 24 ms
23,652 KB
testcase_03 AC 147 ms
23,340 KB
testcase_04 AC 283 ms
23,820 KB
testcase_05 AC 25 ms
23,976 KB
testcase_06 AC 24 ms
23,964 KB
testcase_07 AC 24 ms
24,204 KB
testcase_08 AC 24 ms
23,532 KB
testcase_09 AC 23 ms
23,340 KB
testcase_10 AC 25 ms
23,952 KB
testcase_11 AC 25 ms
23,784 KB
testcase_12 AC 25 ms
23,592 KB
testcase_13 AC 27 ms
24,288 KB
testcase_14 AC 29 ms
23,544 KB
testcase_15 AC 93 ms
24,276 KB
testcase_16 AC 40 ms
23,340 KB
testcase_17 AC 58 ms
24,228 KB
testcase_18 AC 59 ms
23,820 KB
testcase_19 AC 113 ms
23,592 KB
testcase_20 AC 190 ms
23,496 KB
testcase_21 AC 205 ms
23,412 KB
testcase_22 AC 285 ms
23,820 KB
testcase_23 AC 283 ms
24,012 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//#define _GLIBCXX_DEBUG
#include "bits/stdc++.h"

using namespace std;

//------------------------------- Type Names -------------------------------//

using i64 = int_fast64_t;

using seika = string;
//{akari : 1D, yukari : 2D, maki : 3D} vector
template <class kizuna>
using akari = vector<kizuna>;
template <class yuzuki>
using yukari = akari<akari<yuzuki>>;
template <class tsurumaki>
using maki = akari<yukari<tsurumaki>>;
//{akane : ascending order, aoi : decending order} priority queue
template <class kotonoha>
using akane = priority_queue<kotonoha, akari<kotonoha>, greater<kotonoha>>;
template <class kotonoha>
using aoi = priority_queue<kotonoha>;
//------------------------------- Libraries --------------------------------//

//------------------------------- Dubug Functions ---------------------------//
inline void print()
{
    cout << endl;
}
template <typename First, typename... Rest>
void print(const First &first, const Rest &... rest)
{
    cout << first << ' ';
    print(rest...);
}
//------------------------------- Solver ------------------------------------//

void solve()
{
    int n;
    cin >> n;
    akari<int> ans(n);
    for (int i = 0; i < n; i++)
    {
        cout << "? " << n - 1 << '\n';
        for (int j = 0; j < n; j++)
        {
            if (i == j)
            {
                continue;
            }
            cout << j + 1 << ' ';
        }
        cout << endl;
        cin >> ans[i];
        ans[i] = 1 - ans[i];
    }
    cout << "! " << accumulate(ans.begin(), ans.end(), 0) << '\n';
    for (int i = 0; i < n; i++)
    {
        if (ans[i])
        {
            cout << i + 1 << ' ';
        }
    }
    cout << endl;
}

int main()
{
    solve();
    return 0;
}
0