結果

問題 No.3677 Global Checksum
コンテスト
ユーザー butsurizuki
提出日時 2026-09-04 22:37:51
言語 C++23
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
TLE  
実行時間 -
コード長 1,436 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,098 ms
コンパイル使用メモリ 337,616 KB
実行使用メモリ 95,112 KB
最終ジャッジ日時 2026-09-04 22:49:01
合計ジャッジ時間 5,535 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12 TLE * 1 -- * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<bits/stdc++.h>
using namespace std;

// https://tjkendev.github.io/procon-library/cpp/template/fast_io.html
class FastIO {
  static const int rdata_sz = (1 << 25), wdata_sz = (1 << 25);
  char rdata[rdata_sz], wdata[wdata_sz], *rb, *wb;
  char tmp_s[20];

public:
  FastIO() {
    fread(rdata, 1, rdata_sz, stdin);
    rb = rdata; wb = wdata;
  }
  ~FastIO() {
    fwrite(wdata, 1, wb - wdata, stdout);
  }

  template<typename T>
  inline void read_i(T &x) {
    bool neg = false;
    x = 0;
    while((*rb < '0' || *rb > '9') && *rb != '-') ++rb;
    if(*rb == '-') {
      neg = true;
      ++rb;
    }
    while('0' <= *rb && *rb <= '9') {
      x = 10 * x + (*rb - '0');
      ++rb;
    }
    if(neg) x = -x;
  }

#define pc(x) *(wb++) = x
  template<typename T>
  inline void writeln_i(T x) {
    if (x == 0) { pc('0'); pc('\n'); return; }
    if(x < 0) { pc('-'); x = -x; }
    char *t = tmp_s;
    while(x) {
      T y = x / 10;
      *(t++) = (x - y*10) + '0';
      x = y;
    }
    while(t != tmp_s) pc(*(--t));
    pc('\n');
  }
#undef pc
};
FastIO io;

using uint=unsigned int;

int main(){
  int n,m;
  io.read_i(n);
  io.read_i(m);
  vector<vector<uint>> v(n,vector<uint>(m));
  vector<uint> w;
  uint t=0;
  for(auto &nx : v){
    uint c=0;
    for(auto &ny : nx){
      io.read_i(ny);
      c+=ny;
    }
    t+=c;
    w.push_back(c);
  }
  for(auto &nx : w){
    nx+=t;
    io.writeln_i(nx);
  }
  return 0;
}
0