結果
問題 |
No.2910 単体ホモロジー入門
|
ユーザー |
![]() |
提出日時 | 2024-10-04 21:28:57 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 555 bytes |
コンパイル時間 | 144 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 52,480 KB |
最終ジャッジ日時 | 2024-10-04 21:29:01 |
合計ジャッジ時間 | 2,810 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 45 WA * 2 |
ソースコード
from itertools import combinations N, M = map(int, input().split()) edge = set() for _ in range(M): u, v = map(int, input().split()) edge.add((u, v)) edge.add((v, u)) abc = tuple(sorted(map(int, input().split()))) for comb in combinations(range(4), 3): if comb == abc: continue a, b, c = comb if (a, b) in edge and (b, c) in edge and (c, a) in edge: print("Yes") break else: if (0, 1) in edge and (1, 2) in edge and (2, 3) in edge and (3, 0) in edge: print("Yes") else: print("No")