結果

問題 No.479 頂点は要らない
ユーザー pluto77pluto77
提出日時 2017-01-30 09:22:27
言語 Python2
(2.7.18)
結果
AC  
実行時間 665 ms / 1,500 ms
コード長 264 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 29,208 KB
最終ジャッジ日時 2024-12-23 23:51:03
合計ジャッジ時間 9,120 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_479

n,m=map(int,raw_input().split())
g=[]
for i in xrange(m):
 a,b=map(int,raw_input().split())
 g.append([a,b])
g.sort()
g.reverse()

s=set()
for i in xrange(m):
 if g[i][1] in s:
  continue
 s.add(g[i][0])

res=0
for i in s:
 res+=1<<i
print bin(res)[2:]
0