結果

問題 No.479 頂点は要らない
ユーザー nebukuro09nebukuro09
提出日時 2017-01-27 22:57:19
言語 Python2
(2.7.18)
結果
AC  
実行時間 768 ms / 1,500 ms
コード長 355 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 6,716 KB
実行使用メモリ 24,984 KB
最終ジャッジ日時 2023-08-25 04:33:36
合計ジャッジ時間 9,801 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
5,852 KB
testcase_01 AC 10 ms
6,076 KB
testcase_02 AC 10 ms
6,000 KB
testcase_03 AC 10 ms
5,844 KB
testcase_04 AC 11 ms
6,088 KB
testcase_05 AC 11 ms
5,856 KB
testcase_06 AC 11 ms
6,000 KB
testcase_07 AC 11 ms
5,856 KB
testcase_08 AC 10 ms
5,996 KB
testcase_09 AC 11 ms
5,924 KB
testcase_10 AC 11 ms
5,944 KB
testcase_11 AC 11 ms
5,996 KB
testcase_12 AC 11 ms
5,940 KB
testcase_13 AC 10 ms
5,876 KB
testcase_14 AC 10 ms
5,924 KB
testcase_15 AC 10 ms
5,860 KB
testcase_16 AC 11 ms
6,088 KB
testcase_17 AC 11 ms
5,840 KB
testcase_18 AC 10 ms
6,088 KB
testcase_19 AC 14 ms
6,172 KB
testcase_20 AC 14 ms
6,172 KB
testcase_21 AC 14 ms
6,148 KB
testcase_22 AC 14 ms
6,232 KB
testcase_23 AC 14 ms
6,316 KB
testcase_24 AC 14 ms
6,264 KB
testcase_25 AC 13 ms
6,120 KB
testcase_26 AC 748 ms
24,884 KB
testcase_27 AC 768 ms
24,904 KB
testcase_28 AC 594 ms
24,984 KB
testcase_29 AC 432 ms
23,684 KB
testcase_30 AC 432 ms
23,584 KB
testcase_31 AC 432 ms
23,760 KB
testcase_32 AC 429 ms
23,768 KB
testcase_33 AC 458 ms
21,256 KB
testcase_34 AC 503 ms
22,724 KB
testcase_35 AC 480 ms
23,036 KB
testcase_36 AC 298 ms
16,980 KB
testcase_37 AC 496 ms
21,888 KB
testcase_38 AC 403 ms
19,652 KB
testcase_39 AC 278 ms
15,760 KB
testcase_40 AC 349 ms
17,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, raw_input().split())
ans = [False for i in xrange(n)]
query = sorted([map(int, raw_input().split()) for _ in xrange(m)])
used = [False for _ in xrange(n)]
for i in xrange(m-1, -1, -1):
    a, b = query[i]
    if not used[b]:
        ans[a] = True
        used[a] = True
#print ans
print int(''.join(map(lambda x: '01'[x], reversed(ans))))
0