結果

問題 No.3677 Global Checksum
コンテスト
ユーザー titia
提出日時 2026-09-04 23:32:06
言語 Rust
(1.97.1 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
TLE  
実行時間 -
コード長 867 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 468 ms
コンパイル使用メモリ 190,656 KB
実行使用メモリ 9,792 KB
最終ジャッジ日時 2026-09-04 23:32:12
合計ジャッジ時間 5,468 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12 TLE * 1 -- * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unnecessary parentheses around assigned value
  --> src/main.rs:29:11
   |
29 |         s=(s + x)
   |           ^     ^
   |
   = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default
help: remove these parentheses
   |
29 -         s=(s + x)
29 +         s=s + x
   |

warning: unused variable: `w`
 --> src/main.rs:2:17
  |
2 |         let (h, w): (usize, usize) = {
  |                 ^ help: if this is intentional, prefix it with an underscore: `_w`
  |
  = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default

warning: variable `A` should have a snake case name
  --> src/main.rs:16:13
   |
16 |         let A: Vec<u32> = {
   |             ^ help: convert the identifier to snake case: `a`
   |
   = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default

ソースコード

diff #
raw source code

fn main() {
        let (h, w): (usize, usize) = {
        let mut line: String = String::new();
        std::io::stdin().read_line(&mut line).unwrap();
        let mut iter = line.split_whitespace();
        (
            iter.next().unwrap().parse().unwrap(),
            iter.next().unwrap().parse().unwrap(),
        )
    };

    let mut c: Vec<u32> = vec![0; h];
    let mut s:u32=0;

    for i in 0..h{
        let A: Vec<u32> = {
            let mut line: String = String::new();
            std::io::stdin().read_line(&mut line).unwrap();
            line.split_whitespace()
                .map(|x| x.parse().unwrap())
                .collect()
        };
        let mut x: u32 = 0;
        for &a in &A {
            x += a as u32;

        }
        c[i] = x;
        s=(s + x)
    }

    for i in 0..h{
        println!("{}",s + c[i]);
    }
      


}
0