結果

問題 No.1557 Binary Variable
コンテスト
ユーザー noya2
提出日時 2021-06-22 23:45:55
言語 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  
実行時間 -
コード長 637 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 6,792 ms
コンパイル使用メモリ 335,032 KB
実行使用メモリ 28,748 KB
最終ジャッジ日時 2026-06-21 05:19:07
合計ジャッジ時間 13,442 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 34
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

/*
入力 validation。WA なら OK。
*/

#include "testlib.h"
//#include "testlib.cpp"
#include<bits/stdc++.h>
using namespace std;

int main(){
	registerValidation();
    const int maxn = 1'000'000'000;
    const int maxm = 200'000;
    int n = inf.readInt(1,maxn,"n");
    inf.readSpace();
    int m = inf.readInt(1,maxm,"m");
    inf.readEoln();
    set<pair<int,int>> st;
    for (int i = 0; i < m; i++){
        int l = inf.readInt(1,n,"l");
        inf.readSpace();
        int r = inf.readInt(l,n,"r");
        inf.readEoln();
        st.insert(pair<int,int>(l,r));
    }
    assert(st.size() == m);
	inf.readEof();
	return 0;
}
0