結果
| 問題 | No.3677 Global Checksum |
| コンテスト | |
| ユーザー |
Rubikun
|
| 提出日時 | 2026-09-04 22:37:28 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 2,537 bytes |
| 記録 | |
| コンパイル時間 | 2,678 ms |
| コンパイル使用メモリ | 212,992 KB |
| 実行使用メモリ | 7,712 KB |
| 最終ジャッジ日時 | 2026-09-04 22:48:49 |
| 合計ジャッジ時間 | 5,198 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 TLE * 1 -- * 6 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pair<int,int>>
#define vll vector<pair<ll,ll>>
#define vvi vector<vector<int>>
#define vvl vector<vector<ll>>
#define vvii vector<vector<pair<int,int>>>
#define vvll vector<vector<pair<ll,ll>>>
#define vst vector<string>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define mkunique(x) sort(all(x));(x).erase(unique(all(x)),(x).end())
#define fi first
#define se second
#define mp make_pair
#define si(x) int(x.size())
const int mod=998244353,MAX=300005,INF=15<<26;
typedef unsigned int uint;
// https://usaco.guide/general/fast-io?lang=cpp
const int MOD = 1e9 + 7;
const int BUF_SZ = 1 << 15;
// BeginCodeSnip{Input}
inline namespace Input {
char buf[BUF_SZ];
int pos;
int len;
char next_char() {
if (pos == len) {
pos = 0;
len = (int)fread(buf, 1, BUF_SZ, stdin);
if (!len) { return EOF; }
}
return buf[pos++];
}
int read_int() {
uint x;
char ch;
int sgn = 1;
while (!isdigit(ch = next_char())) {
if (ch == '-') { sgn *= -1; }
}
x = ch - '0';
while (isdigit(ch = next_char())) { x = x * 10 + (ch - '0'); }
return x * sgn;
}
} // namespace Input
// EndCodeSnip
// BeginCodeSnip{Output}
inline namespace Output {
char buf[BUF_SZ];
int pos;
void flush_out() {
fwrite(buf, 1, pos, stdout);
pos = 0;
}
void write_char(char c) {
if (pos == BUF_SZ) { flush_out(); }
buf[pos++] = c;
}
void write_int(uint x) {
static char num_buf[100];
if (x < 0) {
write_char('-');
x *= -1;
}
int len = 0;
for (; x >= 10; x /= 10) { num_buf[len++] = (char)('0' + (x % 10)); }
write_char((char)('0' + x));
while (len) { write_char(num_buf[--len]); }
write_char('\n');
}
// auto-flush output when program exits
void init_output() { assert(atexit(flush_out) == 0); }
} // namespace Output
// EndCodeSnip
int main(){
init_output();
int H=read_int();
int W=read_int();
vector<uint> S(H);
uint T=0;
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
uint x=read_int();
S[i]+=x;
T+=x;
}
}
for(int i=0;i<H;i++){
write_int(S[i]+T);
}
}
Rubikun