結果

問題 No.2910 単体ホモロジー入門
コンテスト
ユーザー p-adic
提出日時 2023-09-09 17:41:19
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 133 ms / 2,000 ms
+ 519µs
コード長 227 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 237 ms
コンパイル使用メモリ 95,468 KB
実行使用メモリ 86,784 KB
最終ジャッジ日時 2026-07-31 03:14:12
合計ジャッジ時間 8,459 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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 #
raw source code

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