結果

問題 No.2743 Twisted Lattice
コンテスト
ユーザー ponjuice
提出日時 2024-04-18 00:38:00
言語 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  
実行時間 -
コード長 719 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 5,058 ms
コンパイル使用メモリ 262,644 KB
実行使用メモリ 30,552 KB
最終ジャッジ日時 2026-07-04 12:22:07
合計ジャッジ時間 7,126 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include"testlib.h"
#include<assert.h>
using namespace std;

const int MIN_HW = 1;
const int MAX_HW = 1'000'000'000;
const int MIN_MUL_HW = 2;
const int MIN_N = 2;
const int MAX_N = 200'000;

int main() {
    registerValidation();

    int H = inf.readInt(MIN_HW, MAX_HW);
    inf.readSpace();
    int W = inf.readInt(MIN_HW, MAX_HW);
    inf.readSpace();
    int N = inf.readInt(MIN_N, MAX_N);
    inf.readEoln();
    assert(MIN_MUL_HW <= 1LL * H * W);
    set<pair<int,int>> st;
    
    for(int i = 0; i < N; i++){
        int h = inf.readInt(1, H);
        inf.readSpace();
        int w = inf.readInt(1, W);
        inf.readEoln();
        st.insert({h, w});
    }
    inf.readEof();

    assert(st.size() == N);
}
0