码迷,mamicode.com
首页 >  
搜索关键字:square    ( 2122个结果
Squares-暴力枚举或者二分
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
TC SRM 663 div2 A ChessFloor 暴力
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
Project Euler:Problem 87 Prime power triples
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
Maximal Square
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
poj 2676Sudoku(DFS+回溯)
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
poj 2386
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
LeetCode "Maximal Square"
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
[DLX重复覆盖] poj 1084 Square Destroyer
题意: n*n的矩形阵(n 求在已经拿走一些火柴的情况下,还需要拿走至少多少根火柴可以把所有的正方形都破坏掉。 思路: 对于每个位置遍历所有可能的边长,确定这个边长下的正方形的边对应的都是数字几,并且把正方形从1开始编号。 然后根据编号,把正方形和数字建边记录方便下面建图。 然后以火柴棍为行,正方形为列,建立dancing link 然后求解。 这里注意的是,需要强行插入某些行。 ...
分类:其他好文   时间:2015-07-20 23:40:35    阅读次数:184
LeeCode-Sqrt(x)
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
LeeCode-Spiral Matrix II
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!