CODE:
#include
#include
#include
using namespace std;
bool mat[105][105];
bool root[105];
int n,m;
int R;
int cnt[105];
int ans1,ans2;
struct TNode
{
int num;
int level;
};
void BFS()
{
...
分类:
其他好文 时间:
2015-07-21 12:51:41
阅读次数:
128
DescriptionA robot has to patrol around a rectangular area which is in a form ofmxngrid (mrows andncolumns). The rows are labeled from 1 tom. The colu...
分类:
其他好文 时间:
2015-07-21 12:31:31
阅读次数:
102
Description At the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is th...
分类:
其他好文 时间:
2015-07-20 23:02:41
阅读次数:
131
题目:
Given n non-negative integers
representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
Above is a histogram where wi...
分类:
编程语言 时间:
2015-07-19 13:35:37
阅读次数:
128
2.2 Implement an algorithm to find the kth to last element of a singly linked list.这道题让我们求链表中倒数第k个元素,LeetCode中相类似的题目有Kth Largest Element in an Array 数...
分类:
其他好文 时间:
2015-07-19 13:21:05
阅读次数:
104
Red and Black
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 25797
Accepted: 13967
Description
There is a rectangular room, covered with square tiles. Eac...
分类:
其他好文 时间:
2015-07-19 10:20:56
阅读次数:
132
Nieuw Knollendam is a very modern town. This becomes clear already when looking at the layout of its map, which is just a rectangular grid of streets and avenues. Being an important trade centre, Nieuw...
分类:
其他好文 时间:
2015-07-19 10:20:44
阅读次数:
105
Crossword Answers
Time Limit: 3000MS
Memory Limit: Unknown
64bit IO Format: %lld & %llu
Submit Status
Description
A crossword puzzle consists of a rectangular gri...
分类:
其他好文 时间:
2015-07-19 10:20:22
阅读次数:
125
E. Two LabyrinthsTime Limit: 20 SecMemory Limit: 256 MB题目连接http://codeforces.com/gym/100187/problem/EDescriptionA labyrinth is the rectangular grid, e...
分类:
其他好文 时间:
2015-07-18 22:36:35
阅读次数:
375
You have a positive integermand a non-negative integers. Your task is to find the smallest and the largest of the numbers that have lengthmand sum of ...
分类:
其他好文 时间:
2015-07-16 21:59:17
阅读次数:
144