結果

問題 No.1308 ジャンプビーコン
ユーザー ningenMeningenMe
提出日時 2020-12-05 06:18:02
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 1,107 bytes
コンパイル時間 5,954 ms
コンパイル使用メモリ 217,316 KB
実行使用メモリ 4,480 KB
最終ジャッジ日時 2023-10-13 13:50:08
合計ジャッジ時間 7,596 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 RE -
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
testcase_39 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

using namespace std;

constexpr int MIN_T = 0;
constexpr int MAX_T = 1;
constexpr int MIN_N = 1;
constexpr int MAX_N = 1500;
constexpr int MIN_M = 0;
constexpr int MAX_M = 1500;
constexpr int MIN_W = 1;
constexpr int MAX_W = 1000000000;

int main(int argc, char *argv[]) {
    registerValidation(argc, argv);
    int T = inf.readInt(MIN_T, MAX_T, "T");
    inf.readEoln();
    int N = inf.readInt(MIN_N, MAX_N, "N");
    inf.readSpace();
    int M = inf.readInt(MIN_M, MAX_M, "M");
    inf.readEoln();

    vector<int> u(M),v(M),w(M);
    set<pair<int,int>> st;
    for(int i = 0; i < M; ++i) {
        u[i] = inf.readInt(1, N, format("u_%d", i+1));
        inf.readSpace();
        v[i] = inf.readInt(1, N, format("v_%d", i+1));
        inf.readSpace();
        w[i] = inf.readInt(MIN_W, MAX_W, format("w_%d", i+1));
        inf.readEoln();

        ensure(u[i]!=v[i]);
        ensure(st.count({u[i],v[i]})==0);
        ensure(st.count({v[i],u[i]})==0);

        st.insert({u[i],v[i]});
        st.insert({v[i],u[i]});
    }    
    inf.readEof();
    return 0;
} 
0