blockhouses
时间限制:1000 ms | 内存限制:65535 KB
难度:3
描述 Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a s...
分类:
其他好文 时间:
2015-07-29 15:56:13
阅读次数:
113
Robert is a famous engineer. One day he was given a task by his boss. The background of the task was the following:
Given a map consisting of square blocks. There were three kinds of blocks: Wall,...
分类:
其他好文 时间:
2015-07-29 12:21:07
阅读次数:
147
Square Coins点我Problem DescriptionPeople in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coi...
分类:
其他好文 时间:
2015-07-28 12:57:48
阅读次数:
100
Sqrt(x)
Implement int sqrt(int x).
Compute and return the square root of x.
解题思路:
这道题是求x的平方根。
解法1:基本的想法就是枚举,从1到n进行遍历,直到result*result>x,那么结果就是result-1。
class Solution {
public:
int...
分类:
其他好文 时间:
2015-07-27 23:08:04
阅读次数:
160
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
Return ...
分类:
其他好文 时间:
2015-07-27 19:12:53
阅读次数:
106
题目描述 There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile,...
分类:
其他好文 时间:
2015-07-26 20:47:59
阅读次数:
188
A number chain is created by continuously adding the square of the digits in a number to form a new number until it has been seen before.
For example,
44 → 32 → 13 → 10 → 1 → 1
85 → 89 → 145 → 42...
分类:
其他好文 时间:
2015-07-26 15:52:18
阅读次数:
152
题意:对于一个n,用不超过289的平方数组成,有几种组成方式;思路:母函数。构造(1+x^i+x^2i+...)...形式的多项式,所求n作为多项式展开中的次数,所求结果为该项的系数;#include#include#includeusing namespace std;int t,n,m;int ...
分类:
其他好文 时间:
2015-07-25 07:05:27
阅读次数:
115
一、内联函数 1、优点: 内联函数就是比较省资源,然后一般就是将简短,使用频率高的函数作为内联函数会比较合适。 2、一个demo #include "stdafx.h" #include using namespace std; inline double Square(double x) { re...
分类:
编程语言 时间:
2015-07-24 22:32:10
阅读次数:
127
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...
分类:
其他好文 时间:
2015-07-24 18:24:18
阅读次数:
135