
搜索
文章平均质量分 76
squee_spoon
这个作者很懒,什么都没留下…
展开
-
POJ 2286 The Rotation Game
The Rotation GameTime Limit: 15000MS Memory Limit: 150000KTotal Submissions: 4983 Accepted: 1655DescriptionThe rotation game uses a # shaped board, which can ho原创 2014-05-16 23:30:20 · 886 阅读 · 0 评论 -
zoj 3816 Generalized Palindromic Number
tiyi原创 2014-11-19 19:48:19 · 495 阅读 · 0 评论 -
hdu 5012 Dice
题意:有两原创 2014-11-20 15:06:37 · 558 阅读 · 0 评论 -
hdu 4801 Pocket Cube
题意:给出一个Pocket Cu原创 2014-11-20 22:35:29 · 660 阅读 · 0 评论 -
Codeforces Round #256 (Div. 2) C
C. Painting Fence 分治。每次有两种决策,要么全部竖着刷,要么横着刷刷满最低的栅栏(因为如果不刷满,还不如竖着刷)。如果横着刷,整个栅栏可能被切为若干部分,继续对每一部分这样求解。#include #include #include #include #include using namespace std;const i原创 2015-01-07 20:52:00 · 651 阅读 · 0 评论 -
hdu 1973 Prime Path
给两个4位素数(没有前导0)s和t,每次改变一位,改变后必须还是素数,问从s到t最少需要改变几次。 先把所有1000~9999中的素数找出来,然后BFS。#include#include #include#includeusing namespace std; int ans[10010];bool flag[10010];inline int _10pow原创 2015-04-22 14:16:49 · 671 阅读 · 0 评论 -
Codeforces Round #297 (Div. 2) D
Arthur and Walls 题目说的是有一个n*m的矩阵,元素是'.'或'*',要求把尽可能少的'*'变成'.',使得所有'.'的区域都是矩形。 想了好些方法,最后看了题解。。其实这题的关键是想到如果某个2*2的矩阵内有3个'.',那么剩下的那个'*'也应该变成'.'。想到这个以后,搜一下就可以了。#include #include #incl原创 2015-04-13 23:32:33 · 445 阅读 · 0 评论 -
Codeforces Round #297 (Div. 2) E
Anya and Cubes 这个数据范围,很明显的折半搜索,还是不难写的。分别从前往后和从后往前dfs。从前往后搜到中间,结果存在一个map里,从后往前搜到中间,查询map。#include using namespace std;#define ll long longint a[30];int n,k;ll S;int mid;map mp[原创 2015-04-14 16:01:32 · 483 阅读 · 0 评论 -
hihoCoder 1233 Boxes(2015 北京网赛 G)
Boxes 搜索。状态表示:第几大的box在第几个槽中,压成一个整数。最大情况n=7即压成一个7位7进制数。复杂度7^7,我用vectorTLE,换成数组就过了。#include using namespace std; #define ll long longint encode(int* arr,int size){ int res=0;原创 2015-09-22 21:32:55 · 673 阅读 · 0 评论 -
Codeforces Testing Round #10 C
C. One-Based Arithmetic题意:给一个数,原创 2014-10-16 20:03:41 · 517 阅读 · 0 评论 -
hdu 4771 Stealing Harry Potter's Precious
题意:N*M的di't原创 2014-10-28 21:26:05 · 391 阅读 · 0 评论 -
zoj 3814 Sawtooth Puzzle
题意:原创 2014-11-14 08:23:36 · 538 阅读 · 0 评论 -
HDU 1026 Ignatius and the Princess I
Ignatius and the Princess ITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11333 Accepted Submission(s): 3482Special JudgeProblem D原创 2014-05-19 19:48:54 · 743 阅读 · 0 评论 -
UVa10269 Adventure of Super Mario
题意:有A个村庄,B个城堡。超级马里奥和公主从原创 2014-07-17 16:41:58 · 539 阅读 · 0 评论 -
UVa658 - It's not a Bug, it's a Feature!
题意:发布的软件有n个bug,m个补丁。。原创 2014-06-09 19:20:38 · 611 阅读 · 0 评论 -
UVa10603 Fill
题意:你有3个杯子a,b,c原创 2014-09-05 10:37:53 · 555 阅读 · 0 评论 -
hdu5025 (2014广州网赛1004)Saving Tang Monk
题意:原创 2014-09-20 18:46:22 · 589 阅读 · 0 评论 -
hdu5040 (2014北京网赛1009) Instrusive
题意:类似走迷宫的题。。迷宫中有相机,bei'zhao'd原创 2014-09-21 21:11:42 · 726 阅读 · 0 评论 -
UVa816 Abbott's Revenge
题意:走迷宫,在某个点,对于mou'g原创 2014-09-03 13:25:57 · 1874 阅读 · 0 评论 -
poj1077 Eight
题意:经典的八数码问题,不废话了。 思路:BFS。原创 2014-09-04 22:04:08 · 499 阅读 · 0 评论 -
hdoj 5637 Transform
题目转化一下,可以理解为用n个数异或,和修改位,去凑出s异或t的值。我们可以先用dfs计算n个数互相异或能得到哪些数,并且最少需要其中的多少个数来异或(也就是需要多少次操作),然后推出范围内的数通过异或和反转位,最少需要多少步。不过更科学的方法应该是用bfs求这些最短距离(最少操作次数)。对于询问O(1)查表回答即可。#include #include #include原创 2016-03-06 15:43:15 · 342 阅读 · 0 评论