結果

問題 No.1939 Numbered Colorful Balls
コンテスト
ユーザー noya2
提出日時 2021-12-19 12:44:44
言語 C++17(gcc12)
(gcc 12.4.0 + boost 1.89.0)
コンパイル:
g++-12 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 569 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 5,926 ms
コンパイル使用メモリ 337,296 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2026-06-24 20:12:53
合計ジャッジ時間 6,693 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

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

const long long maxN = 100'000;
const int maxM = 100;

int main(){
	registerValidation();
    int n = inf.readInt(1,maxN,"n");
    inf.readSpace();
    int m = inf.readInt(1,maxM,"m");
    inf.readEoln();
    set<int> st;
    for (int i = 0; i < m; i++){
        int l = inf.readInt(1,n,"l");
        assert(st.find(l) == st.end());
        st.insert(l);
        if (i == m - 1) inf.readEoln();
        else inf.readSpace();
    }
	inf.readEof();
	return 0;
}
0