A rook is a piece used in the game of chess which is played on a board of square grids. A rook can only move vertically or horizontally from its current position and two rooks attack each other if one...
分类:
其他好文 时间:
2015-06-04 10:00:21
阅读次数:
127
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-06-04 00:56:05
阅读次数:
132
代码:
#include
using namespace std;
int main()
{
int n;
int a[18];
for(int i=1;i<=17;i++)
a[i]=i*i;
while(scanf("%d",&n)&&n)
{
long long c1[350],c2[350];
fo...
分类:
其他好文 时间:
2015-06-03 21:40:40
阅读次数:
112
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 matrix:
1 0 1 0 0
1 0 1 1 1
1 1 1 1 1
1 0 0 1 0
...
分类:
其他好文 时间:
2015-06-03 17:45:21
阅读次数:
101
题目:
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 matrix:
1 0 1 0...
分类:
其他好文 时间:
2015-06-03 15:43:47
阅读次数:
173
Maximal SquareGiven 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 ...
分类:
其他好文 时间:
2015-06-03 13:38:09
阅读次数:
125
Sqrt(x)Total Accepted:52136Total Submissions:225527My SubmissionsQuestionSolutionImplementint sqrt(int x).Compute and return the square root ofx.Hide ...
分类:
其他好文 时间:
2015-06-03 13:13:21
阅读次数:
118
Spiral Matrix IITotal Accepted:28996Total Submissions:91437My SubmissionsQuestionSolutionGiven an integern, generate a square matrix filled with eleme...
分类:
编程语言 时间:
2015-06-02 12:59:23
阅读次数:
120
这一题,简单的母函数的应用,好久没有写过母函数了,有点生疏了。
题目的硬币有17种,分别是1到17的平方的硬币。
下面的是AC的代码:
#include
#include
#include
using namespace std;
int dp[305], temp[305];
int main()
{
int i, j, k, l;
for(i = 0; i < 305; i...
分类:
其他好文 时间:
2015-05-31 23:22:36
阅读次数:
196
/*ID: awsd1231PROG: transformLANG: C++*/#include#includeusing namespace std;char square[15][15], afterSquare[15][15], tmpSquare[15][15];int n;bool num...
分类:
其他好文 时间:
2015-05-31 13:51:33
阅读次数:
98