摘要:
题意:这个距离用|xi-xj|+|yi-yj|来表示 解析:在这些所有三角形中,每个边用了n-2次,所以把所有边距离加起来,*(n-2)就好了。 #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #includ 阅读全文
posted @ 2020-03-28 23:07
liyexin
阅读(189)
评论(0)
推荐(0)
摘要:
地址:https://ac.nowcoder.com/acm/contest/4853#question 题意:中文不多解释啦。 解析:根据题意,有暴力: for(int i=1;i<=n;i++) for(int j=1;j<=n;j++) sum+=a[i]&a[j]; 但是1e5*1e5,1s 阅读全文
posted @ 2020-03-28 23:03
liyexin
阅读(163)
评论(0)
推荐(0)
摘要:
#include<cstdio> using namespace std; const int N=1e6+10; typedef long long ll; ll sum[N*4],lazy[N*4],len[N*4]; int n,m; void build(int id,int l,int r 阅读全文
posted @ 2020-03-28 19:51
liyexin
阅读(116)
评论(0)
推荐(0)

浙公网安备 33010602011771号