水题,注意数据范围即可

#include <iostream>
#include <algorithm>
#include <utility>
using namespace std; typedef pair<int,int> Point; int main(){
int x,y;
cin >> x >>y;
Point a,b;
if((x>0 && y > 0) || (x < 0 && y < 0)) a = make_pair(x+y,0),b=make_pair(0,x+y);
else a = make_pair(x-y,0),b=make_pair(0,y-x);
if(a.first > b.first) swap(a,b);
cout<<a.first<<" "<<a.second<<" "<<b.first<<" "<<b.second<<endl;
}

  

Codeforces Round #195 (Div. 2) A. Vasily the Bear and Triangle的更多相关文章

  1. Codeforces Round #195 (Div. 2) D题Vasily the Bear and Beautiful Strings

    这场CF,脑子乱死啊...C题,搞了很长时间,结束了,才想到怎么做.B题,没看,D题,今天看了一下,很不错的组合题. 如果n和m都挺多的时候 以下情况都是变为1,根据偶数个0,最后将会为1,奇数个0, ...

  2. Codeforces Round #195 (Div. 2)

    记次CF吧 1题...B题..因为循环的i没设成long long 却参与了运算 结果就悲剧了 一直交 一直挂 ..上题 A 水.. 第一次少了个空格还.. #include <iostream ...

  3. Codeforces Round #195 (Div. 2) 少部分题解

    太困了于是没做...第二天看题蘑菇题居多就只切了简单的两个... A:直接输出... int main() { //FIN; //FOUT; int x,y; cin>>x>> ...

  4. Codeforces Round #195 A B C 三题合集 (Div. 2)

    A 题 Vasily the Bear and Triangle 题目大意 一个等腰直角三角形 ABC,角 ACB 是直角,AC=BC,点 C 在原点,让确定 A 和 B 的坐标,使得三角形包含一个矩 ...

  5. Codeforces Round #366 (Div. 2) ABC

    Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...

  6. Codeforces Round #354 (Div. 2) ABCD

    Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/out ...

  7. Codeforces Round #368 (Div. 2)

    直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...

  8. cf之路,1,Codeforces Round #345 (Div. 2)

     cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅.....   ...

  9. Codeforces Round #279 (Div. 2) ABCDE

    Codeforces Round #279 (Div. 2) 做得我都变绿了! Problems     # Name     A Team Olympiad standard input/outpu ...

随机推荐

  1. Linux内存性能指标、CPU性能指标

    内存性能指标 内存基础概念 先执行一下 top 命令,看结果中关于内存的相关部分 # top 其中的 VIRT.RES.SWAP 都是什么呢? 分别是下面的3个概念: 物理内存 Resident - ...

  2. DBCC常用命令小汇

    DBCC是SQL Server提供的一组控制台命令,功能很强大,掌握一些必要的语句,对操作数据库有不少帮助,所以决定整理一下,发现已有不少类似的整理,减少了不少工作,归类如下: 一.DBCC 帮助类命 ...

  3. 23.备忘录模式(Memento Pattern)

    using System; using System.Collections.Generic; namespace ConsoleApplication6 { /// <summary> ...

  4. LeetCode之Binary Tree Level Order Traversal 层序遍历二叉树

    Binary Tree Level Order Traversal 题目描述: Given a binary tree, return the level order traversal of its ...

  5. .net学习之泛型、程序集和反射

    一.泛型1.CLR编译时,编译器只为MyList<T>类型产生“泛型版”的IL代码——并不进行泛型的实例化,T在中间只充当占位符.例如:MyList 类型元数据中显示的<T> ...

  6. Delphi中record和packed record的区别

    转载:http://blog.csdn.net/rznice/article/details/6566978 第一种不带packed关键字的结构体表明编译器编译时要求进行字对齐. 而第二种带packe ...

  7. Java Hour 64 JVM 最大内存设置

    从这篇博文起,不再是流水式的学习记录了,稍微改进下风格. 运行时获得当前JVM 设置大小 首先,-Xmx100000000指定最大的内存分配. public static void main(Stri ...

  8. 快速熟悉python 下使用mysql(MySQLdb)

    首先你需要安装上mysql和MySQLdb模块(当然还有其他模块可以用),这里我就略过了,如果遇到问题自行百度(或者评论在下面我可以帮忙看看) 这里简单记录一下自己使用的学习过程: 一.连接数据库 M ...

  9. loj 1030概率dp

    题目链接:http://lightoj.com/volume_showproblem.php?problem=1030 思路:一直以来对这种概率题都挺感冒的=.=......还是说一下思路吧,dp[i ...

  10. 【项目经验】——JSON.parse() && JSON.stringify()

    我们在做项目的时候,都知道序列化和反序列化,师哥说:"有正就有反,有来就有回!"的确,就是这样.然后我们在这里分享一下JSON.stringify()  和JSON.parse() ...