自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Fry_guest的专栏

话多的人要吞一千根针

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

原创 Codeforces Intel Code Challenge Elimination Round (Div.1 + Div.2, combined) 部分题解

昨晚打的CF,DIV1+2,一直都说混合场比较容易加分。这场算是hack场了,全程看手速以及hack别人的能力了。当然顶尖的大牛们还是能AK顺便hack十几个人的。尝试了一下在自己的电脑上用ubuntu做题,前面都还好啦,最后hack阶段的时候发现flash没有安装完善,还是切回到windows下继续的。Codeforces 722A Broken Cloc

2016-10-02 13:02:54 641

原创 GVIM 配置 For ubuntu

最近用虚拟机安装了ubuntu感觉相比起windows而言 linux的系统更适合写代码的样子基础配置,和区域赛时候的配置相同。set sw=4 ts=4 nobk ai cin nusyn onset mp=g++\ %\ -O2\ -s\ -o\ %map  :w :makemap  :! ./%colorscheme evening

2016-09-24 20:32:55 526

原创 Codeforces Round #368 (DIV 2)

昨晚的9点的CF,DIV2专场,为了rating change开了小号去。说起来上一场也是DIV2专场开的小号去参加,然后第一个小号就上1900了,昨晚打完之后第二个小号也上DIV1了。蛮开心的。最近这段时间在家里大概是参加不了12点半的CF了。毕竟补充睡眠。部分题解:Codeforces 707A Brain's Photos题目链接:http://www.c

2016-08-21 08:23:53 1062

原创 Codeforces 698B Fix a Tree 并查集

题目链接:http://www.codeforces.com/problemset/problem/698/B题意:    已知有向树的定义,除了根节点外每个节点都有且仅有一条边都指向它的父亲节点,而根节点有且仅有一条边指向自己。    现在输入一张图,每个节点都有一条边指向某个点,要求修改尽量少的边,将这张图变成一颗树。分析;    最终形成的树中一定只有根节点指

2016-07-25 15:16:39 812

原创 Codeforces Round #359 (Div. 2) 部分题解

之前两场连续的崩盘让分数又回到了DIV2底层,挺难过的。昨晚发挥的还不错,继续加油吧。Codeforces 686A Free Ice Cream题目链接:http://www.codeforces.com/problemset/problem/686/A题意:N个人在排队,一开始店主有M个冰淇凌,队伍中第i个人可能是一个送冰激凌的工人,他会带给店主A[i]个冰淇凌

2016-06-24 21:45:42 837

原创 Gvim配置

set sw=4 ts=4 nobk ai cin nusyn onset mp=g++\ %\ -O2\ -s\ -o\ %<map :w :makemap :!%colo eveningset guifont=黑体:h14:b:cGB2312set backspace=indent,eol,start:cd D:\Fry\PresentSolveinoremap :c

2016-05-25 22:19:56 487

原创 关于N维的切割问题

如果是二维的切割问题,一般答案是 a*n^2+bn+c三维的切割问题,一般答案是a*n^3+bn^2+cn+d然后用待定系数法求解就可以了。

2016-04-18 08:26:33 751

原创 2016.4.17 南京理工大学校赛

题目传送门: https://icpc.njust.edu.cn/Contest/749/A偷吃糖果 题意:给你两个字符串,将其中的连续的相同的字符串都缩成一个,问操作完毕后这两个字符串是否相等。分析:简单题,暴力上吧。#include using namespace std;const int N=1005;char s1[N],s2[N];char an

2016-04-17 20:01:26 1484

原创 Codeforces Round #334 (Div. 1)

自从CF的rating改版以后终于回到DIV1了。打了一场还比预期好,如果C题不错的话应该可以继续上分,可惜了。Codeforces 603A. Alternative Thinking题目链接:http://codeforces.com/problemset/problem/603/A题意:给你一个01串,要你选择其中一个非空的01子串,将其反转(0变成1,1变成0),要

2015-12-02 23:47:29 1089

原创 Codeforces Round #333 (Div. 2)

应该是学ACM以来打的最好的一场了.CF的rating改版以来第一次上DIV1.加油.Codeforces 602A Two Bases题目链接:http://codeforces.com/problemset/problem/602/A题意:给你两个进制不同的数字,要求比较大小.分析:直接把两个数用十进制求出来就好了.需要注意的是不要使用pow函数,pow的返

2015-11-25 18:25:30 1289 2

原创 Codeforces 596D 区间DP

题目链接:题意:  有n棵树排成一排,高度都为h.  主人公要去砍树,每次等概率地随机选择没倒的树中最左边的树或者最右边的树把它砍倒.每棵树被砍到后,有p的概率会往左边倒,(1-p)的概率往右边倒.  树倒下后如果压到别的树,即如果那棵树倒下的方向上距离不到h的地方还有一棵树,,那么那棵树也会朝和这个树相同的方向倒下.  问最后所有的树都被砍完后覆盖的地面的长度的期望.

2015-11-19 00:12:35 1019

原创 Codeforces Round #331 (Div. 2)

