結果
問題 | No.488 四角関係 |
ユーザー |
|
提出日時 | 2017-10-09 07:40:10 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 32 ms / 5,000 ms |
コード長 | 359 bytes |
コンパイル時間 | 577 ms |
コンパイル使用メモリ | 64,384 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 06:21:06 |
合計ジャッジ時間 | 1,602 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() | ^~~~
ソースコード
#include<iostream>using namespace std;int G[50][50],n,m,cnt;main(){cin>>n>>m;for(int i=0;i<m;i++){int a,b;cin>>a>>b;G[a][b]=G[b][a]=1;}for(int i=0;i<n;i++)for(int j=0;j<n;j++)for(int k=0;k<n;k++)for(int l=0;l<n;l++){cnt+=i!=j&&i!=k&&i!=l&&j!=k&&j!=l&&k!=l&&G[i][j]&&G[j][k]&&G[k][l]&&G[l][i]&&!G[i][k]&&!G[j][l];}cout<<cnt/8<<endl;}