結果

問題 No.479 頂点は要らない
ユーザー ああいいああいい
提出日時 2022-03-08 18:40:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 822 ms / 1,500 ms
コード長 407 bytes
コンパイル時間 344 ms
コンパイル使用メモリ 86,920 KB
実行使用メモリ 93,028 KB
最終ジャッジ日時 2023-10-01 01:09:11
合計ジャッジ時間 10,758 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,068 KB
testcase_01 AC 77 ms
71,136 KB
testcase_02 AC 78 ms
70,960 KB
testcase_03 AC 75 ms
70,936 KB
testcase_04 AC 77 ms
70,976 KB
testcase_05 AC 77 ms
71,204 KB
testcase_06 AC 76 ms
71,112 KB
testcase_07 AC 76 ms
70,988 KB
testcase_08 AC 78 ms
71,000 KB
testcase_09 AC 76 ms
70,984 KB
testcase_10 AC 76 ms
71,252 KB
testcase_11 AC 76 ms
71,200 KB
testcase_12 AC 75 ms
71,244 KB
testcase_13 AC 76 ms
71,144 KB
testcase_14 AC 76 ms
71,140 KB
testcase_15 AC 76 ms
71,208 KB
testcase_16 AC 76 ms
71,180 KB
testcase_17 AC 76 ms
71,108 KB
testcase_18 AC 77 ms
71,064 KB
testcase_19 AC 93 ms
74,988 KB
testcase_20 AC 92 ms
75,188 KB
testcase_21 AC 93 ms
76,032 KB
testcase_22 AC 94 ms
75,404 KB
testcase_23 AC 94 ms
74,940 KB
testcase_24 AC 92 ms
75,304 KB
testcase_25 AC 87 ms
71,012 KB
testcase_26 AC 592 ms
90,508 KB
testcase_27 AC 596 ms
90,536 KB
testcase_28 AC 822 ms
93,028 KB
testcase_29 AC 291 ms
84,268 KB
testcase_30 AC 282 ms
84,448 KB
testcase_31 AC 280 ms
84,332 KB
testcase_32 AC 287 ms
84,344 KB
testcase_33 AC 329 ms
85,076 KB
testcase_34 AC 345 ms
85,240 KB
testcase_35 AC 231 ms
83,164 KB
testcase_36 AC 161 ms
80,060 KB
testcase_37 AC 371 ms
85,744 KB
testcase_38 AC 289 ms
84,088 KB
testcase_39 AC 249 ms
83,144 KB
testcase_40 AC 327 ms
85,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())

G = [[] for _ in range(n)]
Gnum = [0] * n
for _ in range(m):
    a,b = map(int,input().split())
    G[a].append(b)
    G[b].append(a)
    Gnum[a] += 1
    Gnum[b] += 1
ans = 0
dp = [0] * n
for i in range(n-1,-1,-1):
    if dp[i]:
        ans |= 1 << i
        for v in G[i]:
            Gnum[v] -= 1
    else:
        for v in G[i]:
            dp[v] = 1
print(bin(ans)[2:])
0