結果

問題 No.3677 Global Checksum
コンテスト
ユーザー tnakao0123
提出日時 2026-09-06 15:07:23
言語 C++17
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
TLE  
実行時間 -
コード長 718 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 215 ms
コンパイル使用メモリ 51,372 KB
実行使用メモリ 11,776 KB
最終ジャッジ日時 2026-09-06 15:07:59
合計ジャッジ時間 11,924 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12 TLE * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

/* -*- coding: utf-8 -*-
 *
 * 3677.cc:  No.3677 Global Checksum - yukicoder
 */

#include<cstdio>
#include<algorithm>

using namespace std;

/* constant */

const int MAX_H = 1000000;
const int MAX_HW = 4000000;
const long long MASK = (1LL << 32) - 1;

/* typedef */

using ll = long long;

/* global variables */

ll ss[MAX_H];

/* subroutines */

/* main */

int main() {
  int h, w;
  scanf("%d%d", &h, &w);

  int hw = h * w;
  ll t = 0;
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      int aij;
      scanf("%d", &aij);
      ss[i] += aij;
    }
    ss[i] &= MASK;
    t += ss[i];
  }
  t &= MASK;

  for (int i = 0; i < h; i++)
    printf("%lld\n", (ss[i] + t) & MASK);
  
  return 0;
}

0