摘要: 先思考一个问题: 在K维空间里面有许多的点,对于某些给定的点,我们需要找到和它最近的m个点。 这里的距离指的是欧几里得距离: D(p,q)=D(q,p)=sqrt((q1-p1)^2+(q2-p2)^2+(q3-p3)^2+...+ (qn-pn)^2),请你帮忙解决一下。 输入: 点数n(1≤n≤ 阅读全文
posted @ 2018-12-22 21:41 wyb的小屋 阅读(279) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #define maxx 100005 #define maxn 1000005 using namespace std; int n,m,cnt,ans=0; int c[maxx],nex[maxx]; int head[maxn],s[maxn],st[maxn],ft[maxn]; //c[i]表示第i个数字的颜色 //ft[i]第i... 阅读全文
posted @ 2018-12-16 21:32 wyb的小屋 阅读(105) 评论(1) 推荐(0) 编辑
摘要: 没想到我也能做出来果然(网络的力量)强大啊。 阅读全文
posted @ 2018-12-16 19:49 wyb的小屋 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 在看了大佬的博客后写下(抄下)的…… 大佬的博客:https://www.cnblogs.com/olinr/p/9455411.html 阅读全文
posted @ 2018-12-15 16:30 wyb的小屋 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 改了4小时,我果然还是太弱了…… 阅读全文
posted @ 2018-12-15 10:15 wyb的小屋 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 被强大(坑爹)的数据卡了 。。。 阅读全文
posted @ 2018-12-14 21:16 wyb的小屋 阅读(194) 评论(0) 推荐(0) 编辑