結果

問題 No.3677 Global Checksum
コンテスト
ユーザー macaroni5708
提出日時 2026-09-19 14:56:33
言語 Rust
(1.97.1 + proconio + num + itertools + ACL)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
TLE  
実行時間 -
コード長 851 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 969 ms
コンパイル使用メモリ 187,636 KB
実行使用メモリ 60,800 KB
最終ジャッジ日時 2026-09-19 14:57:02
合計ジャッジ時間 11,711 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 TLE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#[allow(unused_imports)]
use {
    ac_library::{ModInt as Mint, *},
    itertools::{iproduct, Itertools},
    proconio::{fastout, input, marker::*},
    std::collections::*,
};
#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),* $(,)*) => {
        #[cfg(debug_assertions)]
        eprintln!(concat!($("| ", stringify!($a), "={:?} "),*, "|"), $(&$a),*);
    };
}
use std::io::{BufWriter, Write};
fn main() {
    input! {h:usize,w:usize,a:[[u32;w];h]}
    let mut s = vec![0u32; h];
    for i in 0..h {
        for j in 0..w {
            s[i] = s[i].wrapping_add(a[i][j]);
        }
    }
    let t: u32 = s.iter().copied().reduce(|x, y| x.wrapping_add(y)).unwrap();
    let stdout = std::io::stdout();
    let mut out = BufWriter::new(stdout.lock());
    for i in 0..h {
        writeln!(out, "{}", t.wrapping_add(s[i])).unwrap();
    }
}
0