結果
| 問題 | No.532 Possible or Impossible |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-11-27 17:30:26 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 593 bytes |
| コンパイル時間 | 13,856 ms |
| コンパイル使用メモリ | 378,268 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-04 07:11:47 |
| 合計ジャッジ時間 | 12,201 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 WA * 4 |
ソースコード
fn main() {
let mut nm = String::new();
std::io::stdin().read_line(&mut nm).ok();
let nm: Vec<usize> = nm.trim().split_whitespace().map(|s| s.parse().unwrap()).collect();
let n = nm[0];
let m = nm[1];
if m == 0 {
if n <= 2 {
println!("Impossible");
} else {
println!("Possible");
}
} else if m > 1 {
if vec![(2, 2), (3, 2), (3, 3), (4, 3)].contains(&(n, m)) {
println!("Impossible");
} else {
println!("Possible");
}
} else {
println!("Possible");
}
}