結果
| 問題 | No.488 四角関係 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-27 09:36:56 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
|
| 実行時間 | 82 ms / 5,000 ms |
| + 291µs | |
| コード長 | 474 bytes |
| 記録 | |
| コンパイル時間 | 68 ms |
| コンパイル使用メモリ | 81,280 KB |
| 実行使用メモリ | 84,480 KB |
| 最終ジャッジ日時 | 2026-07-18 12:10:14 |
| 合計ジャッジ時間 | 3,357 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#yuki_488
n,m=map(int,raw_input().split())
ls=[[0 for i in xrange(51)] for j in xrange(51)]
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