码迷,mamicode.com
首页 >  
搜索关键字:algorithm    ( 11758个结果)
Binary 转 BCD 码
在数字电路中,经常会遇到进制转换问题,如二进制 (Binary) 转 BCD (Binary Coded Decimal)。针对这种数制的转换,有个很神奇的算法—— double dabble algorithm ,也称为 shift and add 3 algorithm 。 其主要流程如下(摘自 ...
分类:其他好文   时间:2020-02-21 00:07:05    阅读次数:84
【题解】Lomsat gelral [CF600E]
【题解】Lomsat gelral [CF600E] 写完 "$\text{Dsu on tree}$" 后大致浏览了网上的题解,常见做法有以下几种: $\text{Dsu on tree}$(占大多数,毕竟是板子) 线段树合并(空间巨大) $O(n\sqrt{n}logn)$ 的 $\text{D ...
分类:其他好文   时间:2020-02-20 17:28:58    阅读次数:83
计算直角坐标系的面积并和面积交(可小数)
面积并 3个要素:1、离散化,因为坐标可以是浮点数,有些题可能距离很长 2、扫描线,将每个矩形的俩条平行与x轴的俩条边存到数组里,标记为上边和下边,每次扫描到下边的时候,就将这一段统计起来,扫描到下边的时候就将之前的统计去掉; 3、线段树,管理矩形的这些边在x轴方向上的有效距离,实际操作就把这些边一 ...
分类:其他好文   时间:2020-02-20 15:09:23    阅读次数:87
C++ 全排列问题——递归枚举法
全排列问题是一道非常经典的递归题目,而递归枚举法求解也是最暴力的一种方法。 ...
分类:编程语言   时间:2020-02-20 13:22:57    阅读次数:92
Codeforces #620 div2 B
题目: Returning back to problem solving, Gildong is now studying about palindromes. He learned that a palindrome is a string that is the same as its rev ...
分类:其他好文   时间:2020-02-20 09:39:04    阅读次数:81
[Algorithm] 474. Ones and Zeroes
In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue. For now, suppose you are a domin ...
分类:其他好文   时间:2020-02-20 09:18:04    阅读次数:62
C++-hihoCode1545-小Hi和小Ho的对弈游戏[树上Nim]
1 #include <set> 2 #include <map> 3 #include <cmath> 4 #include <queue> 5 #include <vector> 6 #include <cstdio> 7 #include <cstdlib> 8 #include <cstri ...
分类:编程语言   时间:2020-02-20 00:06:01    阅读次数:67
求树的每个子树的重心
前言: 每个子树的重心(p)的定义:删去该点p后,以x为根的子树的所有联通块的大小均不超过 siz[x] / 2 根据这个重心的定义可以知道一棵子树的重心必定在他自己所在的重链中. 所以每次找到他的重儿子为根的子树的重心, 不符合的话就沿着重链往上走直至找到复合要求的重心. 模版题:http://c ...
分类:其他好文   时间:2020-02-19 20:42:25    阅读次数:81
毕业生面试题
十大经典排序算法https://www.runoob.com/w3cnote/ten-sorting-algorithm.htmlJava最新常见面试题 + 答案汇总https://blog.csdn.net/fangchao2011/article/details/89203535 11、输入一个 ...
分类:其他好文   时间:2020-02-19 16:51:54    阅读次数:219
1037 在霍格沃茨找零钱
水题。 #include<iostream> #include<algorithm> using namespace std; typedef long long LL; int main() { LL G1,S1,K1,G2,S2,K2; scanf("%lld.%lld.%lld %lld.%l ...
分类:其他好文   时间:2020-02-19 12:49:51    阅读次数:63
共11758条   上一页 1 ... 80 81 82 83 84 ... 1176 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!