結果
| 問題 | No.3677 Global Checksum |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-09 03:33:20 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.92.0 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 929 bytes |
| 記録 | |
| コンパイル時間 | 5,705 ms |
| コンパイル使用メモリ | 376,996 KB |
| 実行使用メモリ | 11,636 KB |
| 最終ジャッジ日時 | 2026-10-09 03:33:56 |
| 合計ジャッジ時間 | 25,242 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 TLE * 9 |
ソースコード
#ifdef ONLINE_JUDGE
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#endif
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); ++i)
using namespace std;
using ll = long long;
ll read() {
ll ret = 0;
int ch = getchar_unlocked();
while (isspace(ch)) { ch = getchar_unlocked(); }
for (; isdigit(ch); ch = getchar_unlocked())
ret = (ret * 10) + (ch - '0');
ungetc(ch, stdin);
return ret;
}
int main() {
int H = read();
int W = read();
ll S[1000000];
ll T = 0;
constexpr ll MOD = 1LL << 32;
int A;
rep(i, H) {
rep(j, W) {
cin >> A;
S[i] += A;
}
S[i] %= MOD;
T += S[i];
}
T %= MOD;
rep(i, H) {
ll ans = S[i] + T;
cout << (ans >= MOD ? ans-MOD : ans) << "\n";
}
}