結果

問題 No.8107 Listening
ユーザー nikoro256
提出日時 2024-04-01 21:40:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 682 ms / 2,000 ms
コード長 244 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 82,460 KB
実行使用メモリ 86,200 KB
最終ジャッジ日時 2024-09-30 22:16:07
合計ジャッジ時間 22,570 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 40
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
use=[False]*(N+1)
ans=[]
for i in range(M):
    u,v=map(int,input().split())
    if (not use[u]) and (not use[v]):
        use[u]=True
        use[v]=True
        ans.append(i+1)
print(len(ans))
print(*ans,sep='\n')
0