結果
| 問題 |
No.40 多項式の割り算
|
| コンテスト | |
| ユーザー |
cra77756176
|
| 提出日時 | 2022-12-24 21:28:55 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 515 bytes |
| コンパイル時間 | 12,925 ms |
| コンパイル使用メモリ | 402,456 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-11-18 05:36:53 |
| 合計ジャッジ時間 | 14,574 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 RE * 1 |
ソースコード
fn main() {
let mut xx = String::new();
std::io::Read::read_to_string(&mut std::io::stdin(), &mut xx).ok();
let mut xx: Vec<i64> = xx.split_whitespace().skip(1).flat_map(str::parse).collect();
for i in (0..(xx.len() - 3)).rev() {
xx[i + 1] += std::mem::replace(&mut xx[i + 3], 0);
}
let i = xx.iter().rposition(|&n| n != 0).unwrap_or(0);
let output: Vec<String> = xx[..=i].iter().map(|&n| n.to_string()).collect();
println!("{i}");
println!("{}", output.join(" "));
}
cra77756176