結果

問題 No.3107 Listening
ユーザー SnowBeenDidingSnowBeenDiding
提出日時 2024-04-01 23:22:43
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 1,355 ms / 2,000 ms
コード長 553 bytes
コンパイル時間 5,535 ms
コンパイル使用メモリ 312,576 KB
実行使用メモリ 12,364 KB
最終ジャッジ日時 2024-04-01 23:23:25
合計ジャッジ時間 41,388 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,548 KB
testcase_01 AC 2 ms
6,548 KB
testcase_02 AC 2 ms
6,548 KB
testcase_03 AC 597 ms
6,548 KB
testcase_04 AC 94 ms
6,548 KB
testcase_05 AC 163 ms
6,548 KB
testcase_06 AC 121 ms
6,548 KB
testcase_07 AC 413 ms
7,804 KB
testcase_08 AC 237 ms
7,152 KB
testcase_09 AC 332 ms
6,548 KB
testcase_10 AC 525 ms
6,548 KB
testcase_11 AC 748 ms
6,548 KB
testcase_12 AC 243 ms
7,040 KB
testcase_13 AC 599 ms
6,548 KB
testcase_14 AC 325 ms
7,424 KB
testcase_15 AC 198 ms
6,548 KB
testcase_16 AC 118 ms
6,548 KB
testcase_17 AC 158 ms
6,912 KB
testcase_18 AC 61 ms
6,548 KB
testcase_19 AC 429 ms
6,548 KB
testcase_20 AC 444 ms
6,548 KB
testcase_21 AC 985 ms
7,808 KB
testcase_22 AC 634 ms
6,548 KB
testcase_23 AC 904 ms
8,008 KB
testcase_24 AC 693 ms
6,548 KB
testcase_25 AC 546 ms
7,936 KB
testcase_26 AC 155 ms
6,784 KB
testcase_27 AC 331 ms
6,548 KB
testcase_28 AC 728 ms
6,548 KB
testcase_29 AC 802 ms
7,552 KB
testcase_30 AC 321 ms
7,296 KB
testcase_31 AC 396 ms
7,168 KB
testcase_32 AC 641 ms
6,784 KB
testcase_33 AC 1,307 ms
12,252 KB
testcase_34 AC 1,278 ms
12,252 KB
testcase_35 AC 1,306 ms
12,256 KB
testcase_36 AC 1,355 ms
12,364 KB
testcase_37 AC 1,317 ms
12,252 KB
testcase_38 AC 1,289 ms
12,256 KB
testcase_39 AC 1,284 ms
12,364 KB
testcase_40 AC 1,309 ms
12,364 KB
testcase_41 AC 1,257 ms
12,248 KB
testcase_42 AC 1,310 ms
12,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#include <atcoder/all>
#define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
using namespace std;
using namespace atcoder;

typedef long long ll;

int main() {
    int n, m;
    cin >> n >> m;
    set<int> st;
    vector<int> ans;
    rep(i, 0, m) {
        int a, b;
        cin >> a >> b;
        if (!st.count(a) && !st.count(b)) {
            st.insert(a);
            st.insert(b);
            ans.push_back(i + 1);
        }
    }
    cout << ans.size() << endl;
    rep(i, 0, ans.size()) cout << ans[i] << endl;
}
0