cf459A Pashmak and Garden】的更多相关文章

A. Pashmak and Garden time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Pashmak has fallen in love with an attractive girl called Parmida since one year ago... Today, Pashmak set up a meeting…
Pashmak and Garden Codeforces Round #261 (Div. 2) A. Pashmak and Garden time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Pashmak has fallen in love with an attractive girl called Parmida sin…
题目链接:http://codeforces.com/problemset/problem/459/A A. Pashmak and Garden time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Pashmak has fallen in love with an attractive girl called Parmida s…
Pashmak has fallen in love with an attractive girl called Parmida since one year ago... Today, Pashmak set up a meeting with his partner in a romantic garden. Unfortunately, Pashmak has forgotten where the garden is. But he remembers that the garden…
题目链接:http://codeforces.com/problemset/problem/459/A 题目大意: 给出两个点(在坐标轴中),求另外两个点从而构成一个正方形,该正方形与坐标轴平行. 如果给的点构不成与坐标轴平行的正方形,则输出 -1. 两点范围: x1, y1, x2, y2 ( - 100 ≤ x1, y1, x2, y2 ≤ 100) .所求两点范围: x3, y3, x4, y4 ( - 1000 ≤ x3, y3, x4, y4 ≤ 1000). 解题思路: 给出两个点,…
题目链接:http://codeforces.com/problemset/problem/459/A 题目意思:给出两个点的坐标你,问能否判断是一个正方形,能则输出剩下两点的坐标,不能就输出 -1. 这题更傻了,在考虑对角线的两点时,少考虑了一种情况:两个点分属不同象限:这时需要用到绝对值函数 abs ! 最近集训不知道是不是搞傻左,反正CF的题目打了几场,结果都很惨,有一点点恐惧感,怕跌回以前不堪的rating.唉---继续努力吧!!! #include <iostream> #inclu…
A. Pashmak and Garden time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Pashmak has fallen in love with an attractive girl called Parmida since one year ago... Today, Pashmak set up a meeting…
      2014_8_15 CodeForces 261 DIV2 A. Pashmak and Garden 简单题   B. Pashmak and Flowers    简单题   C. Pashmak and Buses     好题!k进制的应用   D. Pashmak and Parmida's problem 简单题! 统计+树状数组    E. Pashmak and Graph 简单题!排序+DP  2014-08-17 BestCoder Round #5 A. Poo…
http://codeforces.com/contest/459 A题 Pashmak and Garden 化简化简水题,都告诉平行坐标轴了,数据还出了对角线,后面两个点坐标给的范围也不错 #include <cstdio> int x[4],y[4]; int abs(int n){ return n<0?-n:n; } int main(){ scanf("%d%d%d%d",x,y,x+1,y+1); int dx=abs(x[0]-x[1]); int d…
Codeforces Round #261 (Div. 2)[ABCDE] ACM 题目地址:Codeforces Round #261 (Div. 2) A - Pashmak and Garden 题意:  一个正方形,它的边平行于坐标轴,给出这个正方形的两个点,求出另外两个点. 分析:  推断下是否平行X轴或平行Y轴,各种if. 代码: /* * Author: illuz <iilluzen[at]gmail.com> * File: A.cpp * Create Date: 2014…