結果

問題 No.479 頂点は要らない
ユーザー compass19
提出日時 2017-02-16 21:28:50
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 766 ms / 1,500 ms
コード長 236 bytes
コンパイル時間 460 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 55,280 KB
最終ジャッジ日時 2024-12-30 01:04:23
合計ジャッジ時間 10,593 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
e={i:set() for i in range(n)} 
a=set()
for _ in range(m):
    s,l=map(int,input().split())
    e[l].add(s)
for i in range(n-1, -1, -1):
    if i not in a:a|=e[i]
r=0
for i in a:r|=1<<i
print(format(r, 'b'))
0