题目链接

水题,算一下就行。

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll x[],y[],z[];
double cal(ll x[])
{
ll ans1;
if(x[]>=x[]&&x[]<=x[])
ans1=;
else if(x[]<x[])
ans1=(x[]-x[])*(x[]-x[]);
else if(x[]>x[])
ans1=(x[]-x[])*(x[]-x[]);
return ans1;
}
int main()
{
for(int i=;i<;i++)
scanf("%lld%lld%lld",&x[i],&y[i],&z[i]);
ll ans1=cal(x),ans2=cal(y),ans3=cal(z);
printf("%lld\n",ans1+ans2+ans3);
return ;
}

(2016弱校联盟十一专场10.2) A.Nearest Neighbor Search的更多相关文章

  1. 2016弱校联盟十一专场10.5---As Easy As Possible(倍增)

    题目链接 https://acm.bnu.edu.cn/v3/contest_show.php?cid=8506#problem/A problem description As we know, t ...

  2. 2016弱校联盟十一专场10.3---Similarity of Subtrees(深搜+hash、映射)

    题目链接 https://acm.bnu.edu.cn/v3/problem_show.php?pid=52310 problem description Define the depth of a ...

  3. (2016弱校联盟十一专场10.3) D Parentheses

    题目链接 把左括号看成A右括号看成B,推一下就行了.好久之前写的,推到最后发现是一个有规律的序列. #include <bits/stdc++.h> using namespace std ...

  4. (2016弱校联盟十一专场10.3) B.Help the Princess!

    题目链接 宽搜一下就行. #include <iostream> #include<cstdio> #include<cstring> #include<qu ...

  5. (2016弱校联盟十一专场10.3) A.Best Matched Pair

    题目链接 #include<cstdio> #include<cstring> #include<algorithm> #include<stack> ...

  6. 2016弱校联盟十一专场10.3---We don't wanna work!(STL--set的使用)

    题目链接 https://acm.bnu.edu.cn/v3/contest_show.php?cid=8504#problem/C 代码如下: #include <iostream> # ...

  7. 2016弱校联盟十一专场10.2---Around the World(深搜+组合数、逆元)

    题目链接 https://acm.bnu.edu.cn/v3/problem_show.php?pid=52305 problem  description In ICPCCamp, there ar ...

  8. (2016弱校联盟十一专场10.2) E.Coins

    题目链接 很久之前写的了,好像是对拍打表过的,推一下就行了. #include <bits/stdc++.h> using namespace std; typedef long long ...

  9. (2016弱校联盟十一专场10.5) F. Fibonacci of Fibonacci

    题目链接 题目大意就是这个,先找出下标的循环节,再快速幂对20160519取余就行了. 找出下标循环节: #include <cstdio> #include <iostream&g ...

随机推荐

  1. bootstrap模版

    http://demo.cssmoban.com/cssthemes3/cpts_274_nz/forms.html

  2. sql批量更换dedecms文章来源和作者

    前面写了一篇修改dedecms默认文章来源 "未知"改为关键词,那个是修改以后发布的文章“来源”才会变成自己设定的关键词,如果修改之前已经有很多文章了,那些文章“来源”还是显示“未 ...

  3. 机器学习之Hash集合问题

    问题来源与七月学习之 (3.x线性代数与矩阵运算基础)

  4. C++ 模拟虚拟键盘按键表

    键盘VK键值列表 /* Virtual Keys, Standard Set*/ VK_LBUTTON                                      0x01 VK_RBU ...

  5. hash-4.hashtable

    1.先看hashtable的源代码 public synchronized V put(K key, V value) { // Make sure the value is not null if ...

  6. [转]CentOS 5.3通过yum升级php到最新版本的方法

    来自:www.jasonlitka.com/media 通过测试,方法三可行: 方法三 vim /etc/yum.repos.d/utterramblings.repo 输入 [utterrambli ...

  7. ActionBar使用

    在Android3.0之后,Google对UI导航设计上进行了一系列的改革,其中有一个非常好用的新功能就是引入的ActionBar,他用于取代3.0之前的标题栏,并提供更为丰富的导航效果. 一.添加A ...

  8. NumPy的详细教程

    原文  http://blog.csdn.net/lsjseu/article/details/20359201 主题 NumPy 先决条件 在阅读这个教程之前,你多少需要知道点python.如果你想 ...

  9. js生成当前时间

    js生成当前时间 var today=new Date(); function itArray(){ this.length=itArray.arguments.length for(var i=0; ...

  10. Sqli-LABS通关笔录-13

    输入账号:'123密码:456就报错了,报错如下所示: 跟刚才一样的.双引号换成了单引号而已. 注入为布尔型盲注,可以使用二分法注入 THE END