結果
| 問題 | No.1686 Geschenkt |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-11 12:28:29 |
| 言語 | Rust (1.92.0 + proconio + num) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 436 bytes |
| 記録 | |
| コンパイル時間 | 24,501 ms |
| コンパイル使用メモリ | 412,780 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-11 12:28:57 |
| 合計ジャッジ時間 | 25,764 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
use proconio::{fastout, input};
#[fastout]
fn main() {
input! {
a: [u8],
}
println!("{}", output(solve(a)));
}
fn solve(a: Vec<u8>) -> u16 {
let mut count_of = [0; 36];
a.iter().for_each(|&a| count_of[a as usize] += 1);
let count_of = count_of;
a.into_iter()
.filter(|&a| count_of[(a - 1) as usize] == 0)
.map(|a| a as u16)
.sum()
}
fn output(ans: u16) -> u16 {
ans
}