B - Squares
Time Limit:3500MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u
Submit Status Practice POJ
2002
Description
A square is a 4-sided polygon whose sides have eq...
分类:
其他好文 时间:
2015-07-24 18:15:02
阅读次数:
90
ChessFloorTime Limit: 20 SecMemory Limit: 256 MB题目连接TCDescriptionSamantha is renovating a square room. The floor of the room is an N times N grid of u...
分类:
其他好文 时间:
2015-07-24 01:24:53
阅读次数:
116
The smallest number expressible as the sum of a prime square, prime cube, and prime fourth power is 28. In fact, there are exactly four numbers below fifty that can be expressed
in such a way:
28...
分类:
其他好文 时间:
2015-07-23 21:50:50
阅读次数:
210
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following matr...
分类:
其他好文 时间:
2015-07-23 13:40:49
阅读次数:
95
Sudoku
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 15698
Accepted: 7678
Special Judge
Description
Sudoku is a very simple task. A square table with 9...
分类:
其他好文 时间:
2015-07-23 12:09:58
阅读次数:
126
Description
Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares. Each square contains...
分类:
其他好文 时间:
2015-07-22 18:41:17
阅读次数:
168
Intuition: 2D DP. Basic idea: compose square at dp[i][j] from dp[i-1][j-1]. You need 2 facility 2D matrix: accumulated horizontal\vertical number of 1...
分类:
其他好文 时间:
2015-07-21 14:37:44
阅读次数:
79
题意:
n*n的矩形阵(n
求在已经拿走一些火柴的情况下,还需要拿走至少多少根火柴可以把所有的正方形都破坏掉。
思路:
对于每个位置遍历所有可能的边长,确定这个边长下的正方形的边对应的都是数字几,并且把正方形从1开始编号。
然后根据编号,把正方形和数字建边记录方便下面建图。
然后以火柴棍为行,正方形为列,建立dancing link
然后求解。
这里注意的是,需要强行插入某些行。
...
分类:
其他好文 时间:
2015-07-20 23:40:35
阅读次数:
184
Implementint sqrt(int x).Compute and return the square root ofx. 1 int mySqrt(int x) 2 { 3 if(x==1) 4 return 1; 5 6 /* for(int i=2;i<...
分类:
其他好文 时间:
2015-07-20 10:45:48
阅读次数:
132
Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matri...
分类:
其他好文 时间:
2015-07-20 10:30:20
阅读次数:
108