結果

問題 No.479 頂点は要らない
ユーザー convexineqconvexineq
提出日時 2021-02-05 07:03:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 237 ms / 1,500 ms
コード長 317 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 86,908 KB
実行使用メモリ 92,280 KB
最終ジャッジ日時 2023-09-14 12:22:13
合計ジャッジ時間 8,404 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,464 KB
testcase_01 AC 75 ms
71,368 KB
testcase_02 AC 70 ms
71,564 KB
testcase_03 AC 71 ms
71,380 KB
testcase_04 AC 71 ms
71,284 KB
testcase_05 AC 70 ms
71,156 KB
testcase_06 AC 71 ms
71,440 KB
testcase_07 AC 71 ms
71,624 KB
testcase_08 AC 71 ms
71,412 KB
testcase_09 AC 72 ms
71,356 KB
testcase_10 AC 71 ms
71,480 KB
testcase_11 AC 70 ms
71,444 KB
testcase_12 AC 70 ms
71,480 KB
testcase_13 AC 71 ms
71,256 KB
testcase_14 AC 72 ms
71,556 KB
testcase_15 AC 73 ms
71,160 KB
testcase_16 AC 72 ms
71,372 KB
testcase_17 AC 72 ms
71,288 KB
testcase_18 AC 71 ms
71,284 KB
testcase_19 AC 89 ms
76,384 KB
testcase_20 AC 87 ms
76,280 KB
testcase_21 AC 86 ms
76,072 KB
testcase_22 AC 87 ms
76,136 KB
testcase_23 AC 86 ms
76,332 KB
testcase_24 AC 88 ms
76,236 KB
testcase_25 AC 85 ms
75,816 KB
testcase_26 AC 237 ms
89,548 KB
testcase_27 AC 220 ms
89,524 KB
testcase_28 AC 178 ms
92,280 KB
testcase_29 AC 170 ms
83,936 KB
testcase_30 AC 172 ms
84,152 KB
testcase_31 AC 170 ms
84,040 KB
testcase_32 AC 171 ms
84,124 KB
testcase_33 AC 198 ms
84,428 KB
testcase_34 AC 208 ms
84,248 KB
testcase_35 AC 185 ms
81,952 KB
testcase_36 AC 147 ms
78,960 KB
testcase_37 AC 211 ms
85,160 KB
testcase_38 AC 188 ms
83,656 KB
testcase_39 AC 168 ms
82,860 KB
testcase_40 AC 183 ms
85,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
g = [[] for _ in range(n)]

for i in range(m):
    a,b = map(int,input().split())
    g[a].append(b)
    g[b].append(a)

r = [0]*n
for v in range(n)[::-1]:
    for c in g[v]:
        if v < c and r[c]==0:
            r[v] = 1

while r[-1]==0: r.pop()
print("".join(map(str,r))[::-1])   
0