题解
文章平均质量分 75
Fry_guest
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
UVA 7146 Defeat The Enemy 2014 ACM-ICPC Asia shanghai Regional Contest
7146 Defeat The Enemy Long 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 · 1510 阅读 · 0 评论 -
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 · 804 阅读 · 0 评论 -
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 · 1239 阅读 · 0 评论 -
Codeforces 698B Fix a Tree 并查集
题目链接:http://www.codeforces.com/problemset/problem/698/B 题意: 已知有向树的定义,除了根节点外每个节点都有且仅有一条边都指向它的父亲节点,而根节点有且仅有一条边指向自己。 现在输入一张图,每个节点都有一条边指向某个点,要求修改尽量少的边,将这张图变成一颗树。 分析; 最终形成的树中一定只有根节点指原创 2016-07-25 15:16:39 · 956 阅读 · 0 评论 -
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 · 958 阅读 · 0 评论 -
关于N维的切割问题
如果是二维的切割问题,一般答案是 a*n^2+bn+c 三维的切割问题,一般答案是a*n^3+bn^2+cn+d 然后用待定系数法求解就可以了。原创 2016-04-18 08:26:33 · 895 阅读 · 0 评论 -
2015 Multi-University Training 3 多校集训 第三场 部分题解及反思
昨天打完的第三场,相对而言发挥的还算正常,毕竟弱渣一只,不过有几道简单题都没看,如果放弃那道1010的DP的话还是可以多做两题的,DP依旧是硬伤。 最后做了5道题,勉强挤进第二页。如果能把速度提上去的话应该可以进第一页的。。DP题卡了2个小时不多说。不过赛后看官方题解说DFS就可以了,感觉有点崩溃。 部分题解: HDU 5316 Magician 题意: 给你一个长度原创 2015-07-29 11:10:24 · 815 阅读 · 0 评论 -
HDU 1079 Calendar Game
题目传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1079 Problem Description Adam and Eve enter this year’s ACM International Collegiate Programming Contest. Last night, they played the Calend原创 2015-07-25 15:57:58 · 763 阅读 · 0 评论 -
Codeforces Round #261 (Div. 2) D. Pashmak and Parmida's problem
题目传送门:http://codeforces.com/contest/459/problem/D D. Pashmak and Parmida's problem time limit per test 3 seconds memory limit per test 256 megabytes input standard input原创 2015-07-25 14:26:17 · 561 阅读 · 0 评论 -
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 · 727 阅读 · 0 评论 -
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 · 1629 阅读 · 0 评论 -
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 · 1100 阅读 · 0 评论 -
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 · 644 阅读 · 0 评论 -
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 · 851 阅读 · 0 评论 -
Codeforces Round #259 (Div. 2) E. Little Pony and Summer Sun Celebration
题目链接:http://codeforces.com/contest/454/problem/E Twilight 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 · 769 阅读 · 0 评论 -
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 · 755 阅读 · 1 评论 -
拓扑排序简单思路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 · 737 阅读 · 0 评论 -
Codeforces 596D 区间DP
题目链接: 题意: 有n棵树排成一排,高度都为h. 主人公要去砍树,每次等概率地随机选择没倒的树中最左边的树或者最右边的树把它砍倒.每棵树被砍到后,有p的概率会往左边倒,(1-p)的概率往右边倒. 树倒下后如果压到别的树,即如果那棵树倒下的方向上距离不到h的地方还有一棵树,,那么那棵树也会朝和这个树相同的方向倒下. 问最后所有的树都被砍完后覆盖的地面的长度的期望.原创 2015-11-19 00:12:35 · 1188 阅读 · 0 评论 -
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 · 1508 阅读 · 2 评论 -
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 · 1222 阅读 · 0 评论
分享