結果
| 問題 | No.138 化石のバージョン |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-30 20:00:07 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 657 bytes |
| 記録 | |
| コンパイル時間 | 11,711 ms |
| コンパイル使用メモリ | 403,600 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-11-30 20:00:22 |
| 合計ジャッジ時間 | 13,027 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
ソースコード
use proconio::input;
fn main() {
input! {
s: String,
t: String,
}
let a: Vec<u32> = s
.split(|c: char| !c.is_ascii_digit())
.filter(|part| !part.is_empty())
.map(|part| part.parse::<u32>().unwrap_or(0))
.collect();
let b: Vec<u32> = t
.split(|c: char| !c.is_ascii_digit())
.filter(|part| !part.is_empty())
.map(|part| part.parse::<u32>().unwrap_or(0))
.collect();
for (x, y) in a.iter().zip(b) {
if x > &y {
println!("YES");
return;
} else if x < &y {
println!("NO");
return;
}
}
println!("YES");
}