結果
| 問題 | No.488 四角関係 |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-02-22 21:23:22 |
| 言語 | C++17(gcc12) (gcc 12.4.0 + boost 1.90.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 554 bytes |
| 記録 | |
| コンパイル時間 | 1,310 ms |
| コンパイル使用メモリ | 202,300 KB |
| 実行使用メモリ | 10,288 KB |
| 最終ジャッジ日時 | 2026-07-05 06:35:54 |
| 合計ジャッジ時間 | 14,076 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 21 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | freopen("rec.in","r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~
main.cpp:8:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | freopen("rec.out","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<bits/stdc++.h>
#define int long long
using namespace std;
int ans,edge[60][60];
signed main()
{
freopen("rec.in","r",stdin);
freopen("rec.out","w",stdout);
int n,m,u,v;
cin>>n>>m;
for(int i=1;i<=m;i++)
{
cin>>u>>v;
edge[u][v]=edge[v][u]=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++)
{
if(edge[i][j]&&edge[j][k]&&edge[k][l]&&edge[l][i]&&!edge[i][k]&&!edge[j][l]&&i!=j&&i!=k&&i!=l&&j!=k&&j!=l&&k!=l)
ans++;
}
}
}
}
cout<<ans/8;
return 0;
}
vjudge1