結果

問題 No.479 頂点は要らない
ユーザー はむ吉🐹はむ吉🐹
提出日時 2017-01-29 18:27:04
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 629 bytes
コンパイル時間 2,254 ms
コンパイル使用メモリ 86,644 KB
実行使用メモリ 93,560 KB
最終ジャッジ日時 2023-08-25 15:07:55
合計ジャッジ時間 7,801 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,644 KB
testcase_01 AC 70 ms
71,404 KB
testcase_02 AC 70 ms
71,364 KB
testcase_03 AC 70 ms
71,252 KB
testcase_04 WA -
testcase_05 AC 69 ms
71,504 KB
testcase_06 AC 70 ms
71,088 KB
testcase_07 AC 71 ms
71,264 KB
testcase_08 AC 72 ms
71,260 KB
testcase_09 AC 70 ms
71,304 KB
testcase_10 AC 70 ms
71,200 KB
testcase_11 AC 70 ms
71,360 KB
testcase_12 WA -
testcase_13 AC 70 ms
71,248 KB
testcase_14 AC 68 ms
71,164 KB
testcase_15 AC 68 ms
71,524 KB
testcase_16 AC 69 ms
71,248 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 88 ms
76,072 KB
testcase_21 AC 85 ms
76,076 KB
testcase_22 AC 89 ms
75,864 KB
testcase_23 AC 89 ms
76,272 KB
testcase_24 AC 86 ms
76,024 KB
testcase_25 AC 82 ms
75,728 KB
testcase_26 AC 277 ms
91,440 KB
testcase_27 AC 252 ms
91,796 KB
testcase_28 AC 196 ms
93,560 KB
testcase_29 AC 190 ms
84,720 KB
testcase_30 AC 189 ms
84,520 KB
testcase_31 AC 194 ms
84,640 KB
testcase_32 AC 189 ms
84,712 KB
testcase_33 AC 216 ms
85,336 KB
testcase_34 WA -
testcase_35 AC 219 ms
84,124 KB
testcase_36 AC 177 ms
81,004 KB
testcase_37 AC 253 ms
86,296 KB
testcase_38 AC 219 ms
84,192 KB
testcase_39 AC 191 ms
83,620 KB
testcase_40 AC 210 ms
85,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env pypy3


def main():
    n, m = (int(x) for x in input().split())
    adj_vs = [[] for _ in range(n)]
    for _ in range(m):
        a, b = (int(x) for x in input().split())
        adj_vs[a].append(b)
        adj_vs[b].append(a)
    for vs in adj_vs:
        vs.sort(reverse=True)
    needed = [False for _ in range(n)]
    for i in range(n)[::-1]:
        for j in adj_vs[i]:
            if j <= i:
                break
            elif not needed[j]:
                needed[i] = True
                break
    print("".join(str(int(x)) for x in needed[::-1]).strip("0"))


if __name__ == '__main__':
    main()
0