hdu 6152 : Friend-Graph (2017 CCPC网络赛 1003)
2017-08-19 18:57
375 查看
题目链接
裸的结论题。百度 Ramsey定理。刚学过之后以为在哪也不会用到23333333333,没想到今天网络赛居然出了。顺利在题面更改前A掉~~~(我觉得要不是我开机慢+编译慢+中间暂时死机,我还能再早几分钟过掉它
裸的结论题。百度 Ramsey定理。刚学过之后以为在哪也不会用到23333333333,没想到今天网络赛居然出了。顺利在题面更改前A掉~~~(我觉得要不是我开机慢+编译慢+中间暂时死机,我还能再早几分钟过掉它
#include<bits/stdc++.h> using namespace std; int g[8][8]; int n; void solve() { for(int i=1; i<=n; i++) for(int j=i+1; j<=n; j++) for(int k=j+1; k<=n; k++) { if(g[i][j]==g[i][k]&&g[i][j]==g[j][k]) { puts("Bad Team!"); return ; } } puts("Great Team!"); } int main() { int T; scanf("%d",&T); while(T--) { memset(g,0,sizeof(g)); scanf("%d",&n); if(n>=6) { int t; for(int i=0; i<(n-1)*n/2; i++) scanf("%d",&t); puts("Bad Team!"); continue; } for(int i=1; i<=n; i++) for(int j=i+1; j<=n; j++) { int t; scanf("%d",&t); g[i][j]=g[j][i]=t; } solve(); } }
相关文章推荐
- HDU 6152 - Friend-Graph 2017中国大学生程序设计竞赛 - 网络选拔赛 1003 - Friend-Graph
- 2017ccps网络赛 1003 Friend-Graph(暴力)HDU 6152
- HDU-2017中国大学生程序设计竞赛-网络选拔赛-1003-Friend-Graph
- 2017中国大学生程序设计竞赛 - 网络选拔赛 HDU 6152 Friend-Graph 暴暴暴暴力
- HDU 6152 Friend-Graph(2017CCPC网络选拔赛)【Floyed求传递闭包】
- hdu6152 Friend-Graph (2017 ccpc 网络赛 (暴力 + 一个神奇的定理)
- hdu 6152 Friend-Graph(ccpc)
- HDU 6152 2017中国大学生程序设计大赛网络赛 1003
- 2017中国大学生程序设计竞赛 - 网络选拔赛 1003 Friend-Graph
- 2017 ccpc 网络赛 Friend-Graph
- HDU 6152-Friend-Graph(ccpc)
- 2017中国大学生程序设计竞赛 - 网络选拔赛 :1003&hdu6152、Friend-Graph
- hdu 6152 Friend-Graph(拉姆齐定理)
- 2017ccpc网络赛 1003Friend-Graph
- hdu 6152 Friend-Graph(拉姆齐定理)
- 2017CCPC网络选拔赛1003Friend-Graph
- HDU 6152 Friend-Graph
- HDU 6152 Friend-Graph
- hdu 6152 Friend-Graph
- hdu 6152 Friend-Graph(拉姆齐定理)