题目链接:http://www.cnblogs.com/zhsl/p/3395868.html

  水题,注意细节。

 //STATUS:C++_AC_31MS_333KB
#include <functional>
#include <algorithm>
#include <iostream>
//#include <ext/rope>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <numeric>
#include <cstring>
#include <cassert>
#include <cstdio>
#include <string>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>
using namespace std;
//#pragma comment(linker,"/STACK:102400000,102400000")
//using namespace __gnu_cxx;
//define
#define pii pair<int,int>
#define mem(a,b) memset(a,b,sizeof(a))
#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1
#define PI acos(-1.0)
//typedef
typedef __int64 LL;
typedef unsigned __int64 ULL;
//const
const int N=;
const int INF=0x3f3f3f3f;
const int MOD=,STA=;
const LL LNF=1LL<<;
const double EPS=1e-;
const double OO=1e15;
const int dx[]={-,,,};
const int dy[]={,,,-};
const int day[]={,,,,,,,,,,,,};
//Daily Use ...
inline int sign(double x){return (x>EPS)-(x<-EPS);}
template<class T> T gcd(T a,T b){return b?gcd(b,a%b):a;}
template<class T> T lcm(T a,T b){return a/gcd(a,b)*b;}
template<class T> inline T lcm(T a,T b,T d){return a/d*b;}
template<class T> inline T Min(T a,T b){return a<b?a:b;}
template<class T> inline T Max(T a,T b){return a>b?a:b;}
template<class T> inline T Min(T a,T b,T c){return min(min(a, b),c);}
template<class T> inline T Max(T a,T b,T c){return max(max(a, b),c);}
template<class T> inline T Min(T a,T b,T c,T d){return min(min(a, b),min(c,d));}
template<class T> inline T Max(T a,T b,T c,T d){return max(max(a, b),max(c,d));}
//End int n; int main()
{
// freopen("in.txt","r",stdin);
int i,j;
LL ans1,ans2;
while(~scanf("%d",&n))
{
if(n==){
printf("0 2\n");
continue;
}
if(n==){
printf("0 0\n");
continue;
}
if(n==){
printf("6 9\n");
continue;
}
if(n&){
ans1=(LL)n*(n-)/;
printf("%I64d 0\n",ans1);
}
else {
ans1=(LL)n*(n-)/;
printf("%I64d %I64d\n",ans1,ans1);
}
}
return ;
}

URAL-1981 Parallel and Perpendicular 水题的更多相关文章

  1. URAL 1001 Reverse Root(水题?)

    The problem is so easy, that the authors were lazy to write a statement for it! Input The input stre ...

  2. DFS水题 URAL 1152 False Mirrors

    题目传送门 /* 题意:一个圈,每个点有怪兽,每一次射击能消灭它左右和自己,剩余的每只怪兽攻击 搜索水题:sum记录剩余的攻击总和,tot记录承受的伤害,当伤害超过ans时,结束,算是剪枝吧 回溯写挫 ...

  3. URAL - 1917 Titan Ruins: Deadly Accuracy(水题)

    水题一个,代码挫了一下: 题意不好理解. 你去一个洞窟内探险,洞窟内有许多宝石,但都有魔法守护,你需要用魔法将它们打下来. 每个宝石都有自己的防御等级,当你的魔法超过它的防御等级时它就会被你打下来. ...

  4. URAL 2056 Scholarship 水题

    ScholarshipTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.a ...

  5. URAL 1136 Parliament 二叉树水题 BST后序遍历建树

    二叉树水题,特别是昨天刚做完二叉树用中序后序建树,现在来做这个很快的. 跟昨天那题差不多,BST后序遍历的特型,找到最后那个数就是根,向前找,比它小的那块就是他的左儿子,比它大的那块就是右儿子,然后递 ...

  6. poj 1003:Hangover(水题,数学模拟)

    Hangover Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 99450   Accepted: 48213 Descri ...

  7. Codeforces Beta Round #14 (Div. 2) A. Letter 水题

    A. Letter 题目连接: http://www.codeforces.com/contest/14/problem/A Description A boy Bob likes to draw. ...

  8. codeforces 14A - Letter & codeforces 859B - Lazy Security Guard - [周赛水题]

    就像title说的,是昨天(2017/9/17)周赛的两道水题…… 题目链接:http://codeforces.com/problemset/problem/14/A time limit per ...

  9. 【转】POJ百道水题列表

    以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight ...

随机推荐

  1. itnesse实现api接口自动化测试学习

    上午在园子里乱逛,看了不少小伙伴们分享的接口测试方面的知识,大家所叙述到的一些经验或多或少,我也曾遇到过,突然意识到知识的点滴积累是多么的重要,我记得我最早接触接口测试的时候,就是只在浏览器里人工测试 ...

  2. 下拉刷新控件(5)SwipeRefreshLayout官方教程(下)响应刷新事件

    http://developer.android.com/training/swipe/respond-refresh-request.html This lesson shows you how t ...

  3. 【转载】Redis的一些使用场景

    看了一些文章,关于Redis的使用场景,觉得挺好的.Redis肯定远远不止作为缓存而使用.Redis更像是一个实现很好的数据结构服务器,通过TCP栈协议提供服务.下面进行详细描述. http://da ...

  4. XML文件读取工具类

    /// <summary> /// Author: jiangxiaoqiang /// </summary> public class XmlReader { //===== ...

  5. Web程序员最常用的11款PHP框架

    PHP框架是Web程序员和开发人员最为有用的工具. PHP框架可以帮助用户更快地开发项目. 今天我将为开发人员带来几款最好的PHP框架,希望能对你有用. 1.Agavi Agavi是一款强大的,可扩展 ...

  6. Couchbase的web管理员后台 查看缓存提示警告 Warning: Editing of document with size more than 2.5kb is not allowed的解决方法

    这个警告仅仅只会发生在web管理员后台,实际在缓存中的数据是不会有影响的(好像默认单个key对应的缓存大小是20M) 但是有时候我们就是想在web后台里面看看到底保存了什么数据,怎么能突破这个限制呢? ...

  7. Http进行网络通信

    http使用get的方式进行网络通信: package com.testGet; import java.io.BufferedReader; import java.io.IOException; ...

  8. BZOJ 1176 MOKIA

    cdq分治. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm ...

  9. java实现的kmp算法

    package DataStructure; import java.util.ArrayList; import java.util.List; //KMP算法的实现 //以下代码由freedom结 ...

  10. Notepad 列编辑、正则查找、替换

    目标: 将源数据转成初始化sql语句.源数据: 104110040018,1,中国银行,中国银行天津琼州道支行,NULL,1100,天津市,12,天津市 104110040059,1,中国银行,中国银 ...