昨晚比的CF,结束的时候RANK差不多100左右,本来想着可以上DIV1了的,今天早上起来一看还掉了10分,A题跪了,无颜面对江东父老.还是思维不够缜密以及..实力不够.继续加油,Codeforces 596A题目链接: http://codeforces.com/problemset/problem/596/A题意:已知一个长宽都平行于坐标系的矩形,它的一些顶点被

2015-11-16 20:42:18 572

原创 拓扑排序简单思路O(n^2)附HDU 5154 Harry and Magical Computer

拓扑排序简单思路首先读入整个图,扫描所有的点,找到一个入度为0的点,这就是一个可以放在拓扑序列首部的点,然后这个点的所有的直接的后继的入度-1.反复操作直到所有的点都进入了拓扑序列。附HDU 5154AC 代码#include using namespace std;int a[105][105];int num[105];int main(){ int n,m;

2015-11-15 16:03:06 638

转载 博弈-Green Hackenbush(无向图删边)

转自:http://blog.sina.com.cn/s/blog_8f06da990101252l.htmlGreen Hackenbush     Hackenbush游戏是通过移除一个有根图的某些边,直到没有与地板的相连的边。地板用虚线来表示,其中移除某一条边的时候,那条边以上所连着的所有边都会移除,就像砍树枝那样,树枝以上的部分也会被移除。     在这节中,我们讨

2015-08-17 11:32:17 730

原创 2015 Multi-University Training 3 多校集训 第三场 部分题解及反思

昨天打完的第三场,相对而言发挥的还算正常,毕竟弱渣一只,不过有几道简单题都没看,如果放弃那道1010的DP的话还是可以多做两题的,DP依旧是硬伤。最后做了5道题,勉强挤进第二页。如果能把速度提上去的话应该可以进第一页的。。DP题卡了2个小时不多说。不过赛后看官方题解说DFS就可以了,感觉有点崩溃。部分题解:HDU 5316 Magician题意:给你一个长度

2015-07-29 11:10:24 716

原创 HDU 1079 Calendar Game

题目传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1079Problem DescriptionAdam and Eve enter this year’s ACM International Collegiate Programming Contest. Last night, they played the Calend

2015-07-25 15:57:58 640

原创 Codeforces Round #261 (Div. 2) D. Pashmak and Parmida's problem

题目传送门:http://codeforces.com/contest/459/problem/DD. Pashmak and Parmida's problemtime limit per test3 secondsmemory limit per test256 megabytesinputstandard input

2015-07-25 14:26:17 469

原创 Codeforces Round #260 (Div. 2) E. Civilization

题目传送门:点击打开链接Andrew plays a game called "Civilization". Dima helps him.The game has n cities and m bidirectional roads. The cities are numbered from 1 to n. Between any pair of cities t

2015-07-25 11:19:27 591

原创 UVA 7146 Defeat The Enemy 2014 ACM-ICPC Asia shanghai Regional Contest

7146 Defeat The EnemyLong long ago there is a strong tribe living on the earth. They always have wars and eonquer others. One day, there is another tribe become their target. The strong tribe has de

2015-07-16 17:22:51 1392

原创 UVA 6859 Points

Peter and Bob are playing a “Points” game on a math sheet of paper. Peter places a few points on the paper — grid nodes. Bob wants to surround them with a polygon so that all marked nodes are lying st

2015-07-14 20:49:08 964

原创 Codeforces Round #260 (Div. 2) D. A Lot of Games

题目链接 :http://codeforces.com/contest/456/problem/D题目大意:已经给定了一组字符串(字典),然后两个人玩游戏。两个人轮流操作一个字符串,一开始字符串为空,每次一个人向这个字符串末尾添加一个字母,要求添加完毕后这个字符串必须是字典中的某个字符串的前缀,不能操作者为输。这样子视作一次游戏,一共进行K次相同的游戏,第I次游戏的失败方为第I+1次游

2015-07-13 13:07:35 519

原创 UVALive 6953 Digi Comp II

The Digi Comp II is a machine where balls enter from the top and find their way to the bottom via a cer- tain circuit defined by switches. Whenever a ball falls on a switch it either goes to the left

2015-07-13 09:44:40 715

原创 Codeforces Round #259 (Div. 2) E. Little Pony and Summer Sun Celebration

题目链接:http://codeforces.com/contest/454/problem/ETwilight Sparkle learnt that the evil Nightmare Moon would return during the upcoming Summer Sun Celebration after one thousand years of imprisonmen

2015-07-12 15:02:48 612

原创 Codeforces Round #262 (Div. 2) C Present

Little beaver is a beginner programmer, so informatics is his favorite subject. Soon his informatics teacher is going to have a birthday and the beaver has decided to prepare a present for her. He pla

2015-07-12 12:40:58 606 1

转载 博弈论

转载请注明出处,谢谢http://blog.csdn.net/ACM_cxlove?viewmode=contents    by---cxlove首先当然要献上一些非常好的学习资料:基础博弈的小结:http://blog.csdn.net/acm_cxlove/article/details/7854530经典翻硬币游戏小结:http://blog.csd

2015-01-21 15:49:22 726

空空如也

空空如也

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

TA关注的人

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