結果

問題 No.3107 Listening
ユーザー cho435cho435
提出日時 2024-04-03 16:21:18
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 742 ms / 2,000 ms
コード長 437 bytes
コンパイル時間 5,764 ms
コンパイル使用メモリ 263,004 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-04-03 16:21:53
合計ジャッジ時間 31,850 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 AC 394 ms
6,676 KB
testcase_04 AC 72 ms
6,676 KB
testcase_05 AC 112 ms
6,676 KB
testcase_06 AC 91 ms
6,676 KB
testcase_07 AC 254 ms
6,676 KB
testcase_08 AC 153 ms
6,676 KB
testcase_09 AC 229 ms
6,676 KB
testcase_10 AC 392 ms
6,676 KB
testcase_11 AC 526 ms
6,676 KB
testcase_12 AC 162 ms
6,676 KB
testcase_13 AC 389 ms
6,676 KB
testcase_14 AC 203 ms
6,676 KB
testcase_15 AC 154 ms
6,676 KB
testcase_16 AC 84 ms
6,676 KB
testcase_17 AC 107 ms
6,676 KB
testcase_18 AC 47 ms
6,676 KB
testcase_19 AC 291 ms
6,676 KB
testcase_20 AC 331 ms
6,676 KB
testcase_21 AC 598 ms
6,676 KB
testcase_22 AC 429 ms
6,676 KB
testcase_23 AC 553 ms
6,676 KB
testcase_24 AC 523 ms
6,676 KB
testcase_25 AC 317 ms
6,676 KB
testcase_26 AC 106 ms
6,676 KB
testcase_27 AC 247 ms
6,676 KB
testcase_28 AC 471 ms
6,676 KB
testcase_29 AC 502 ms
6,676 KB
testcase_30 AC 210 ms
6,676 KB
testcase_31 AC 260 ms
6,676 KB
testcase_32 AC 430 ms
6,676 KB
testcase_33 AC 729 ms
6,676 KB
testcase_34 AC 736 ms
6,676 KB
testcase_35 AC 728 ms
6,676 KB
testcase_36 AC 735 ms
6,676 KB
testcase_37 AC 742 ms
6,676 KB
testcase_38 AC 732 ms
6,676 KB
testcase_39 AC 728 ms
6,676 KB
testcase_40 AC 733 ms
6,676 KB
testcase_41 AC 727 ms
6,676 KB
testcase_42 AC 730 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using ll = long long;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using mint = atcoder::modint998244353;

int main(){
	int n,m;
	cin>>n>>m;
	vector<int> stl(n,0),ans;
	rep(i,m){
		int u,v;
		cin>>u>>v;
		u--; v--;
		if(stl.at(u)==0&&stl.at(v)==0){
			stl.at(u)=1;
			stl.at(v)=1;
			ans.push_back(i+1);
		}
	}
	cout<<ans.size()<<endl;
	for(auto x:ans) cout<<x<<endl;
}
0