結果

問題 No.2910 単体ホモロジー入門
ユーザー 👑 p-adic
提出日時 2023-09-09 17:40:23
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 227 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-27 10:20:35
合計ジャッジ時間 2,734 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 47
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.py:11: SyntaxWarning: invalid decimal literal
  print(["No","Yes"][M>4or len(T)>2and S!=T])
Main.py:11: SyntaxWarning: invalid decimal literal
  print(["No","Yes"][M>4or len(T)>2and S!=T])

ソースコード

diff #

N,M=map(int,input().split())
c=[0]*N
for m in range(M):
	v,w=map(int,input().split())
	c[v]+=1
	c[w]+=1
S=set(map(int,input().split()))
T=set()
for n in range(N):
	if(c[n]>1):T.add(n)
print(["No","Yes"][M>4or len(T)>2and S!=T])
0