結果
| 問題 | No.739 大事なことなので2度言います |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-05 14:43:52 |
| 言語 | Rust (1.92.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 470 bytes |
| 記録 | |
| コンパイル時間 | 1,062 ms |
| コンパイル使用メモリ | 201,384 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-02-05 14:43:55 |
| 合計ジャッジ時間 | 2,766 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 7 |
ソースコード
fn main() {
let stdin = std::io::read_to_string(std::io::stdin()).unwrap();
let mut stdin = stdin.split_ascii_whitespace();
let s: String = stdin.next().unwrap().parse().unwrap();
println!("{}", output(solve(s)));
}
fn solve(s: String) -> bool {
let s = s.into_bytes();
s.len() & 1 == 0 && s[..(s.len() / 2)] == s[(s.len() / 2)..]
}
fn output(ans: bool) -> &'static str {
match ans {
true => "YES",
false => "NO",
}
}