結果
問題 | No.488 四角関係 |
ユーザー | Pulmn |
提出日時 | 2017-02-24 22:46:55 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1,322 ms / 5,000 ms |
コード長 | 1,673 bytes |
コンパイル時間 | 725 ms |
コンパイル使用メモリ | 90,372 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-08-30 23:34:04 |
合計ジャッジ時間 | 6,909 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 305 ms
4,376 KB |
testcase_01 | AC | 278 ms
4,376 KB |
testcase_02 | AC | 342 ms
4,376 KB |
testcase_03 | AC | 117 ms
4,376 KB |
testcase_04 | AC | 196 ms
4,376 KB |
testcase_05 | AC | 485 ms
4,380 KB |
testcase_06 | AC | 603 ms
4,380 KB |
testcase_07 | AC | 1,022 ms
4,380 KB |
testcase_08 | AC | 1,322 ms
4,376 KB |
testcase_09 | AC | 2 ms
4,380 KB |
testcase_10 | AC | 70 ms
4,376 KB |
testcase_11 | AC | 3 ms
4,376 KB |
testcase_12 | AC | 42 ms
4,380 KB |
testcase_13 | AC | 63 ms
4,376 KB |
testcase_14 | AC | 12 ms
4,376 KB |
testcase_15 | AC | 3 ms
4,380 KB |
testcase_16 | AC | 1 ms
4,376 KB |
testcase_17 | AC | 1 ms
4,376 KB |
testcase_18 | AC | 2 ms
4,376 KB |
testcase_19 | AC | 2 ms
4,376 KB |
testcase_20 | AC | 2 ms
4,376 KB |
testcase_21 | AC | 1 ms
4,380 KB |
testcase_22 | AC | 2 ms
4,384 KB |
testcase_23 | AC | 1 ms
4,380 KB |
testcase_24 | AC | 2 ms
4,376 KB |
ソースコード
#include <iostream> #include <fstream> #include <typeinfo> #include <vector> #include <stack> #include <cmath> #include <set> #include <map> #include <string> #include <algorithm> #include <cstdio> #include <queue> #include <iomanip> #include <cctype> #define syosu(x) fixed<<setprecision(x) using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> P; typedef pair<double,double> pdd; typedef pair<ll,ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<double> vd; typedef vector<vd> vvd; typedef vector<ll> vl; typedef vector<vl> vvl; typedef vector<char> vc; typedef vector<vc> vvc; typedef vector<string> vs; typedef vector<bool> vb; typedef vector<vb> vvb; typedef vector<P> vp; typedef vector<vp> vvp; typedef vector<pll> vpll; typedef pair<int,P> pip; typedef vector<pip> vip; const int inf=1<<30; const ll INF=1ll<<52; const double pi=acos(-1); const double eps=1e-8; const ll mod=1e9+7; const vi emp; const int dx[4]={0,1,0,-1},dy[4]={1,0,-1,-0}; const int DX[8]={-1,-1,-1,0,0,1,1,1},DY[8]={1,0,-1,1,-1,1,0,-1}; int n,m; set<P> List; int main(){ cin>>n>>m; for(int i=0;i<m;i++){ int s,t; cin>>s>>t; List.insert({s,t}); List.insert({t,s}); } int ans=0; 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(i==j||i==k||i==l||j==k||j==l||k==l) continue; bool ij=List.find({i,j})!=List.end(); bool ik=List.find({i,k})!=List.end(); bool il=List.find({i,l})!=List.end(); bool jk=List.find({j,k})!=List.end(); bool jl=List.find({j,l})!=List.end(); bool kl=List.find({k,l})!=List.end(); if(ij&&!ik&&il&&jk&&!jl&&kl) ans++; } cout<<ans/8<<endl; }