結果
| 問題 |
No.488 四角関係
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-27 09:20:45 |
| 言語 | Python2 (2.7.18) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 472 bytes |
| コンパイル時間 | 363 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-11 19:18:44 |
| 合計ジャッジ時間 | 2,936 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 RE * 3 |
ソースコード
#yuki_488
n,m=map(int,raw_input().split())
ls=[[0 for i in xrange(n)] for j in xrange(m)]
for i in xrange(m):
a,b=map(int,raw_input().split())
ls[a][b]=ls[b][a]=1
res=0
for i in xrange(n):
for j in xrange(i+1,n):
for k in xrange(j+1,n):
for l in xrange(k+1,n):
x1=ls[i][j]+ls[i][k]+ls[i][l]
x2=ls[j][k]+ls[j][l]+ls[j][i]
x3=ls[k][l]+ls[k][i]+ls[k][j]
x4=ls[l][i]+ls[l][j]+ls[l][k]
if x1==2 and x2==2 and x3==2 and x4==2:
res+=1
print res