码迷,mamicode.com
首页 >  
搜索关键字:square    ( 2122个结果
ZOJ 2165
Red and BlackTime Limit:2 Seconds Memory Limit:65536 KBThere is a rectangular room, covered with square tiles. Each tile is colored either red or blac...
分类:其他好文   时间:2014-07-31 12:18:26    阅读次数:213
hdu 1518 Square(深搜+剪枝)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1518题目大意:根据题目所给的几条边,来判断是否能构成正方形,一个很好的深搜应用,注意剪枝,以防超时! 1 #include 2 #include 3 #include 4 #include 5 u...
分类:其他好文   时间:2014-07-31 09:38:55    阅读次数:175
hdu 1398 Square Coins(母函数,完全背包)
题意:有17种货币,面额分别为i*i(1<=i<=17),都为无限张, 给定一个值n(n<=300),求用上述货币能使价值总和为n的方案数 分析:这题可以用母函数的思想,对300以内的值进行预处理即可 也可用完全背包思想求300以内的方案数...
分类:其他好文   时间:2014-07-30 20:58:14    阅读次数:182
HJDU 1518—— Square(DFS)
DFS...
分类:其他好文   时间:2014-07-30 20:44:24    阅读次数:209
POJ 搜索题集
poj1010——邮票问题 DFS poj1011——Sticks dfs + 剪枝 poj1020——拼蛋糕 poj1054——The Troublesome Frog poj1062——昂贵的聘礼 poj1077——Eight poj1084——Square Destroyer poj1085——Triangle War(博弈,極大極小搜索+alpha_beta剪枝) po...
分类:其他好文   时间:2014-07-29 18:07:12    阅读次数:294
Topcoder 多校T-shirt场
盗用名字:C题题目都没看懂, B:You are given a long longn. Return the largest divisor ofnthat is a perfect square. That is, the correct return value is x if and ...
分类:其他好文   时间:2014-07-29 10:54:36    阅读次数:204
hdu 1398 Square Coins(母函数|完全背包)
http://acm.hdu.edu.cn/showproblem.php?pid=1398 题意:有价值为1^2,2^2....7^2的硬币共17种,每种硬币都有无限个。问用这些硬币能够组成价值为n的钱数共有几种方案数。 母函数: #include #include #include #include #include #include #include #i...
分类:其他好文   时间:2014-07-28 00:03:19    阅读次数:219
HDU1078:FatMouse and Cheese(记忆化)
Problem Description FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At e...
分类:其他好文   时间:2014-07-28 00:02:49    阅读次数:319
Leetcode | Sqrt(x)
Implement int sqrt(int x).Compute and return the square root of x.线性查找会TLE。用二分查找。注意溢出的处理。全部都改成long long. 1 class Solution { 2 public: 3 int sqrt(i...
分类:其他好文   时间:2014-07-27 10:41:02    阅读次数:181
[LeetCode] Spiral Matrix II
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example, Given n = 3,You should return the followin...
分类:其他好文   时间:2014-07-27 10:21:02    阅读次数:219
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!