結果
| 問題 | No.2925 2-Letter Shiritori |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-12 17:03:42 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 596 bytes |
| 記録 | |
| コンパイル時間 | 16,635 ms |
| コンパイル使用メモリ | 379,172 KB |
| 実行使用メモリ | 41,488 KB |
| 最終ジャッジ日時 | 2024-10-12 17:04:23 |
| 合計ジャッジ時間 | 23,315 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 -- * 1 |
| other | -- * 10 |
ソースコード
use std::io::{read_to_string, Write};
use proconio::input_interactive;
fn main() {
input_interactive!(alpha: String);
let mut prev = alpha.repeat(2);
loop {
println!("? {}", prev.chars().rev().collect::<String>());
std::io::stdout().flush().unwrap();
let line = read_to_string(std::io::stdin()).unwrap();
let mut line = line.split_whitespace();
let symbol = line.next().unwrap().parse::<char>().unwrap();
if symbol == '!' {
break;
}
let t = line.next().unwrap();
prev = t.to_string();
}
}