結果

問題 No.1676 Coin Trade (Single)
コンテスト
ユーザー akakimidori
提出日時 2021-08-15 02:00:56
言語 C++17(gcc12)
(gcc 12.4.0 + boost 1.90.0)
コンパイル:
g++-12 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 958 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 5,196 ms
コンパイル使用メモリ 257,592 KB
実行使用メモリ 13,524 KB
最終ジャッジ日時 2026-06-22 17:07:25
合計ジャッジ時間 8,183 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 35
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include "testlib.h"
#include <iostream>
#include <cassert>

const int MIN_N = 1;
const int MAX_N = 200000;

const int MIN_K = 1;
const int MAX_K = 1;

const int MIN_A = 1;
const int MAX_A = 1000000000;

const int SUM_M = 100000;

int main(int argc, char** argv) {
    registerValidation(argc, argv);
    const int n = inf.readInt(MIN_N, MAX_N);
    inf.readSpace();
    const int k = inf.readInt(MIN_K, MAX_K);
    inf.readEoln();
    int sum_m = 0;
    for (int i = 1; i <= n; ++i) {
        inf.readInt(MIN_A, MAX_A);
        inf.readSpace();
        const int m = inf.readInt(0, i - 1);
        sum_m += m;
        assert(sum_m <= SUM_M);
        inf.readEoln();
        
        int pre = 0;
        for (int j = 0; j < m; ++j) {
            const int b = inf.readInt(pre + 1, i);
            pre = b;
            if (j + 1 < m) {
                inf.readSpace();
            }
        }
        inf.readEoln();
    }
    inf.readEof();
    return 0;
}
0