結果

問題 No.3677 Global Checksum
コンテスト
ユーザー harurun
提出日時 2026-08-11 04:59:42
言語 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  
実行時間 -
コード長 811 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,157 ms
コンパイル使用メモリ 158,800 KB
実行使用メモリ 7,552 KB
最終ジャッジ日時 2026-09-04 22:20:22
合計ジャッジ時間 5,422 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 TLE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#pragma GCC optimize("O3,unroll-loops")

#include <cstdint>
#include <iostream>

std::uint32_t sums[1000010];

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);

    std::uint32_t h, w;
    std::cin >> h >> w;

    std::uint32_t total = 0;

    for (std::uint32_t i = 0; i < h; ++i) {
        std::uint32_t sum = 0;
        std::uint32_t x;

        std::uint32_t j = 0;

        for (; j + 3 < w; j += 4) {
            std::uint32_t x0, x1, x2, x3;
            std::cin >> x0 >> x1 >> x2 >> x3;
            sum += x0 + x1 + x2 + x3;
        }

        for (; j < w; ++j) {
            std::cin >> x;
            sum += x;
        }

        sums[i] = sum;
        total += sum;
    }

    for (std::uint32_t i = 0; i < h; ++i) {
        std::cout << sums[i] + total << '\n';
    }
}
0