結果

問題 No.305 鍵(2)
ユーザー kpinkcatkpinkcat
提出日時 2023-11-13 00:16:16
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,080 bytes
コンパイル時間 2,136 ms
コンパイル使用メモリ 204,568 KB
実行使用メモリ 24,000 KB
平均クエリ数 111.00
最終ジャッジ日時 2023-11-13 00:16:22
合計ジャッジ時間 5,336 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 26 ms
24,000 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#include<list>
#include<queue>
#include<math.h>
#include<bitset>
using ll = long long;
using namespace std;

int main()
{
    int q = 10, ex = 0;
    string base = "0000000000";
    vector<int> num(10), ans(10);
    while (q--){
        int ans;
        string s = "";
        for (int i = 0; i < 10; i++) s += to_string(q);
        cout << s << endl;
        cin >> ans >> s;
        if (!ans){
            ex = 1;
            base = s;
        }
        num[q] = ans;
    }
    q = 10;
    while (q--){
        int ans1;
        string s;
        for (int i = 0; i < 10; i++) {
            if (q == 0) base = "1111111111";
            base[i] = '0'+ q;
            cout << base << endl;
            cin >> ans1 >> s;
            if (q != 0) {
                if (ans1 == num[0]+1) ans[i] = q;
            } else {
                if (ans1 == num[1]+1) ans[i] = 0;
            }
        }
    }
    for (auto x : ans) cout << x;
    cout << endl;
}
0