結果

問題 No.479 頂点は要らない
ユーザー mkawa2mkawa2
提出日時 2020-05-11 19:03:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 730 ms / 1,500 ms
コード長 335 bytes
コンパイル時間 640 ms
コンパイル使用メモリ 10,624 KB
実行使用メモリ 22,600 KB
最終ジャッジ日時 2023-09-25 23:44:43
合計ジャッジ時間 9,472 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,848 KB
testcase_01 AC 16 ms
7,756 KB
testcase_02 AC 16 ms
7,816 KB
testcase_03 AC 15 ms
7,724 KB
testcase_04 AC 16 ms
7,756 KB
testcase_05 AC 16 ms
7,748 KB
testcase_06 AC 16 ms
7,832 KB
testcase_07 AC 16 ms
7,712 KB
testcase_08 AC 16 ms
7,740 KB
testcase_09 AC 16 ms
7,760 KB
testcase_10 AC 15 ms
7,720 KB
testcase_11 AC 17 ms
7,760 KB
testcase_12 AC 16 ms
7,760 KB
testcase_13 AC 16 ms
7,740 KB
testcase_14 AC 16 ms
7,752 KB
testcase_15 AC 15 ms
7,792 KB
testcase_16 AC 16 ms
7,756 KB
testcase_17 AC 16 ms
7,752 KB
testcase_18 AC 16 ms
7,740 KB
testcase_19 AC 17 ms
7,752 KB
testcase_20 AC 17 ms
8,108 KB
testcase_21 AC 17 ms
7,704 KB
testcase_22 AC 17 ms
7,804 KB
testcase_23 AC 16 ms
7,760 KB
testcase_24 AC 16 ms
7,828 KB
testcase_25 AC 17 ms
7,716 KB
testcase_26 AC 728 ms
22,600 KB
testcase_27 AC 730 ms
22,484 KB
testcase_28 AC 486 ms
22,112 KB
testcase_29 AC 378 ms
22,476 KB
testcase_30 AC 379 ms
22,508 KB
testcase_31 AC 375 ms
22,496 KB
testcase_32 AC 376 ms
22,532 KB
testcase_33 AC 388 ms
20,252 KB
testcase_34 AC 428 ms
21,308 KB
testcase_35 AC 312 ms
21,912 KB
testcase_36 AC 161 ms
17,112 KB
testcase_37 AC 436 ms
20,872 KB
testcase_38 AC 327 ms
19,308 KB
testcase_39 AC 222 ms
15,744 KB
testcase_40 AC 311 ms
16,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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()
0