結果
| 問題 | No.3555 Use Money Wisely |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2026-05-30 12:57:40 |
| 言語 | Rust (1.99.0 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 0 ms / 2,000 ms |
| + 764µs | |
| コード長 | 620 bytes |
| 記録 | |
| コンパイル時間 | 625 ms |
| コンパイル使用メモリ | 193,156 KB |
| 実行使用メモリ | 9,868 KB |
| 最終ジャッジ日時 | 2026-10-07 09:43:20 |
| 合計ジャッジ時間 | 2,719 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| 部分点1 | 20 % | AC * 11 |
| 部分点2 | 10 % | AC * 15 |
| 部分点3 | 30 % | AC * 16 |
| 部分点4 | 40 % | AC * 31 |
| 合計 | 100 点 |
ソースコード
#![allow(non_snake_case, unused_imports)]
use proconio::{input, marker::Usize1, marker::Chars};
use itertools::Itertools;
#[allow(unused_macros)]
macro_rules! d {
( $( $x:expr ),* $(,)? ) => {
eprintln!(
concat!( $( stringify!($x), "={:?} " ),* ),
$( $x ),*
);
};
}
#[allow(dead_code)]
fn yn(b: bool) -> &'static str {
if b { "Yes" } else { "No" }
}
fn main() {
input! {
Y: i64,
N: usize,
A: [i64; N],
}
let x = Y - A.iter().sum::<i64>();
if x < 0 {
println!("red");
} else {
println!("{}", x);
}
}
norioc