cf A. Vasily the Bear and Triangle
http://codeforces.com/contest/336/problem/A
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std; int main()
{
int x,y;
scanf("%d%d",&x,&y);
if(x>=&&y>=)
{
printf("%d %d %d %d\n",,y+x,y+x,);
}
else if(x<&&y>)
{
printf("%d %d %d %d\n",x-y,,,y-x);
}
else if(x<&&y<)
{
printf("%d %d %d %d\n",x+y,,,x+y);
}
else if(x>&&y<)
{
printf("%d %d %d %d\n",,y-x,x-y,);
}
return ;
}
cf A. Vasily the Bear and Triangle的更多相关文章
- CF336A Vasily the Bear and Triangle 题解
Content 一个矩形的顶点为 \((0,0)\),其对顶点为 \((x,y)\),现过 \((x,y)\) 作直线,分别交 \(x\) 轴和 \(y\) 轴于 \(A,B\) 两点,使得 \(\t ...
- Codeforces Round #195 (Div. 2) A. Vasily the Bear and Triangle
水题,注意数据范围即可 #include <iostream> #include <algorithm> #include <utility> using name ...
- codeforces A. Vasily the Bear and Triangle 解题报告
题目链接:http://codeforces.com/problemset/problem/336/A 好简单的一条数学题,是8月9日的.比赛中没有做出来,今天看,从pupil变成Newbie了,那个 ...
- cf B. Vasily the Bear and Fly
http://codeforces.com/contest/336/problem/B #include <cstdio> #include <cstring> #includ ...
- codeforces 336D Vasily the Bear and Beautiful Strings(组合数学)
转载请注明出处: http://www.cnblogs.com/fraud/ ——by fraud Vasily the Bear and Beautiful Strings Vas ...
- codeforces 336C Vasily the Bear and Sequence(贪心)
转载请注明出处: http://www.cnblogs.com/fraud/ ——by fraud Vasily the Bear and Sequence Vasily the b ...
- C. Vasily the Bear and Sequence Codeforces 336C(枚举,思维)
C. Vasily the Bear and Sequence time limit per test 1 second memory limit per test 256 megabytes inp ...
- Codeforces Round #195 (Div. 2) D题Vasily the Bear and Beautiful Strings
这场CF,脑子乱死啊...C题,搞了很长时间,结束了,才想到怎么做.B题,没看,D题,今天看了一下,很不错的组合题. 如果n和m都挺多的时候 以下情况都是变为1,根据偶数个0,最后将会为1,奇数个0, ...
- CF #356 div1 A. Bear and Prime 100
题目链接:http://codeforces.com/contest/679/problem/A CF有史以来第一次出现交互式的题目,大致意思为选择2到100中某一个数字作为隐藏数,你可以询问最多20 ...
随机推荐
- pywin32 安装错误 ImportError: DLL load failed: 不是有效的 Win32 应用程序
pywin32 安装错误 ImportError: DLL load failed: 不是有效的 Win32 应用程序. 发现是因为没有制定Pywin32的dll所致,我们在用Pywin32开发时, ...
- logstash 发送zabbix 给消息加上type
input { file { type => "zj_api" path => ["/data01/applog_backup/zjzc_log/zj-api ...
- BZOJ1116: [POI2008]CLO
1116: [POI2008]CLO Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 565 Solved: 303[Submit][Status] ...
- LIBRARY_PATH和LD_LIBRARY_PATH环境变量的区别
LIBRARY_PATH和LD_LIBRARY_PATH是Linux下的两个环境变量,二者的含义和作用分别如下: LIBRARY_PATH环境变量用于在程序编译期间查找动态链接库时指定查找共享库的路径 ...
- [置顶] 使用struts拦截器+注解实现网络安全要求中的日志审计功能
J2EE项目中出于安全的角度考虑,用户行为审计日志功能必不可少,通过本demo可以实现如下功能: 1.项目中记录审计日志的方法. 2.struts拦截器的基本配置和使用方法. 3.struts拦截器中 ...
- c语言通过时间种子产生随机数并选出最大值以及下标
1 #include <stdio.h> #include <stdlib.h> #include <time.h> //2016 10 10 void main( ...
- nmap 使用脚本引擎进行扫描
1.下载nmap(nmap官网). 2.安装nmap. 3.编辑环境变量(windows下所需),保存.
- jQuery限制文本框只能输入正整数
//限制键盘只能按数字键.小键盘数字键.退格键 $("#txtQty").keydown(function (e) { var code = parseInt(e.keyCode) ...
- python-线程、进程、协程
进程 && 线程 进程:是内存中的一个独立的句柄,我们可以理解为一个应用程序在内存中就是一个进程. 各个进程之间是内存相互独立,不可共享的 线程:每个应用运行之后就会对应启动一个主线程 ...
- 关于WinForm/Web如何使用缓存Cach
原文链接:http://www.cnblogs.com/zfanlong1314/archive/2013/03/28/2986403.html Cache 的绝对到期与滑动到期 绝对到期:设置绝对过 ...