码迷,mamicode.com
首页 >  
搜索关键字:getch    ( 1998个结果
bzoj 1878: [SDOI2009]HH的项链【树状数组】
对于一个lr,每个颜色贡献的是在(1,r)区间里出现的最右位置,所以记录一个b数组表示当前点这个颜色上一个出现的位置 然后把询问离线,按r升序排序 每次把右端点右移,把这个点在树状数组上+1,并且在当前这个点的b位置上 1(表示没用了),然后树状数组前缀和减一下即可 ~~我写的~~莫队会T cpp ...
分类:编程语言   时间:2018-07-29 10:45:57    阅读次数:217
D - Xenia and Bit Operations
D. Xenia and Bit Operationstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output D. Xenia and Bit Ope ...
分类:其他好文   时间:2018-07-29 00:47:40    阅读次数:147
函数指针
int Add(int a, int b){ return a + b;} int Sub(int a, int b){ return b - a;} void main(){ int a =0; //cin >> a; scanf("%d", a); int(*p)(int a ,int b);/ ...
分类:其他好文   时间:2018-07-28 13:48:06    阅读次数:174
快速读入输出模板
inline int read() { char ch = getchar(); int x = 0, f = 1; while(ch '9') { if(ch == '-') f = -1; ch = getchar(); } while('0' 9) put(x / 10); putc... ...
分类:其他好文   时间:2018-07-28 11:57:17    阅读次数:150
ARC 100
链接 https://arc100.contest.atcoder.jp/ C Linear Approximation 题解 把ai减去i后排序, 我们要的b就是排完序后的中位数 Code 1 #include<bits/stdc++.h> 2 using namespace std; 3 typ ...
分类:其他好文   时间:2018-07-28 00:09:40    阅读次数:185
luogu1919 A*BProblem升级版 (FFT)
把一个n位数看做n-1次的多项式,每一项的系数是反过来的每一位最后每一项系数进进位搞一搞就行了(数组一定要开到2的次数..要不然极端数据会RE) ...
分类:其他好文   时间:2018-07-27 14:36:55    阅读次数:122
CF995C Leaving the Bar
题目描述 For a vector v?=(x,y) \vec{v} = (x, y) v=(x,y) , define ∣v∣=x2+y2 |v| = \sqrt{x^2 + y^2} ∣v∣=x2+y2? . Allen had a bit too much to drink at the ba ...
分类:其他好文   时间:2018-07-26 18:45:04    阅读次数:168
(简)树形ztree 与angularjs结合,实现下级数据,点击复选框 填写到输入框里
html:<link href="vendors/zTreeStyle/zTreeStyle.css" rel="stylesheet" />生态系统类型* : <asp:TextBox ID="TextBox3" CssClass="form-control" runat=&qu
分类:Web程序   时间:2018-07-26 11:36:34    阅读次数:281
「Splay」指针版与数组版模板
splay总是多打打就熟了,先把板子贴在这里方便查看 Splay的思想还是很简单的,反正就是把每次查询到的都splay到根,维护动态平衡 插入的时候就找到位置,splay到根 删除是最麻烦的,先查找到它并splay到根。然后找到前驱splay到根的左子节点作为根,废掉原先的根节点,然后把右子节点接到 ...
分类:编程语言   时间:2018-07-25 14:32:36    阅读次数:468
[ZJOI2007] 仓库建设
传送门:>HERE< 题意:有n个地点,每个地点有货物P[i]个,距离起点(地点0)的距离为x[i]。在每个地点建立仓库需要费用c[i],现在需要在某些地点建设仓库,从而将货物转移到仓库里。规定只能从编号小的地点转移到编号大的地点,同时转移的费用的是路程*货物数量。求最小的总费用(总费用=建设费用+ ...
分类:其他好文   时间:2018-07-23 22:00:17    阅读次数:165
1998条   上一页 1 ... 90 91 92 93 94 ... 200 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!