結果
問題 |
No.488 四角関係
|
ユーザー |
|
提出日時 | 2017-02-24 23:35:18 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 279 bytes |
コンパイル時間 | 259 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 20,352 KB |
最終ジャッジ日時 | 2025-01-03 00:37:09 |
合計ジャッジ時間 | 42,340 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 TLE * 3 |
ソースコード
from itertools import* n,m=map(int,input().split()) g=[[0]*n for _ in[0]*n] for _ in[0]*m: a,b=map(int,input().split()) g[a-1][b-1]=g[b-1][a-1]=-1 c=0 for i,j,k,l in product(range(n),repeat=4):c+=len({i,j,k,l})==4 * g[i][j]*g[j][k]*g[k][l]*g[l][i]*~g[i][k]*~g[j][l] print(c//8)