結果

問題 No.2925 2-Letter Shiritori
ユーザー loop0919loop0919
提出日時 2024-06-24 13:40:13
言語 C++23(gcc13)
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 408 bytes
コンパイル時間 3,286 ms
コンパイル使用メモリ 272,068 KB
実行使用メモリ 25,452 KB
平均クエリ数 26.00
最終ジャッジ日時 2024-10-12 14:00:51
合計ジャッジ時間 4,878 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
25,196 KB
testcase_01 AC 57 ms
24,812 KB
testcase_02 AC 56 ms
25,452 KB
testcase_03 AC 60 ms
24,812 KB
testcase_04 AC 56 ms
25,196 KB
testcase_05 AC 56 ms
24,556 KB
testcase_06 AC 56 ms
24,940 KB
testcase_07 AC 56 ms
25,196 KB
testcase_08 AC 57 ms
24,800 KB
testcase_09 AC 56 ms
25,196 KB
testcase_10 AC 56 ms
24,940 KB
testcase_11 AC 55 ms
24,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main(){
    char alpha;
    cin >> alpha;
    
    char pre = alpha;
    
    while (true) {
        cout << "? " << pre << alpha << endl;
        
        char cmd;
        string t;
        cin >> cmd >> t;
        
        if (cmd == '!') {
            break;
        } 
        if (cmd == '?') {
            pre = t[1];
        }
    }
    return 0;
}
0