Nearest Neighbor Search
来源:互联网 发布:oracle数据库简介 编辑:程序博客网 时间:2024/04/28 13:04
题目链接请点击
这道题,真是的怪我的思维不灵活吧,没思路也不知道换思路 ,最后也没有做出来,暴露了我的缺点很好,
#include<stdio.h>#include<string.h>#include<stdlib.h>#include<ctype.h>#include<math.h>#include<stack>#include<queue>#include<map>#include<set>#include<vector>#include<string>#include<iostream>#include<algorithm>#include<utility>#include<iomanip>typedef long long ll;const double Pi = acos(-1.0);const int N = 1e6+10, M = 1e3+20, mod = 1e9+7, inf = 2e9+10;const double e=2.718281828459 ;const double esp=1e-9;using namespace std;int a,b,c;int xx,yy,zz;int x,y,z;int main(){ while(~scanf("%d%d%d",&a,&b,&c)) { scanf("%d%d%d",&xx,&yy,&zz); scanf("%d%d%d",&x,&y,&z); int min1=inf; int min2=inf; int min3=inf; for(int i=xx;i<=x;i++) { min1=min(min1,abs(i-a)); } for(int i=yy;i<=y;i++) { min2=min(min2,abs(i-b)); } for(int i=zz;i<=z;i++) { min3=min(min3,abs(i-c)); } printf("%d\n",min1*min1+min2*min2+min3*min3); } return 0;}
0 0
- Nearest Neighbor Search
- Nearest Neighbor Search
- Nearest Neighbor Search(数学题)
- Nearest Neighbor Search:: A Database Perspective
- k Nearest Neighbor Search by CUDA
- k Nearest Neighbor Search by CUDA
- Product quantization for nearest neighbor search
- Product quantization for nearest neighbor search
- 2016 四川省赛 A.Nearest Neighbor Search
- 《Fast k Nearest Neighbor Search using GPU》
- Product Quantization for Nearest Neighbor Search论文理解
- Product Quantization for Nearest Neighbor Search论文实验
- k-Nearest Neighbor algorithm
- K Nearest Neighbor 算法
- Approximate Nearest Neighbor Searching
- Nearest Neighbor Image Scaling
- K Nearest Neighbor算法
- K Nearest Neighbor 算法
- UIScrollView 的contentOffset和contentInset的区别
- Linux 目录结构
- caffe 10 win10 使用python自定义层
- sql语句语法
- 区块链学堂(7):Geth 搭建私有网络-实战
- Nearest Neighbor Search
- DOS命令大全
- L1-011. A-B
- 【Unity优化】构建一个拒绝GC的Lis
- SpringMvc 返回json的三种方式
- CCF 201509-1
- php MySql的一些基础操作方法
- Vijos1844_积木大赛
- 创建 Node.js 应用