結果
問題 | No.8107 Listening |
ユーザー |
![]() |
提出日時 | 2024-04-03 01:14:36 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 622 ms / 2,000 ms |
コード長 | 321 bytes |
コンパイル時間 | 480 ms |
コンパイル使用メモリ | 82,848 KB |
実行使用メモリ | 187,468 KB |
最終ジャッジ日時 | 2024-09-30 23:31:56 |
合計ジャッジ時間 | 23,803 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 40 |
ソースコード
import sys input = sys.stdin.readline N,M=map(int,input().split()) EDGE=[list(map(int,input().split())) for i in range(M)] USE=[0]*(N+1) ANS=[] for i in range(M): x,y = EDGE[i] if USE[x]==0 and USE[y]==0: USE[x]=1 USE[y]=1 ANS.append(i+1) print(len(ANS)) for ans in ANS: print(ans)