結果

問題 No.3677 Global Checksum
コンテスト
ユーザー titan23
提出日時 2026-09-04 22:34:46
言語 C++23(gcc16)
(gcc 16.1.0 + boost 1.92.0)
コンパイル:
g++-16 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
TLE  
実行時間 -
コード長 1,953 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,150 ms
コンパイル使用メモリ 339,556 KB
実行使用メモリ 81,536 KB
最終ジャッジ日時 2026-09-04 22:39:28
合計ジャッジ時間 8,813 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12 TLE * 5 -- * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/hash_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

// #include <atcoder/all>
// using mint = atcoder::modint998244353;

using ll = long long;
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)

// const ll dy[] = {-1, -1, -1, 0, 0, 1, 1, 1};
// const ll dx[] = {-1, 0, 1, -1, 1, -1, 0, 1};
const ll dy[] = {-1, 0, 0, 1};
const ll dx[] = {0, -1, 1, 0};

template <class T, class T1, class T2> bool isrange(T target, T1 low, T2 high) { return low <= target && target < high; }
template <class T, class U> T min(const T &t, const U &u) { return t < u ? t : u; }
template <class T, class U> T max(const T &t, const U &u) { return t < u ? u : t; }
template <class T, class U> bool chmin(T &t, const U &u) { if (t > u) { t = u; return true; } return false; }
template <class T, class U> bool chmax(T &t, const U &u) { if (t < u) { t = u; return true; } return false; }
template<class K, class V> using hash_map = gp_hash_table<K, V>;
template<class K> using hash_set = gp_hash_table<K, null_type>;

// #include "titan_cpplib/others/io.cpp"
// #include "titan_cpplib/others/print.cpp"


void solve() {
    const ll mod = 1ll << 32;
    int h, w; cin >> h >> w;
    vector<vector<ll>> A(h, vector<ll>(w));
    rep(i, h) rep(j, w) cin >> A[i][j];
    vector<ll> S(h);
    rep(i, h) {
        rep(j, w) {
            S[i] += A[i][j];
            S[i] %= mod;
        }
    }
    ll T = 0;
    rep(i, h) {
        T += S[i];
        T %= mod;
    }
    rep(i, h) {
        cout << (S[i]+T) % mod << "\n";
    }
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(15);
    cerr << fixed << setprecision(15);

    int t = 1;
    // cin >> t;
    for (int i = 0; i < t; ++i) {
        solve();
    }

    return 0;
}
0