結果

問題 No.2925 2-Letter Shiritori
ユーザー InTheBloom
提出日時 2024-10-12 15:28:30
言語 D
(dmd 2.109.1)
結果
TLE  
実行時間 -
コード長 528 bytes
コンパイル時間 3,951 ms
コンパイル使用メモリ 212,304 KB
実行使用メモリ 43,916 KB
最終ジャッジ日時 2024-10-12 15:28:44
合計ジャッジ時間 10,367 ms
ジャッジサーバーID
(参考情報)
judge / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample TLE * 1 -- * 1
other -- * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import std;

void main () {
    // 末尾を必ずαにしたら勝てる
    char a = readln.chomp.to!char;
    writefln("? %s%s", a, a);

    while (true) {
        auto input = readln.split;
        if (input[0] == "!") break;

        auto S = input[1];
        writefln("? %s%s", S[1], a);
        stdout.flush;
    }
}

void read (T...) (string S, ref T args) {
    import std.conv : to;
    import std.array : split;
    auto buf = S.split;
    foreach (i, ref arg; args) {
        arg = buf[i].to!(typeof(arg));
    }
}
0