D 考虑每个点被删除时其他点对它的贡献,然后发现要求出距离为1~k的点对有多少个. 树分治+FFT.分治时把所有点放一起做一遍FFT,然后减去把每棵子树单独做FFT求出来的值. 复杂度$nlog^2n$ #include<bits/stdc++.h> #define N 270000 #define pi acos(-1) #define ll long long #define inf 0x3f3f3f3f using namespace std; const int p = 10000…
A. Hacker Cups and Balls 二分答案,将$\geq mid$的数看成$1$,$<mid$的数看成$0$,用线段树进行区间排序检查即可.时间复杂度$O(n\log^2n)$. #include<cstdio> #include<algorithm> using namespace std; const int N=100010,M=262150; int n,m,i,a[N],e[N][2],l,r,MID,ans; int len[M],c1[M],ta…
题目: You are given one string S consisting of only '0' and '1'. You are bored, so you start to play with the string. In each operation, you can move any character of this string to some other position in the string. For example, suppose . Then you can…
题目:Statements Dreamoon likes algorithm competitions very much. But when he feels crazy because he cannot figure out any solution for any problem in a competition, he often draws many meaningless straight line segments on his calculation paper. Dreamo…
题目: Dreamoon likes algorithm competitions very much. But when he feels crazy because he cannot figure out any solution for any problem in a competition, he often draws many meaningless straight line segments on his calculation paper. Dreamoon's calcu…
The Android University ACM Team Selection Contest Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述  Now it's 20000 A.D., and the androids also participate in the ACM Inter-national Collegiate Programming Contest (ACM/ICPC). In order to sele…
链接:知乎 [点击查看大图] 原图来自LearnCodeAcademy最火的视频,learncode是YouTube上最火的Web开发教学频道,介绍包括HTML/CSS/JavaScript/Sublime Text/CSS Layouts/Responsive Design/React.js/Node.js/Angular.js/Backbone.js/Docker/Dev Ops/Server Administration/Deployment Strategies在内的各类教学视频,拥有超…
A. As Easy As Possible 每个点往右贪心找最近的点,可以得到一棵树,然后倍增查询即可. 时间复杂度$O((n+m)\log n)$. #include <bits/stdc++.h> using namespace std ; typedef long long LL ; typedef long long Int ; typedef pair < int , int > pi ; #define clr(a,x) memset ( a , x , sizeof…
https://community.mindjet.com/mindjet/topics/ensure-2017-64-bit-version-installation Mindmanager should automatically pick same bit rate version based on MS office Bit version while installing.The combined installer detects the bit version of Microso…
[SinGuLaRiTy-1012] Copyright (c) SinGuLaRiTy 2017. All Rights Reserved. 最近神犇喜欢考COCI...... 测试题目 对于所有的题目:Time Limit:1s  |  Memory:256 MB 第一题:银行账户(account)[parato] [题目描述] 大家都知道28定律吧,据说世界上20%的人拥有80%的财富.现在你对一家银行的账户进行检测,看是否符合28定律,或者有更强的定律.比如说,10%的人拥有85%的财富…