码迷,mamicode.com
首页 >  
搜索关键字:hdu 2435    ( 30933个结果
容斥原理
容斥原理 概念:简单而言就是求n个集合的并集的方法,求法是将每一项的概率相加再减去重复的部分,在这减去重复的过程中为了防止出现重复减的问题,要用到容斥原理 在范围内有多少数与给定的数互质 思路:假设范围为(a,b),给定数字为n,首先记下数字范围内数字个数(b-a+1)减去不n互质的数的个数结果就是 ...
分类:其他好文   时间:2020-12-28 11:21:25    阅读次数:0
HDU 1312 Red and Black
水题~ const int N=25; char g[N][N]; bool vis[N][N]; int n,m; PII st; bool check(int x,int y) { return x>=0 && x<n && y>=0 && y<m; } int bfs() { queue<PI ...
分类:其他好文   时间:2020-12-24 12:06:48    阅读次数:0
Transformation HDU - 4578
简单线段树操作 咕咕咕 Transformation HDU - 4578 vj talk is cheap, chow the code. #include <iostream> #include <cstring> using namespace std; typedef long long l ...
分类:其他好文   时间:2020-12-23 12:30:38    阅读次数:0
HDU-4370 0 or 1
Problem Description Given a nn matrix Cij (1<=i,j<=n),We want to find a nn matrix Xij (1<=i,j<=n),which is 0 or 1. Besides,Xij meets the following con ...
分类:其他好文   时间:2020-12-21 12:00:49    阅读次数:0
HDU 2594 Simpsons’ Hidden Talents KMP
#include<iostream> #include<string> using namespace std; void getNext(string s, int *nex) { nex[0] = -1; int i = 0, j = -1; int len = s.length(); whil ...
分类:其他好文   时间:2020-12-01 12:22:41    阅读次数:7
HDU - 4969(积分)
//将圆弧看成一段段的直线段,每个单元时间为dt //每一段路径长为 v1dt 和 v2dt //对于v2来说,存在径向速度vx(向外) 和 切向速度vy(绕圆) (vx^2 + vy^2 = v2^2) //又v1/R = w(角速度)= vy/r (r是运动过程中离圆心的距离)r属于[0, R] ...
分类:其他好文   时间:2020-11-20 11:47:20    阅读次数:4
hdu 6868
题意 $T$组数据$(n,m)$ 令$f(n)=\sum\limits_{d|n}|\mu(d)|$ 求$\sum\limits_^m f(ni)$ \(T\le 10^4,n,m\le 10^7\) 做法 显然$f(n)$是积性函数 则$f(ni)=\frac{f(n)f(i)}{f((n,i)) ...
分类:其他好文   时间:2020-11-11 16:07:42    阅读次数:5
HDU 1010 搜索 奇偶剪枝
#include<iostream> #include<cstring> #include<cmath> using namespace std; char map[8][8]; int n, m, t; int dir[4][2]={{1,0},{-1,0},{0,1},{0,-1}}; bool ...
分类:其他好文   时间:2020-11-08 17:14:10    阅读次数:17
ACM_HDU_2045_不容易系列之(3)—— LELE的RPG难题
Problem Description 人称“AC女之杀手”的超级偶像LELE最近忽然玩起了深沉,这可急坏了众多“Cole”(LELE的粉丝,即"可乐"),经过多方打探,某资深Cole终于知道了原因,原来,LELE最近研究起了著名的RPG难题: 有排成一行的n个方格,用红(Red)、粉(Pink)、 ...
分类:其他好文   时间:2020-10-26 11:29:27    阅读次数:26
hdu6230(求限制条件的回文个数,利用manacher+BIT求解)
题:http://acm.hdu.edu.cn/showproblem.php?pid=6230 题意:求一个字符串中(长度<=5e5)中指定字符串个数; 指定字符串约束为:类似俩个回文串“镶嵌”,设有俩个回文串的回文中心位置分别为x和y(x<y),前者的回文半径涵盖的范围必须包含y ,同时后者的回 ...
分类:其他好文   时间:2020-10-21 20:33:08    阅读次数:23
30933条   上一页 1 2 3 4 5 6 ... 3094 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!