結果
| 問題 | No.3677 Global Checksum |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-04 23:07:26 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,003 bytes |
| 記録 | |
| コンパイル時間 | 2,720 ms |
| コンパイル使用メモリ | 332,372 KB |
| 実行使用メモリ | 7,712 KB |
| 最終ジャッジ日時 | 2026-09-04 23:09:03 |
| 合計ジャッジ時間 | 6,032 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 TLE * 1 -- * 7 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
char *p1,*p2,buf[200001];
#define gc() (p1==p2&&(p2=(p1=buf)+fread(buf,1,200000,stdin),p1==p2)?EOF:*p1++)
uint32_t read(){
uint32_t x = 0;
char c = gc();
while(c < 48) c = gc();
while(c > 47) x = (x << 3) + (x << 1) + (c & 15), c = gc();
return x;
}
char outbuf[1 << 20];
size_t outpos = 0;
void pc(char c){
if(outpos == sizeof(outbuf)){
fwrite(outbuf, 1, outpos, stdout);
outpos = 0;
}
outbuf[outpos++] = c;
}
void write(uint32_t x){
char s[10];
int n = 0;
do {
s[n++] = static_cast<char>('0' + x % 10);
x /= 10;
} while(x);
while(n) pc(s[--n]);
pc('\n');
}
int main(){
uint32_t h = read(), w = read();
vector<uint32_t> S(h);
uint32_t tot = 0;
for(uint32_t y = 0; y < h; y++){
for(uint32_t x = 0; x < w; x++){
S[y] += read();
}
tot += S[y];
}
for(auto v : S) write(tot + v);
fwrite(outbuf, 1, outpos, stdout);
}