码迷,mamicode.com
首页 >  
搜索关键字:acm 字典树    ( 19775个结果
ACM道路之一:基础算法(位运算)
lowbit(x) : 返回x的最后一位1 lowbit(100010) = 10 lowbit(11011000) = 1000 lowbit(x) = x&(-x) = x & (~x+1) : -x x的补码 = x 取反+1 给定一个长度为n的数列,请你求出数列中每个数的二进制表示中1的个数 ...
分类:编程语言   时间:2020-01-29 21:52:22    阅读次数:53
Magic necklace (项链排列)
题目链接:https://ac.nowcoder.com/acm/contest/3570/H #include <iostream> #include <algorithm> #include <string> #include <string.h> #include <vector> #incl ...
分类:其他好文   时间:2020-01-29 21:19:01    阅读次数:132
Thematic002.字符串专题
目录 Trie字典树 KMP AC自动机 Manacher 回文自动机 后缀数组 后缀自动机 ___ Trie字典树 概念 我们先来看看什么是Trie字典树 可以发现,这棵树的每一条边都有一个字符 有一些点是黄色的,表示它们被标记了 那么,哪些字符串在这棵树中出现过呢? 从树的根节点到每一个被标记的 ...
分类:其他好文   时间:2020-01-28 23:35:40    阅读次数:138
数星星(单点更新,求前缀和)
http://acm.hdu.edu.cn/showproblem.php?pid=1541 题意:二维平面坐标上,给出n个星星的坐标,规定每个星星的左下方向的星星数量为该星星的等级。 统计1-n-1等级的数量。 解法:因为给出顺序的特殊性,可以用树状数组统计各星星的等级。 注意两点:1、该题为多组 ...
分类:其他好文   时间:2020-01-28 21:30:23    阅读次数:69
Codeforces Trainning Plan
Hey Guys I am back to my path of training, I am currently studying at UNSW and i am preparing to do ACM-ICPC in my uni life. I will be recording my tr ...
分类:其他好文   时间:2020-01-28 21:06:35    阅读次数:69
kuangbin专题专题十一 网络流 POJ 3436 ACM Computer Factory
题目链接:https://vjudge.net/problem/POJ-3436 Sample input 1 3 4 15 0 0 0 0 1 0 10 0 0 0 0 1 1 30 0 1 2 1 1 1 3 0 2 1 1 1 1 题目:P —— 一台电脑由p个零件组成 N —— 工厂有n台加 ...
分类:其他好文   时间:2020-01-28 20:56:06    阅读次数:82
hdu1066 Last non-zero Digit in N!(求阶乘最后一位不为0的数字)
http://acm.hdu.edu.cn/showproblem.php?pid=1066 转自:https://blog.csdn.net/fengyu0556/article/details/5615129 hdu1066改进的思路和对于大数的处理:(转) 为了把0去掉,我们把所有的因数2和5 ...
分类:其他好文   时间:2020-01-28 19:24:40    阅读次数:79
高精度算法(C/C++)
高精度算法 (C/C++) 做ACM题的时候,经常遇到大数的加减乘除,乘幂,阶乘的计算,这时给定的数据类型往往不够表示最后结果,这时就需要用到高精度算法。高精度算法的本质是把大数拆成若干固定长度的块,然后对每一块进行相应的运算。这里以考虑4位数字为一块为例,且输入的大数均为正整数(也可以考虑其他位, ...
分类:编程语言   时间:2020-01-28 17:12:40    阅读次数:89
# Codeforces Round #615 (Div. 3)
标签(空格分隔): ACM D. MEX maximizing Description: Recall that MEX of an array is a minimum non negative integer that does not belong to the array. Examples ...
分类:其他好文   时间:2020-01-27 23:55:09    阅读次数:116
aoj2249 最短路中的双权值问题
Problem H: Road Construction King Mercer is the king of ACM kingdom. There are one capital and some cities in his kingdom. Amazingly, there are no roa ...
分类:其他好文   时间:2020-01-27 21:50:06    阅读次数:53
19775条   上一页 1 ... 44 45 46 47 48 ... 1978 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!