結果

問題 No.479 頂点は要らない
ユーザー brthyyjpbrthyyjp
提出日時 2021-10-25 10:33:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 895 ms / 1,500 ms
コード長 487 bytes
コンパイル時間 400 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 126,464 KB
最終ジャッジ日時 2024-04-14 04:27:22
合計ジャッジ時間 8,790 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,952 KB
testcase_01 AC 39 ms
52,312 KB
testcase_02 AC 37 ms
52,940 KB
testcase_03 AC 37 ms
52,640 KB
testcase_04 AC 38 ms
53,488 KB
testcase_05 AC 37 ms
52,088 KB
testcase_06 AC 38 ms
52,612 KB
testcase_07 AC 37 ms
52,800 KB
testcase_08 AC 37 ms
52,928 KB
testcase_09 AC 37 ms
53,692 KB
testcase_10 AC 38 ms
52,968 KB
testcase_11 AC 38 ms
52,420 KB
testcase_12 AC 37 ms
52,820 KB
testcase_13 AC 37 ms
52,308 KB
testcase_14 AC 38 ms
52,572 KB
testcase_15 AC 38 ms
53,416 KB
testcase_16 AC 37 ms
52,860 KB
testcase_17 AC 38 ms
53,260 KB
testcase_18 AC 38 ms
52,668 KB
testcase_19 AC 47 ms
61,108 KB
testcase_20 AC 42 ms
54,780 KB
testcase_21 AC 44 ms
62,032 KB
testcase_22 AC 48 ms
62,156 KB
testcase_23 AC 45 ms
60,804 KB
testcase_24 AC 46 ms
61,220 KB
testcase_25 AC 41 ms
54,688 KB
testcase_26 AC 622 ms
114,404 KB
testcase_27 AC 621 ms
114,128 KB
testcase_28 AC 895 ms
126,464 KB
testcase_29 AC 235 ms
94,912 KB
testcase_30 AC 242 ms
95,336 KB
testcase_31 AC 236 ms
94,692 KB
testcase_32 AC 242 ms
95,056 KB
testcase_33 AC 334 ms
95,268 KB
testcase_34 AC 309 ms
96,668 KB
testcase_35 AC 166 ms
88,424 KB
testcase_36 AC 94 ms
79,684 KB
testcase_37 AC 335 ms
98,092 KB
testcase_38 AC 243 ms
92,304 KB
testcase_39 AC 205 ms
91,184 KB
testcase_40 AC 303 ms
98,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import io, os
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline

n,m = map(int, input().split())
edge = [set() for i in range(n)]
for i in range(m):
    a,b = map(int, input().split())
    edge[a].add(b)
    edge[b].add(a)

ans = 0
buy = set()
for v in reversed(range(n)):
    flag = False
    for u in edge[v]:
        if u > v and u not in buy:
            flag = True
            break
    if flag:
        ans |=(1<<v)
        buy.add(v)
print(format(ans, 'b'))
0