結果

問題 No.479 頂点は要らない
ユーザー H3PO4H3PO4
提出日時 2020-08-22 10:49:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 233 ms / 1,500 ms
コード長 339 bytes
コンパイル時間 132 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 29,916 KB
最終ジャッジ日時 2023-08-05 09:26:54
合計ジャッジ時間 6,019 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,128 KB
testcase_01 AC 16 ms
8,180 KB
testcase_02 AC 16 ms
8,160 KB
testcase_03 AC 16 ms
8,152 KB
testcase_04 AC 16 ms
8,084 KB
testcase_05 AC 17 ms
8,164 KB
testcase_06 AC 16 ms
8,108 KB
testcase_07 AC 16 ms
8,140 KB
testcase_08 AC 16 ms
8,228 KB
testcase_09 AC 16 ms
8,164 KB
testcase_10 AC 16 ms
8,104 KB
testcase_11 AC 16 ms
8,252 KB
testcase_12 AC 16 ms
8,132 KB
testcase_13 AC 16 ms
8,132 KB
testcase_14 AC 16 ms
8,176 KB
testcase_15 AC 16 ms
8,188 KB
testcase_16 AC 17 ms
8,088 KB
testcase_17 AC 16 ms
8,284 KB
testcase_18 AC 15 ms
8,200 KB
testcase_19 AC 17 ms
8,388 KB
testcase_20 AC 18 ms
8,324 KB
testcase_21 AC 16 ms
8,288 KB
testcase_22 AC 17 ms
8,468 KB
testcase_23 AC 18 ms
8,308 KB
testcase_24 AC 17 ms
8,460 KB
testcase_25 AC 17 ms
8,376 KB
testcase_26 AC 232 ms
29,912 KB
testcase_27 AC 233 ms
29,836 KB
testcase_28 AC 177 ms
29,916 KB
testcase_29 AC 175 ms
26,012 KB
testcase_30 AC 175 ms
26,048 KB
testcase_31 AC 173 ms
26,084 KB
testcase_32 AC 175 ms
26,020 KB
testcase_33 AC 192 ms
23,648 KB
testcase_34 AC 210 ms
24,736 KB
testcase_35 AC 205 ms
25,472 KB
testcase_36 AC 131 ms
19,504 KB
testcase_37 AC 208 ms
24,928 KB
testcase_38 AC 179 ms
22,112 KB
testcase_39 AC 125 ms
18,760 KB
testcase_40 AC 146 ms
21,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import itertools

input = sys.stdin.readline

N, M = map(int, input().split())
E = [tuple(map(int, input().split())) for _ in range(M)]
E.sort(key=lambda x: -x[1])

V = [0] * N
for a, b in E:
    if not V[a] and not V[b]:
        V[a] = 1

V = list(itertools.dropwhile(lambda x: not x, reversed(V)))
print(''.join(map(str, V)))
0