結果
| 問題 | No.138 化石のバージョン |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-30 19:47:34 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 558 bytes |
| 記録 | |
| コンパイル時間 | 10,595 ms |
| コンパイル使用メモリ | 404,584 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2025-11-30 19:47:48 |
| 合計ジャッジ時間 | 12,388 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 7 |
ソースコード
use proconio::input;
use std::cmp::Ordering::{Equal, Greater, Less};
fn main() {
input! {
s: String,
t: String,
}
let mut a = s.chars().filter_map(|c| c.to_digit(10));
let mut b = t.chars().filter_map(|c| c.to_digit(10));
for (x, y) in a.by_ref().zip(b.by_ref()) {
match x.cmp(&y) {
Equal => continue,
Greater => {
println!("YES");
return;
},
Less => {
println!("NO");
return;
},
}
}
println!("YES");
}