結果

問題 No.479 頂点は要らない
ユーザー nebukuro09nebukuro09
提出日時 2017-01-27 22:55:56
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 347 bytes
コンパイル時間 554 ms
コンパイル使用メモリ 6,652 KB
実行使用メモリ 25,032 KB
最終ジャッジ日時 2023-08-25 04:29:55
合計ジャッジ時間 8,392 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,856 KB
testcase_01 AC 11 ms
6,056 KB
testcase_02 AC 11 ms
5,876 KB
testcase_03 AC 11 ms
5,812 KB
testcase_04 AC 12 ms
5,824 KB
testcase_05 AC 11 ms
5,812 KB
testcase_06 AC 11 ms
6,004 KB
testcase_07 AC 11 ms
5,848 KB
testcase_08 AC 11 ms
5,856 KB
testcase_09 AC 12 ms
5,812 KB
testcase_10 AC 11 ms
5,928 KB
testcase_11 AC 11 ms
5,856 KB
testcase_12 AC 11 ms
5,944 KB
testcase_13 AC 12 ms
6,056 KB
testcase_14 AC 11 ms
5,920 KB
testcase_15 AC 11 ms
6,008 KB
testcase_16 AC 11 ms
5,856 KB
testcase_17 AC 11 ms
6,088 KB
testcase_18 WA -
testcase_19 AC 14 ms
6,280 KB
testcase_20 AC 14 ms
6,236 KB
testcase_21 AC 14 ms
6,268 KB
testcase_22 AC 14 ms
6,136 KB
testcase_23 AC 14 ms
6,276 KB
testcase_24 AC 15 ms
6,252 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 594 ms
24,940 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, raw_input().split())
ans = [False for i in xrange(n)]
query = [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