結果

問題 No.305 鍵(2)
ユーザー latte0119latte0119
提出日時 2015-11-27 22:37:56
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,075 bytes
コンパイル時間 1,746 ms
コンパイル使用メモリ 143,168 KB
実行使用メモリ 24,408 KB
平均クエリ数 102.00
最終ジャッジ日時 2023-09-23 06:41:41
合計ジャッジ時間 4,745 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
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>
using namespace std;

#define int long long

typedef pair<int,int>pint;
typedef vector<int>vint;
#define pb push_back
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
template<class T,class U>void chmin(T &t,U f){if(t>f)t=f;}
template<class T,class U>void chmax(T &t,U f){if(t<f)t=f;}

char s[100];

signed main(){
    puts("0000000000");
    fflush(stdout);
    int base;
    scanf("%d",&base);

    int ans[10];

    rep(i,10){
        int ma=0,v=0;
        for(int j=0;j<10;j++){
            for(int k=0;k<i;k++)printf("0");
            printf("%d",j);
            for(int k=i+1;k<10;k++)printf("0");
            puts("");
            fflush(stdout);
            int a;
            scanf("%d%s",&a,s);
            if(s[0]=='u')return 0;
            if(v<a){
                ma=j;
                v=a;
            }
        }
        ans[i]=ma;
    }

    for(int i=0;i<10;i++)printf("%d",ans[i]);
    puts("");
    scanf("%d%s",&base,s);
    return 0;
}
0