結果

問題 No.479 頂点は要らない
ユーザー tookunn_1213tookunn_1213
提出日時 2017-01-28 00:58:36
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 706 ms / 1,500 ms
コード長 275 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 41,508 KB
最終ジャッジ日時 2023-08-25 11:42:15
合計ジャッジ時間 9,341 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,848 KB
testcase_01 AC 16 ms
7,724 KB
testcase_02 AC 15 ms
7,816 KB
testcase_03 AC 15 ms
7,924 KB
testcase_04 AC 15 ms
7,912 KB
testcase_05 AC 16 ms
7,716 KB
testcase_06 AC 15 ms
7,724 KB
testcase_07 AC 16 ms
7,816 KB
testcase_08 AC 16 ms
7,848 KB
testcase_09 AC 15 ms
7,888 KB
testcase_10 AC 16 ms
7,876 KB
testcase_11 AC 16 ms
7,792 KB
testcase_12 AC 15 ms
7,852 KB
testcase_13 AC 16 ms
7,764 KB
testcase_14 AC 16 ms
7,888 KB
testcase_15 AC 16 ms
7,848 KB
testcase_16 AC 15 ms
7,756 KB
testcase_17 AC 16 ms
7,880 KB
testcase_18 AC 16 ms
7,848 KB
testcase_19 AC 19 ms
8,256 KB
testcase_20 AC 19 ms
8,144 KB
testcase_21 AC 18 ms
8,164 KB
testcase_22 AC 19 ms
8,320 KB
testcase_23 AC 19 ms
8,164 KB
testcase_24 AC 19 ms
8,316 KB
testcase_25 AC 18 ms
8,220 KB
testcase_26 AC 706 ms
37,180 KB
testcase_27 AC 703 ms
37,296 KB
testcase_28 AC 593 ms
41,508 KB
testcase_29 AC 423 ms
33,824 KB
testcase_30 AC 430 ms
33,680 KB
testcase_31 AC 422 ms
33,804 KB
testcase_32 AC 421 ms
33,764 KB
testcase_33 AC 479 ms
30,808 KB
testcase_34 AC 519 ms
32,444 KB
testcase_35 AC 554 ms
29,324 KB
testcase_36 AC 326 ms
21,548 KB
testcase_37 AC 507 ms
32,052 KB
testcase_38 AC 423 ms
28,832 KB
testcase_39 AC 273 ms
24,032 KB
testcase_40 AC 318 ms
26,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int,input().split())
graph = [[] for i in range(N)]
p = [list(map(int,input().split())) for i in range(M)]
p = sorted(p,reverse=True)
ans = 0
s = set()
for i in range(M):
	if p[i][1] in s:
		continue
	s.add(p[i][0])
for i in s:
	ans += (1<<i)
print(format(ans,'b'))
0