結果
問題 |
No.479 頂点は要らない
|
ユーザー |
![]() |
提出日時 | 2020-05-11 19:03:10 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 663 ms / 1,500 ms |
コード長 | 335 bytes |
コンパイル時間 | 186 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 25,216 KB |
最終ジャッジ日時 | 2024-07-18 19:14:43 |
合計ジャッジ時間 | 7,925 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
import sys def MI(): return map(int, sys.stdin.buffer.readline().split()) def main(): n,m=MI() ee=[] for e in range(m): u,v=MI() if u>v:u,v=v,u ee.append((u,v)) vs=0 for u,v in sorted(ee,reverse=True): if vs>>u&1 or vs>>v&1:continue vs|=1<<u print(bin(vs)[2:]) main()