自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

chutzpah

生活只是一种选择,但一定要有自己的梦想

  • 博客(19)
  • 收藏
  • 关注

原创 [HDU] 1565 方格取数(1) [插头dp]

Problem Description 给你一个n*n的格子的棋盘,每个格子里面有一个非负数。 从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2个格子不能相邻,并且取出的数的和最大。Input 包括多个测试实例,每个测试实例包括一个整数n 和n*n个非负数(n<=20)Output 对于每个测试实例,输出可能取得的最大的和Sample Input 3 75

2017-08-27 15:51:06 293

原创 [POJ] 2411 Mondriaan's Dream [轮廓线dp]

Mondriaan’s Dream Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 17605 Accepted: 10105 DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. O

2017-08-26 20:14:23 410

原创 [ZOJ] 4257 Most Powerful [状压DP]

Recently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of these atoms collide, one of them disappears and a lot of power i

2017-08-26 14:54:19 326

原创 [HDU] 3001 Travelling [状压DP]

Problem Description After coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on seeing all the cities!And he does not m

2017-08-26 13:49:36 281

原创 河南省多校连萌(四)

https://acm.zzuli.edu.cn/zzuliacm/contest.php?cid=1242

2017-08-18 19:41:20 607

原创 [POJ] 3311 Hie with the Pie [spfa + 状压]

Hie with the Pie Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 8061 Accepted: 4382 DescriptionThe Pizazz Pizzeria prides itself in delivering pizzas to its customers as fast as

2017-08-18 10:26:35 274

原创 [POJ]1185 炮兵阵地 [状压dp]

Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用”H” 表示),也可能是平原(用”P”表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示: 如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的网格表示它能够攻击到的

2017-08-15 11:57:01 234

原创 [POJ]3254 Corn Fields [状压dp]

Corn Fields Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 16318 Accepted: 8615 DescriptionFarmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M

2017-08-14 22:31:18 242

原创 codeforces.com/contest/839/

http://codeforces.com/contest/839/Codeforces Round #428 (Div. 2) 部分题解

2017-08-14 10:38:16 439 1

原创 [HDU] 6061 RXD and functions [NTT]

URL: http://acm.split.hdu.edu.cn/showproblem.php?pid=6061 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 702 Accepted Submission(s):

2017-08-07 22:40:28 588

原创 [51NOD] 1028 大数乘法 V2 [NTT]

给出2个大整数A,B,计算A*B的结果。 Input 第1行:大数A 第2行:大数B (A,B的长度 <= 100000,A,B >= 0) Output 输出A * B Input示例 123456 234567 Output示例 28958703552这是NTT或FFT的模板题 值得参考的NTT资料 http://blog.csdn.net/acdreamers/ar

2017-08-07 20:12:53 521

原创 [HDU]1402 A * B Problem Plus [FFT]

Problem Description Calculate A * B.Input Each line will contain two integers A and B. Process to end of file.Note: the length of each integer will not exceed 50000.Output For each case, output A *

2017-08-07 13:05:17 331

原创 [HDU]6069 Counting Divisors

URL : http://acm.hdu.edu.cn/showproblem.php?pid=6069求: (∑i=lrd(ik))mod998244353\begin{eqnarray*} \left(\sum_{i=l}^r d(i^k)\right)\bmod 998244353 \end{eqnarray*} l,r,k(1≤l≤r≤1012,r−l≤106,1≤k≤107)l,r,k

2017-08-03 17:44:06 1691 14

原创 [HDU]6059 Kanade's trio

URL : http://acm.hdu.edu.cn/showproblem.php?pid=6059题意Give you an array A[1..n],you need to calculate how many tuples (i,j,k) satisfy that (i< j< k) and ((A[i] xor A[j])<(A[j] xor A[k]))题解看了别人题解大半天,才终于

2017-08-03 11:58:36 498

原创 [HDU]6058 Kanade's sum

Give you an array A[1..n]of length n. Let f(l,r,k) be the k-th largest element of A[l..r].Specially , f(l,r,k)=0 if r−l+1< k.Give you k , you need to calculate ∑nl=1∑nr=lf(l,r,k)\sum_{l=1}^{n}\sum_{r=l

2017-08-02 15:07:02 330

原创 [BZOJ]3944: Sum

DescriptionInput一共T+1行 第1行为数据组数T(T<=10) 第2~T+1行每行一个非负整数N,代表一组询问Output一共T行,每行两个用空格分隔的数ans1,ans2Sample Input6 1 2 8 13 30 2333Sample Output1 1 2 0 22 -2 58 -3 278 -3 1655470 2题解#include<stdi

2017-08-02 11:15:34 267

原创 [51NOD]1239 欧拉函数之和

欧拉函数之和基准时间限制:3 秒 空间限制:131072 KB 分值: 320 难度:7级算法题 http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1239对正整数n,欧拉函数是小于或等于n的数中与n互质的数的数目。此函数以其首名研究者欧拉命名,它又称为Euler’s totient function、φ函数、欧拉商数等。

2017-08-02 10:27:47 403

原创 [51NOD]1244 莫比乌斯函数之和

莫比乌斯函数之和基准时间限制:3 秒 空间限制:131072 KB 分值: 320 难度:7级算法题 http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1244莫比乌斯函数,由德国数学家和天文学家莫比乌斯提出。梅滕斯(Mertens)首先使用μ(n)(miu(n))作为莫比乌斯函数的记号。具体定义如下: 如果一个数包含平方

2017-08-02 08:49:03 335

原创 [HDU]-6060 RXD and dividing

RXD has a tree T, with the size of n. Each edge has a cost. Define f(S) as the the cost of the minimal Steiner Tree of the set S on tree T. he wants to divide 2,3,4,5,6,…n into k parts S1,S2,S3,…Sk,

2017-08-01 20:54:57 314

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除