結果

問題 No.3418 【絶望】30個並列ごちゃ混ぜHit&Blowで遊ぼう!
コンテスト
ユーザー GOTKAKO
提出日時 2025-12-25 10:27:00
言語 C++17
(gcc 13.3.0 + boost 1.89.0)
結果
AC  
実行時間 1,712 ms / 5,000 ms
コード長 706 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,772 ms
コンパイル使用メモリ 198,128 KB
実行使用メモリ 26,584 KB
スコア 7,092,608
平均クエリ数 29073.92
最終ジャッジ日時 2025-12-25 10:29:53
合計ジャッジ時間 165,760 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 100
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    string s = "";
    auto dfs = [&](auto dfs,int pos) -> void {
        if(pos == 10){
            if(s.size() == 5){
                do{

                    cout << s << endl;
                    int h,b; cin >> h >> b;
                    for(int i=1; i<30; i++) cin >> b >> b;
                    if(h == 5) exit(0);
                }while(next_permutation(s.begin(),s.end()));
                sort(s.begin(),s.end());
            }
            return;
        }
        dfs(dfs,pos+1);
        s += '0'+pos;
        dfs(dfs,pos+1);
        s.pop_back();
    };
    dfs(dfs,0);

}
0