Codeforces Round #208 (Div. 2) A.Dima and Continuous Line
#include <iostream>
#include <algorithm>
#include <vector> using namespace std; int check(int a, int b){
if(a - b > )return ;
else if(a-b < ) return -;
else return ;
} int main(){
int n;
cin >> n;
vector<int> x(n);
for(int i = ; i < n; ++ i) cin >> x[i];
int i;
for( i = ; i < n ; ++ i){
int j ;
for(j = ; j < i-; j ++){
int a = check(x[j],x[i-]);
int b = check(x[j],x[i]);
int c = check(x[j+],x[i-]);
int d = check(x[j+],x[i]);
if(a*b*c*d < ){
cout<<"yes"<<endl;
break;
}
}
if(j < i-) break;
}
if(i >= n) cout<<"no"<<endl;
}
Codeforces Round #208 (Div. 2) A.Dima and Continuous Line的更多相关文章
- Codeforces Round #208 (Div. 2) 358D Dima and Hares
		
题目链接:http://codeforces.com/problemset/problem/358/D 开始题意理解错,整个就跪了= = 题目大意:从1到n的位置取数,取数的得到值与周围的数有没有取过 ...
 - Codeforces Round #208 (Div. 2) B	 Dima and Text Messages
		
#include <iostream> #include <algorithm> #include <string> using namespace std; in ...
 - Codeforces Round #208 (Div. 2)
		
A - Dima and Continuous Line 水题:直接模拟: #include<cstdio> #define maxn 1005 using namespace std; ...
 - Codeforces Round #167 (Div. 2) D. Dima and Two Sequences 排列组合
		
题目链接: http://codeforces.com/problemset/problem/272/D D. Dima and Two Sequences time limit per test2 ...
 - Codeforces Round #324 (Div. 2) D. Dima and Lisa 哥德巴赫猜想
		
D. Dima and Lisa Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/584/probl ...
 - Codeforces Round #214 (Div. 2) C. Dima and Salad (背包变形)
		
C. Dima and Salad time limit per test 1 second memory limit per test 256 megabytes input standard in ...
 - Codeforces Round #214 (Div. 2) C. Dima and Salad 背包
		
C. Dima and Salad Dima, Inna and Seryozha have gathered in a room. That's right, someone's got to ...
 - Codeforces Round #324 (Div. 2)D. Dima and Lisa  数学(素数)
		
D. Dima and Lisa Dima loves representing an odd num ...
 - Codeforces Round #553 (Div. 2)B. Dima and a Bad XOR 思维构造+异或警告
		
题意: 给出一个矩阵n(<=500)*m(<=500)每一行任选一个数 异或在一起 求一个 异或在一起不为0 的每行的取值列号 思路: 异或的性质 交换律 x1^x2^x3==x3^x2 ...
 
随机推荐
- DCMTK开源库的学习笔记4:利用ini配置文件对dcm影像进行归档
			
转:http://blog.csdn.net/zssureqh/article/details/8846337 背景介绍: 医学影像PACS工作站的服务端需要对大量的dcm文件进行归档,写入数据库处理 ...
 - HDU1198水管并查集Farm Irrigation
			
Benny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot ...
 - Quartz作业调度框架
			
Quartz 是一个开源的作业调度框架,它完全由 Java 写成,并设计用于 J2SE 和 J2EE 应用中.它提供了巨大的灵活性而不牺牲简单性.你能够用它来为执行一个作业而创建简单的或复杂的调度.本 ...
 - 解决虚拟机 正在决定eht0 的ip信息失败 无链接-- 添加虚拟网卡
			
添加步骤:1.进入设备管理器 2.点下一步3.继续下一步 4.继续往下走
 - IOS多线程(NSOperation,NSOperationQueue)
			
含义:NSOperation,NSOperationQueue是什么. The NSOperation class is an abstract class you use to encapsulat ...
 - php的socket通信(二)
			
案例一:代码详解 // 设置一些基本的变量$host = "192.168.1.99";$port = 1234;// 设置超时时间set_time_limit(0);// 创建一 ...
 - Java内存访问重排序笔记
			
>>关于重排序 重排序通常是编译器或运行时环境为了优化程序性能而采取的对指令进行重新排序执行的一种手段. 重排序分为两类:编译期重排序和运行期重排序,分别对应编译时和运行时环境. > ...
 - 我的MySQL5.6免安装版配置过程
			
最近打算学习MySQL,第一步就是安装.下载到一个面安装版.解压到我的D盘的mysql目录. 弄了一个最简单的配置文件.目录中只有一个my-default.ini,基本没啥用.在网上弄了一个my.in ...
 - Android ADT 下载 ( ADT-23.0.7 )
			
https://dl.google.com/android/ADT-23.0.7.ziphttps://dl.google.com/android/ADT-23.0.6.zip ADT百度云下载链接( ...
 - 【转】解决编译Apache出现的问题:configure: error: APR not found . Please read the documentation
			
这里写的很清楚了,已验证可用 http://blog.csdn.net/linghao00/article/details/7926458