上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要: 题目大意就是倒水问题。 指定了一个最终状态d 。 如果达不到d ,则求出最接近d 的一个解熟悉了一下隐式图搜索题目:Problem DFillThere are three jugs with a volume of a, b and c liters. (a, b, and c are positive integers not greater than 200). The first and the second jug are initially empty, while the thirdis completely filled with water. It is allowed to 阅读全文
posted @ 2013-12-22 12:18 doubleshik 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 就是八皇后问题 。。题目:The Sultan's SuccessorsThe Sultan of Nubia has no children, so she has decided that the country will be split into up to k separate parts on her death and each part will be inherited by whoever performs best at some test. It is possible for any individual to inherit more than one or 阅读全文
posted @ 2013-12-20 21:08 doubleshik 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 就是连续邮资问题。。回朔法 sum 是求出每次最大连续的值backtrace 是枚举出每次的加入的值题目:StampsThe government of Nova Mareterrania requires that various legal documents have stamps attached to them so that the government can derive revenue from them. In terms of recent legislation, each class of document is limited in the number of st 阅读全文
posted @ 2013-12-20 20:32 doubleshik 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 题目大意是 只能利用左右交换完成一次排序,求一共有几种最小交换次数的方法按照题目的意思来dfs就行了。。自己写又写烦了。。受之前一道类似的题目影响,先求出最小方法数然后用子集构造去做。最后WA而且逆序多的话就卡了学习了别人的写法比较简单题目:Mapping the SwapsSorting an array can be done by swapping certain pairs of adjacent entries in the array. This is the fundamental technique used in the well-known bubble sort. If 阅读全文
posted @ 2013-12-19 23:54 doubleshik 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 有点小坑的一道题。。 一开始没多想就写了全排列看相邻两个球。。但是可能会有两个极大的圆。。。用坐标来确定每一个球的点。。枚举当前点和之前已经确定了圆相切后确定最右边的坐标,最后确定RECT最大值。题目: How Big Is It?Ian's going to California, and he has to pack his things, including his collection of circles. Given a set of circles, your program must find the smallest rectangular box in which 阅读全文
posted @ 2013-12-19 00:34 doubleshik 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 就是枚举+ 全排列一开始写复杂了,只要每次传进去写三次+-* 就行了题目:Problem I23 Out of 5Input: standard inputOutput: standard outputTime Limit: 1 secondMemory Limit: 32 MBYour task is to write a program that can decide whether you can find an arithmetic expression consisting of five given numbers (1 {1,2,3,4,5} is a bijective fun 阅读全文
posted @ 2013-12-18 16:19 doubleshik 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 题意就是给出一些station 然后一辆公车有人数限制。 问你求出最大的收益先对起点排个序。。然后就不用vis数组直接一个个递归下去。。一开始一直WA因为在main里没有枚举每个点。。。蛋疼题目: TransportationRuratania is just entering capitalism and is establishing new enterprising activities in many fields including transport. The transportation company TransRuratania is starting a new expr. 阅读全文
posted @ 2013-12-17 23:21 doubleshik 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 一道暴力子集生成。。 一开始WA看了别人blog后据说是数据中两个int之间的空格可能不止一个。。然后用%d读取题目:The Broken PedometerThe ProblemA marathon runner uses a pedometer with which he is having problems. In the pedometer the symbols are represented by seven segments (or LEDs):But the pedometer does not work properly (possibly the sweat affecte 阅读全文
posted @ 2013-12-15 22:19 doubleshik 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 题目大意就是找从起点到终点是否能有一条大于0的路。题目中有回路可正可负。。一开始用dfs写当有回路的时候判断是否大于0,如果大于0则把这条路设为INF , 从这条路一定可以到终点大于0。。但是一直wa。之后改用spfa设置最大次数10000才AC了题目:Problem D: XYZZYADVENT: /ad�vent/, n. The prototypical computer adventure game, first designed by Will Crowther on the PDP-10 in the mid-1970s as an attempt at computer-refe 阅读全文
posted @ 2013-12-14 14:54 doubleshik 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 就是走迷宫 。。 在三维空间上。。题目:Dungeon MasterYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south, east, west, up or down. You cannot move diagonally and the maze 阅读全文
posted @ 2013-12-13 23:32 doubleshik 阅读(230) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页