結果
| 問題 | No.3677 Global Checksum |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2026-09-06 00:56:59 |
| 言語 | Rust (1.97.1 + proconio + num + itertools + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 612 bytes |
| 記録 | |
| コンパイル時間 | 4,926 ms |
| コンパイル使用メモリ | 183,240 KB |
| 実行使用メモリ | 56,960 KB |
| 最終ジャッジ日時 | 2026-09-06 00:57:21 |
| 合計ジャッジ時間 | 11,979 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 TLE * 3 |
ソースコード
use proconio::{input, fastout};
#[fastout]
fn main() {
input! {
h: usize,
w: usize,
// H 行分、それぞれ W 個の整数を持つ2次元配列(グリッド)として一括取得
grid: [u32; w * h],
}
let mut c: Vec<u32> = vec![0; h];
let mut s:u32=0;
for i in 0..h{
let mut x: u32 = 0;
let row = &grid[i * w .. (i + 1) * w];
for &a in row {
x = x.wrapping_add(a);
}
c[i] = x;
s = s.wrapping_add(x);
}
for i in 0..h{
println!("{}", s.wrapping_add(c[i]));
}
}
titia