結果
問題 | No.2925 2-Letter Shiritori |
ユーザー |
|
提出日時 | 2024-10-12 16:53:27 |
言語 | Rust (1.83.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 518 bytes |
コンパイル時間 | 21,331 ms |
コンパイル使用メモリ | 383,088 KB |
実行使用メモリ | 25,488 KB |
平均クエリ数 | 8.75 |
最終ジャッジ日時 | 2024-10-12 16:54:12 |
合計ジャッジ時間 | 15,551 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 10 |
ソースコード
use std::io::Write;use proconio::input_interactive;fn main() {input_interactive!(alpha: char);let mut prev = alpha;loop {println!("? {}{}", prev, prev);std::io::stdout().flush().unwrap();let mut line = String::new();std::io::stdin().read_line(&mut line).unwrap();let split_line = line.split_whitespace().collect::<Vec<_>>();if split_line[0] == "!" {break;}prev = split_line[1].chars().last().unwrap();}}