码迷,mamicode.com
首页 >  
搜索关键字:hdu 4883 bestcoder    ( 31308个结果
HDU 4565 So Easy!
线性推,矩阵乘法+快速幂求通项。 传送门:点击打开链接 #include #include #include #include using namespace std; #define LL long long struct Mat{ LL f[2][2]; }; LL MOD; Mat mul(Mat a,Mat b) { LL i,j,k; ...
分类:其他好文   时间:2014-05-15 14:53:10    阅读次数:225
HDU 4572 Bottles Arrangement
详细的证明:点击打开链接 我的想法: 要想保证题目所说 构造最小行的和,只能是这种情况 .....      m-3  m-2  m-1  m    |   m  m-1  m-2  m-3    . ....  所以Ans 也就是取前N项就可。 又因为 It is guaranteed that N is always odd。  显然构造没问题。 #include #in...
分类:其他好文   时间:2014-05-15 06:28:56    阅读次数:200
[ACM] hdu 1035 Robot Motion (模拟或DFS)
Robot Motion Problem Description A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The...
分类:其他好文   时间:2014-05-15 05:48:40    阅读次数:346
HDU 2222-Keywords Search-AC自动机模版题
纯粹的模版。。。 学习模版总会是一个快乐的过程。。。。 #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const int...
分类:其他好文   时间:2014-05-15 03:02:53    阅读次数:275
HDU 1561 The more ,The Better
HDU 1561 The more ,The Better...
分类:其他好文   时间:2014-05-15 02:57:01    阅读次数:182
HDU 4768 Flyer (二分)
OJ题目:click here~~ 题目分析:n个[a  b] 区间,对于i 属于[a  b]  ,从a开始,间隔c ,即i = a , i = a + c , i = a + 2*c …… 将x[ i ] 加1 ,x[ i ] 初值为0 。 已知最多只有一个x[ i ] 为奇数。找到这个i , 和这个奇数。 由于最多只有一个奇数,且奇数 + 偶数 = 奇数。用二分夹逼出这个奇数的位置。找到...
分类:其他好文   时间:2014-05-14 21:27:36    阅读次数:176
hdu 1224 Free DIY Tour(最长路/dp)
http://acm.hdu.edu.cn/showproblem.php?pid=1224 基础的求最长路以及记录路径。感觉dijstra不及spfa好用,wa了两次。 #include #include #include #include #include #include #include #include #define LL long long #define...
分类:其他好文   时间:2014-05-14 20:59:54    阅读次数:295
HDU 4039 The Social Network bfs
算了下复杂度好像是n^3 就感觉不大好做。结果n^31a。。。 #include #include #include #include #include #include #include #include using namespace std; #define eps 1e-9 #define PI acos(-1.0) #define N 1005 #define inf ...
分类:Web程序   时间:2014-05-14 20:11:42    阅读次数:309
hdu 3473 Minimum Sum(划分树-sum操作)
划分树。只是考虑求当前区间大于第k值的值得和,和小于第k值的和。显然可以在查询的时候直接搞出来。sum[d][i]表示第d层子区间l,r种l-i的和。写错了一个下标,检查了半辈子。。。 #include #include #include #include #include #include #include #include #include #include #define MP make_...
分类:其他好文   时间:2014-05-14 19:31:39    阅读次数:311
hdu 开门人和关门人
/* * hdu OpenDoorManAndCloseDoorMan * date 2014/5/13 * state AC */ #include #include #include #include using namespace std; struct DoorMan { char name[20]; int startH,startM,startS; ...
分类:其他好文   时间:2014-05-14 14:58:40    阅读次数:247
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!