- 博客(29)
- 资源 (23)
- 收藏
- 关注
原创 Codeforces Round #340 (Div. 2) (618A,618B,618C)
Slime Combining题目链接:http://codeforces.com/problemset/problem/618/A解题思路:We can simulate the process described in the problem statement. There are many possible implementations of this, so s
2016-01-30 16:45:27 568
原创 Codeforces Round #340 (Div. 2) (617A,617B,617C,617D(Constructive ),617E(莫队算法))
比赛的时候由于入了一道题的坑,而且一直没爬出来。。。Elephant题目连接:http://codeforces.com/contest/617/problem/A解题思路:It's optimal to do the biggest possible step everytime. So elephant should do several steps by distan
2016-01-27 17:27:19 856
原创 BestCoder Round #69 (div.2)(hdu5610,hdu5611,hdu5612(动态规划))
Baby Ming and Weight lifting题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5610解题思路:杠铃是成双出现的,然后只要枚举就可以了。中文题目:问题描述铭宝宝喜欢举重运动,他有一个杠铃杆(重量忽略),和22种类型的杠铃片(重量分别为aa和bb),每种杠铃片都有无限个。铭宝宝打算用这2
2016-01-27 15:27:19 439
原创 hdu 5612 Baby Ming and Matrix games
做了这题之后,我才算时真正明白前几天做hdu1175根本不能有BFS,什么扩展顺序,那都是自己骗自己而已。因为用dfs的话,没搜索,一个点,就可以及时标记vis[i][j] = 1,如果这个点不是所需要的点时,就可以及时vis[i][j] = 0。清楚这个后,自己对这类题,终于有所理解了。题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=
2016-01-27 14:55:53 387
原创 Windows MySQL(zip版本),启动不了,因为缺少data文件。(双系统修复三)
不知道为什么最近几个版本的mysql(zip)都没有data文件,弄得我吃了不少骨头,还不晓得是哪里出了问题。解决方案:第一步:mysql-5.7.10X默认的配置文件是在C:\Program Files\MySQL\MySQL Server 5.6\my-default.ini,或者自己建立一个my.ini文件,在其中修改或添加配置: [mysqld] basedir=C
2016-01-27 10:00:07 1341
原创 MySQL 服务正在启动。MSQL服务无法启动。服务没有报告任何错误。请键入NET HELPMSG 3534 以获得更多的帮助。(双系统修复二)
因为我以前下过mysql,所以这次懒得在官网重新下载,因此碰到了不少的麻烦。1.通过DOS窗口输入net start mysql时,却提示服务名无效解决方案:(1)首先我们先进入mysql的安装目录下的bin目录(2)之后打开DOS命令窗口(一定要管理员身份打开,不然会报错),进入该目录下(一定要进入该目录,否则操作错误)。(3)输入命令:mysqld --install。
2016-01-26 21:08:10 20475 8
原创 Ubuntu 14.04 引导修复(Boot Repair)(双系统修复一)
这几天不是我闲着没事做,实在是电脑故意跟我过不去,一不小心,Windows就再也无法打开了,然后的然后,你们都知道就是重装系统喽。但是重装系统后,会发现原来的Ubuntu引导不见了,开机直接进入Windows界面,弱前几天刚刚把Ubuntu重装一遍,所以不想再装了,于是上网找了一些很好用的办法。顺便把以前装ubuntu后,Windows引导修复的问题也一块解决了。第一步:还是需要进入Ubu
2016-01-26 20:54:45 61041 8
原创 自己选择的路,跪着也要把它走完
1、把艰辛的劳作看作是生命的必然,即使没有收获的希望也心平气和的继续。2、成功不是将来才有的,而是从决定去做的那一刻起,持续累积而成。3、付出不一定有收获,努力了就值得了。4、每一次选择都必须是一次超越,否则就不要选择;每一次放弃都必须是一次升华,否则就不要放弃。做人最大的乐趣在于通过奋斗去实现理想,所以选择放弃意味着我们还要更加完美,有缺点意味着我们还要更加努力。放弃是一
2016-01-23 10:13:41 1313
原创 hdu 1175 连连看
AC代码:#include #include #include #include using namespace std;const int dx[] = {-1,0,1,0},dy[] = {0,1,0,-1};//醉了,醉了,居然败给扩展顺序上了//原来的const int dx[] = {-1,0,1,0},dy[] = {0,-1,0,1};/*3 41 1 0
2016-01-22 21:09:51 370
原创 hdu 1242 Rescue
AC代码:#include #include #include #include using namespace std;struct node{ int x,y; int t; bool operator < (const node &a)const{ return t > a.t; }};const int dx[] = {
2016-01-22 19:59:52 367
原创 hdu 1728 逃离迷宫
AC代码:#include#includeusing namespace std;struct node{ char ch; int turn; int dir;}maze[110][110];const int dx[] = {0,1,-1,0},dy[] = {1,0,0,-1};int m,n,t;int start_x,start_y;vo
2016-01-22 19:28:59 352
原创 hdu 1698 Just a Hook
AC代码:#include #include using namespace std;const int N = 100005;struct node{ int l,r; int setv,sum;}tree[N<<2];void pushup(int id){ tree[id].sum = tree[id<<1].sum+tree[(id<<1)|1
2016-01-21 22:34:45 235
原创 POJ 2528 Mayor's posters
AC代码:#include #include #include #include using namespace std;const int N = 20005;//不晓得为什么写成100005就过不了struct node{ int l,r; int c;}tree[N<<2];int l[N],r[N];int record[N];int ans;
2016-01-21 22:33:44 257
原创 POJ 3468 A Simple Problem with Integers
AC代码:#include #include using namespace std;typedef long long ll;const int N = 100005;struct node{ int l,r; ll add,sum;}tree[N<<2];ll a[N];void pushup(int id){ tree[id].sum = t
2016-01-21 22:11:46 210
原创 hdu 1754 I Hate It
AC代码:#include #include #include using namespace std;const int N = 200005;struct node{ int l,r,maxn;}tree[N<<2];int a[N];void build(int m,int l,int r){ tree[m].l = l; tree[m].r
2016-01-21 22:10:44 208
原创 hdu 1166 敌兵布阵
AC代码:#include #include using namespace std;const int N = 50005;struct node{ int l,r,sum;}tree[N<<2];int a[N];void build(int m,int l,int r){ tree[m].l = l; tree[m].r = r; if
2016-01-21 22:09:02 199
原创 ZOJ 3209 Treasure Map(Dancing Links)(精确覆盖问题)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3209解题思路:题目大意:给你一个n*m的矩形,有p个小矩形,问你用这些小矩形(不允许重复)最多可以拼多少个n*m的矩形。算法思想:Dancing Links.把每个格子当成一个列,然后覆盖所有格子。问题就转为了:精确覆盖问题。
2016-01-18 17:41:11 466
原创 HUST 1017 Exact cover(Dancing Links)(精确覆盖问题)
题目链接:http://acm.hust.edu.cn/problem/show/1017解题思路:题目大意:本题就是给你一个由0,1元素组成的矩阵,问取出哪几行,可以使这几行构成的新矩阵,每列只有一个1.算法思想:Dancing Links模板题。如果有人还不了解双向链表的人可以先看一下这位大牛的博客:http://blog.sina.com.cn/s/blo
2016-01-18 17:31:58 676
原创 hdu1241 Oil Deposits
AC代码:#include #include #include #include #include using namespace std;const int dx[] = {-1,-1,-1,0,1,1,1,0},dy[] = {1,0,-1,-1,-1,0,1,1};char oil[105][105];int vis[105][105];int n,m;void
2016-01-17 23:32:58 235
原创 POJ 3984 迷宫问题(bfs+打印路径)
AC代码:#include #include #include #include #include using namespace std;struct node{ int x,y; int t; bool operator < (const node &a)const{ return t > a.t; }}pa[10][10];
2016-01-17 23:31:35 333
原创 UVA11624 Fire!
AC代码:#include #include #include #include #include using namespace std;struct node{ int x,y; int t; bool operator < (const node &a)const{ return t > a.t; }};const int
2016-01-17 23:30:21 295
原创 FZU2150 Fire Game
AC代码:#include #include #include #include #include #include #include #define INF 0x3f3f3f3fusing namespace std;struct node{ int x,y,t; //用优先队列一直超时};const int dx[] = {-1,0,1,0},dy[
2016-01-17 23:29:13 235
原创 POJ3414 Pots
AC代码:#include #include #include #include #include using namespace std;struct node{ int a,b,t; bool operator < (const node &tmp)const{ return t > tmp.t; }};struct path{
2016-01-17 23:27:58 217
原创 POJ3087 Shuffle'm Up
AC代码:#include #include #include #include #include #include #include using namespace std;map ma;string s1,s2,s3;int c;int solve(){ ma.clear(); string str; int cnt = 0; wh
2016-01-17 22:12:40 221
原创 POJ 3126 Prime Path(搜索)
AC代码:#include #include #include #include #include #include using namespace std;struct node{ int pos,t; bool operator < (const node &a)const{ return t > a.t; }};int prim
2016-01-17 22:11:38 243
原创 POJ1426
AC代码:#include #include #include #include #include using namespace std;struct node{ int mod; string ans;}no[205];int vis[205];void bfs(int i){ memset(vis,0,sizeof(vis)); vi
2016-01-17 22:10:31 244
原创 POJ3278 Catch That Cow
AC代码:#include #include #include #include using namespace std;const int MAXN = 100000;struct node{ int pos,t; bool operator < (const node &a)const{ return t > a.t; }};int
2016-01-16 23:40:22 215
原创 POJ2251 Dungeon Master
AC代码:#include #include #include #include using namespace std;struct node{ int l,r,c; int t; bool operator < (const node &a)const{ return t > a.t; }};const int dl[]
2016-01-16 23:39:05 225
原创 2015年度总结
前言:其实本不想写这个总结(2015年度总结),因为回忆往事难免会有所伤感,而且自己的文笔也不是很好(不喜勿喷),所以迟迟未动笔写。但是这几日想了想,1.为大四做个铺垫,想更好的努力学习;2.为了自己即将逝去的青春。还是讲述一些我这一年干的一些破事吧。一月份: 大二上的考试周。考试周基本算是大学生最头疼的一件事吧!正是“一花一世界,一叶一菩提。一天一本书,一周一学期。”
2016-01-10 22:21:06 656 3
程序员面试宝典 第5版
2018-09-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人