自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(26)
  • 收藏
  • 关注

原创 HDU2665 主席树入门

Description You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able to

2016-10-31 17:15:19 407

原创 HDU3333 离线离散化树状数组

Description After inventing Turing Tree, 3xian always felt boring when solving problems about intervals, because Turing Tree could easily have the solution. As well, wily 3xian made lots of new proble

2016-10-28 21:11:09 380

原创 lightoj 1080

#include<iostream>#include<memory.h>#include<algorithm>#include<cstdio>#include<string>using namespace std;int lowbit(int x) { return x&-x;}int d[100001];int c[100001];int n, m;int gs(i

2016-10-28 21:08:49 363

原创 lightoj 1085 树状数组+dp

Description Given a binary number, we are about to do some operations on the number. Two types of operations can be here.‘I i j’ which means invert the bit from i to j (inclusive) ‘Q i’ answer

2016-10-22 23:56:25 342

原创 HDU3652 常规数位dp入门

Problem Description A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string “13” and can be divided by 13. For example, 130 and 2613 are wqb-numbers,

2016-10-20 21:31:16 368

原创 HDU3555 常规数位dp入门....

Problem Description The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the current

2016-10-20 12:58:56 396

原创 CodeFoeces732C 枚举

C. Sanatorium time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Vasiliy spent his vacation in a sanatorium, came back and found that he compl

2016-10-18 20:26:37 701

原创 CodeForces731C 并查集

C. Socks time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Arseniy is already grown-up and independent. His mother decided to leave him alon

2016-10-18 00:43:37 492

原创 HDU1045 水dfs....数据量太小了才16.....

#include<iostream>#include<string>#include<memory.h>#include<algorithm>using namespace std;int n;string tut[5];int biaoji[5][5];int inf=0x3f3f3f3f;int dfs(int x,int y){ for(int s=x+1;s<n;

2016-10-16 16:15:38 708

原创 HDU5045 状压dp

Problem Description In the ACM International Collegiate Programming Contest, each team consist of three students. And the teams are given 5 hours to solve between 8 and 12 programming problems. On Mar

2016-10-16 11:09:43 226

原创 HDU5025 状压+BFS

Description 《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese literature. It was written by Wu Cheng’en during the Ming Dynasty. In this novel, Monkey King Sun

2016-10-14 13:39:27 602

原创 HDU5038 讲道理在一大堆题里真的找不到会的东西的时候就连模拟我也能下的去手..

#include<iostream>#include<queue>#include<algorithm>#include<cstdio>#include<memory.h>#include<string>using namespace std;int tu[100000];int main(){ int T; cin >> T; int u = 0;

2016-10-14 00:48:30 325

原创 HDU5037 贪心

Problem DescriptionOnce upon a time, there is a little frog called Matt. One day, he came to a river.The river could be considered as an axis.Matt is standing on the left bank now (at position 0). He w

2016-10-14 00:30:46 363

原创 HDU5024

Problem Description 《Dream of the Red Chamber》(also 《The Story of the Stone》) is one of the Four Great Classical Novels of Chinese literature, and it is commonly regarded as the best one. This novel w

2016-10-13 11:02:35 346

原创 HDU1575 矩阵快速幂入门

Problem Description A为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。Input 数据的第一行是一个T,表示有T组数据。 每组数据的第一行有n(2 <= n <= 10)和k(2 <= k < 10^9)两个数据。接下来有n行,每行有n个数据,每个数据的范围是[0,9],表示方阵A的内容。Output 对应每组数据,输出Tr(A

2016-10-12 14:45:49 308

原创 HDU5011 尼姆博奕模板水

昨天看完想起来时尼姆博弈… 但是差点忘了怎么求… 记一下 没事看看别忘了#include<iostream>#include<cmath>#include<algorithm>#include<cstdio>#include<queue>#include<stack>#include<string>#include<vector>using namespace std;int

2016-10-12 10:53:22 296

原创 HDU5012 bfs

There are 2 special dices on the table. On each face of the dice, a distinct number was written. Consider a1.a2,a3,a4,a5,a6 to be numbers written on top face, bottom face, left face, right face, front

2016-10-12 10:50:59 302

原创 lightoj 1023 水dfs

在m<0的时候就不要了… 多复制粘贴几次 总有一波好使的#include<iostream>#include<algorithm>#include<cstdio>#include<memory.h>using namespace std;int n, m;int biaoji[270];int jilu[300];int qw[27];void dfs(int zuobiao,

2016-10-11 16:06:54 339

原创 lightoj 1021 从当前转移到其他状态的状压dp

As you know that sometimes base conversion is a painful task. But still there are interesting facts in bases.For convenience let’s assume that we are dealing with the bases from 2 to 16. The valid symb

2016-10-11 14:18:02 299

原创 HDU5000 区间dp

Description After eating food from Chernobyl, DRD got a super power: he could clone himself right now! He used this power for several times. He found out that this power was not as perfect as he wante

2016-10-11 12:49:57 288

原创 lightoj1022

#include<iostream>#include<cstdio>#include<cmath>#include<memory.h>#include<algorithm>using namespace std;int main(){ int T; cin >> T; int u = 0; while (T--) { double

2016-10-09 17:09:16 219

原创 HDU2089 数位dp入门

Problem Description杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。 不吉利的数字为所有含有4或62的号码。例如: 62315 73418 88914 都属于不吉利号码。但是,61152虽然含有6和2,但

2016-10-09 14:45:00 244

原创 HDU1166 用树状数组重做以前线段树做的单点更新

Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。 中央

2016-10-06 20:39:19 284

原创 HDU5869 树状数组

Problem DescriptionThis is a simple problem. The teacher gives Bob a list of problems about GCD (Greatest Common Divisor). After studying some of them, Bob thinks that GCD is so interesting. One day, h

2016-10-06 01:32:37 425

原创 ural 1297 康神无敌马拉车

#include<stdio.h>#include<iostream>#include<string>#include<cstdio>#include<algorithm>#include<cmath>using namespace std;char qdu[100005];struct p{ int zuo, you;};p manachar(){ int

2016-10-04 20:47:54 447

原创 HDU1689 区间更新线段树

Description In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same length.

2016-10-03 00:20:06 366

空空如也

空空如也

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

TA关注的人

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