南京邀请赛 K 题 Yet It Is Another World
来源:互联网 发布:计量型数据定义 编辑:程序博客网 时间:2024/06/05 22:52
#include<cstdio>#include<cstring>#include<iostream>#include<algorithm>#define maxn 1050int n;int x[maxn],y[maxn],z[maxn];int gcd(int a,int b){ if(b==0) return a; else return gcd(b,a%b);}bool fuck(int i,int j){ int k; for(k=y[i]-z[j];k<=z[i]-y[j];k++) if(k%gcd(x[i],x[j])==0) return false; return true;}bool solve(){ int i,j; for(i=1;i<=n;i++) for(j=i+1;j<=n;j++) if(fuck(i,j)) return true; return false;}int main(){ while(scanf("%d",&n)!=EOF) { int i; for(i=1;i<=n;i++) scanf("%d%d%d",&x[i],&y[i],&z[i]); if(solve()) printf("Can Take off\n"); else printf("Cannot Take off\n"); } return 0;}
- 南京邀请赛 K 题 Yet It Is Another World
- NJUST 1747 Yet another end of the world(13年南京邀请赛-K题-数学)
- HDU4596 Yet another end of the world(数学公式推演+数论定理--2013南京邀请赛)
- Yet another end of the world
- 2013 南京邀请赛 A,C,H, K
- 2012ACM/ICPC成都赛区现场赛K题---Yet Another Multiple Problem(hdu4474)
- HDU 4474 Yet Another Multiple Problem(12年成都区域赛-K题-BFS)
- hdu 4596 Yet another end of the world(数论)
- HDU 4596 Yet another end of the world
- HDU4596 Yet another end of the world 扩展欧几里德性质
- [欧几里得] hdu 4596 Yet another end of the world
- HDU OJ 4596 Yet another end of the world
- HDU 4569——Yet another end of the world
- Hdu 4596 Yet another end of the world(数论)
- HDU 4596Yet another end of the world(GCD)
- HDU-4596 Yet another end of the world (数论)
- HDU 4596 Yet another end of the world (拓展欧几里得)
- HDOJ 4596 Yet another end of the world【数学】
- css的盒模型
- xcode4常用快捷键
- 指针变量
- IOS 使用XIB 自定义View
- php的bug?echo dirname('d:\中文\sl.txt');为什么只会打印出:d:\来
- 南京邀请赛 K 题 Yet It Is Another World
- 缩小窗口,拉动下方滚动条。背景缺失解决方案
- 实现多线程有两种方法: Thread类继承和Runnable接口实现
- 大数据时代:大数据的应用
- javascript 中的this
- linux terminal使用技巧及代码定位(大部分内容整理得来)
- 健康第一
- 模拟iphone桌面切屏carousel小类库
- Spring MVC framework深入分析