結果
問題 |
No.930 数列圧縮
|
ユーザー |
|
提出日時 | 2023-01-20 00:48:38 |
言語 | Rust (1.83.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 499 bytes |
コンパイル時間 | 15,124 ms |
コンパイル使用メモリ | 385,660 KB |
実行使用メモリ | 9,216 KB |
最終ジャッジ日時 | 2024-06-22 17:55:47 |
合計ジャッジ時間 | 20,524 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 5 WA * 19 |
ソースコード
fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let mut a = String::new(); std::io::stdin().read_line(&mut a).ok(); let a: Vec<usize> = a.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); if a[0] > a[n-1] { println!("No"); return; } println!("Yes"); println!("{}", (1..=n).filter(|&v| v != a[0]).map(|v| v.to_string()).collect::<Vec<_>>().join(" ")); }