結果
| 問題 |
No.488 四角関係
|
| ユーザー |
titia
|
| 提出日時 | 2023-06-12 04:50:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 587 bytes |
| コンパイル時間 | 476 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-06-11 08:31:49 |
| 合計ジャッジ時間 | 3,045 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 15 |
ソースコード
N,M=map(int,input().split())
E=[tuple(map(int,input().split())) for i in range(M)]
S=set(E)
ANS=0
for i in range(N):
for j in range(i+1,N):
for k in range(j+1,N):
for l in range(k+1,N):
if (i,j) in S and (j,k) in S and (k,l) in S and (i,l) in S and not ((i,k) in S) and not ((j,l) in S):
#print(i,j,k,l)
ANS+=1
if (i,j) in S and (j,l) in S and (k,l) in S and (i,k) in S and not ((i,l) in S) and not ((j,k) in S):
#print(i,j,k,l)
ANS+=1
print(ANS)
titia