結果
| 問題 | No.138 化石のバージョン |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-07 14:01:18 |
| 言語 | Rust (1.93.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 857 bytes |
| 記録 | |
| コンパイル時間 | 4,643 ms |
| コンパイル使用メモリ | 195,472 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-02-07 14:01:25 |
| 合計ジャッジ時間 | 3,843 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
ソースコード
fn main() {
let stdin = std::io::read_to_string(std::io::stdin()).unwrap();
let mut stdin = stdin.split_ascii_whitespace();
let a: String = stdin.next().unwrap().parse().unwrap();
let b: String = stdin.next().unwrap().parse().unwrap();
println!("{}", output(solve(a, b)));
}
fn solve(a: String, b: String) -> bool {
let mut a = a.split('.');
let mut b = b.split('.');
let a: (u8, u8, u8) = (
a.next().unwrap().parse().unwrap(),
a.next().unwrap().parse().unwrap(),
a.next().unwrap().parse().unwrap(),
);
let b: (u8, u8, u8) = (
b.next().unwrap().parse().unwrap(),
b.next().unwrap().parse().unwrap(),
b.next().unwrap().parse().unwrap(),
);
a >= b
}
fn output(ans: bool) -> &'static str {
match ans {
true => "YES",
false => "NO",
}
}