DescriptionGiven a triangle ABC, the Extriangles of ABC are constructed as follows:On each side of ABC, construct a square (ABDE, BCHJ and ACFG in the...
分类:
其他好文 时间:
2014-10-13 14:38:59
阅读次数:
442
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 following...
分类:
其他好文 时间:
2014-10-13 09:58:09
阅读次数:
170
Sqrt(x)
Total Accepted: 26074 Total
Submissions: 116517My Submissions
Implement int sqrt(int x).
Compute and return the square root of x.
题意:实现求方根 sqrt(x)
思路:二分法
对于一个数,它的方...
分类:
其他好文 时间:
2014-10-12 16:05:18
阅读次数:
160
Origami Box Start with a square 6" x 6" (15cm x 15cm) origami paper. Flip the sheet so that the colored side is face down. Now make two mountain folds...
分类:
其他好文 时间:
2014-10-09 17:42:58
阅读次数:
369
Xsolla有幸采访到中国外包公司艾迪亚数字娱乐的市场总监-Matthew
Dai。这家工作室和世界级的开发商合作,像Ubisoft, ANught Dog, Sega, EA, Sony, Midway, Crytek 和Square Enix。并不是其他的外包视觉制作公司, 艾迪公司一直争取在控制人员,不超过250名工作的情况下,制作出最好的作品。如果你玩过The Last of Us, ...
分类:
其他好文 时间:
2014-10-08 10:11:55
阅读次数:
292
1 #include 2 3 int square137(int n); 4 5 void p137() { 6 double x = 3.0; 7 int y = (int)x; 8 printf("Square of %f is %d\n", x, square1...
分类:
其他好文 时间:
2014-10-08 01:41:54
阅读次数:
175
题目地址:Ural 1073
DP水题。也可以说是背包。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const int INF=0x3f3f3f3f;
#define LL ...
分类:
其他好文 时间:
2014-10-05 11:40:28
阅读次数:
203
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1518题意:给你n条边,问你用光这些边能不能组成正方形这里主要是超时问题:其实对于某条边,对于那些用过的和不符合条件的for那里可以不扫。。。。。所以Dfs要增加一个参数index表示从那里开始扫。。。但是...
分类:
其他好文 时间:
2014-10-04 12:40:16
阅读次数:
189
# include
# include
# include
# include
using namespace std;
int main()
{
int n,i,j,k;
int c1[310],c2[310];
while(~scanf("%d",&n),n)
{
for(i=0;i<=n;i++)
{
...
分类:
其他好文 时间:
2014-10-03 11:59:44
阅读次数:
246
题目:四平方定理,输出一个数可以表示成不超过四个平方数和的表示方法数。
分析:dp,完全背包。整数拆分用背包,可用一维分步计算,也可统一写成二维。
状态:设f(i,j,k)为前i个数字,取j个数字他们的平方和是k的便是方法数;
转移:f(i,j,k)= sum(f(i-1,j-1,k-i*i));{ 其中i可以省掉不写 };
说明:打表计...
分类:
其他好文 时间:
2014-10-01 20:21:31
阅读次数:
175