1335: 高桥和低桥
Time Limit: 1 Sec Memory Limit: 128 MB
Submit: 861 Solved: 248
[Submit][Status][Web
Board]
Description
有个脑筋急转弯是这样的:有距离很近的一高一低两座桥,两次洪水之后高桥被淹了两次,低桥却只被淹了一次,为什么?答案是:因为低桥太低了,第一次洪水退去之...
分类:
其他好文 时间:
2015-05-09 16:38:23
阅读次数:
140
1328: 近似回文词
Time Limit: 1 Sec Memory Limit: 128 MB
Submit: 394 Solved: 144
[Submit][Status][Web
Board]
Description
输入一行文本,输出最长近似回文词连续子串。所谓近似回文词是指满足以下条件的字符串:
1. S以字母开头,字母结尾
2. a(S)和b(S)最多有...
分类:
其他好文 时间:
2015-05-09 08:52:26
阅读次数:
113
Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog...
分类:
其他好文 时间:
2015-05-09 01:13:01
阅读次数:
169
Welcome to CSU Online Judge!1604: SunnyPigTime Limit:1 SecMemory Limit:128 MBSubmit:193Solved:34[Submit][Status][Web Board]DescriptionSunnyPig is a pi...
分类:
其他好文 时间:
2015-05-08 21:42:43
阅读次数:
142
题意:第一问:从1出发,是不是会走进一个点,然后再也到不了n。 第二问:是不是存在一个环,从1出发可以走到。对于第一问,我们可以先缩点,然后看看是不是只有一个点,出度为0,还有注意这个点包含n对于第二问,如果访问的点数sum等于缩点以后的点数,那么就是没有环了。这里需要注意的是,特判自环......
分类:
其他好文 时间:
2015-05-07 23:48:46
阅读次数:
130
题意:有n个村子 由m条路联通 其中q条路会依次被摧毁 问每次摧毁后会有多少片村庄被孤立思路:首先算出q条路都被摧毁后被孤立的村庄数 然后再逆序把每条路修复上 每修复一条孤立的村庄就减少一片 最后再输出每次记录的结果#include#include#include#includeu...
分类:
其他好文 时间:
2015-05-07 23:39:29
阅读次数:
153
Problem Description
A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figur...
分类:
其他好文 时间:
2015-05-07 22:16:16
阅读次数:
143
1601: WarTime Limit:1 SecMemory Limit:128 MBSubmit:127Solved:36[Submit][Status][Web Board]DescriptionAME decided to destroy CH’s country. In CH’ count...
分类:
其他好文 时间:
2015-05-07 07:33:47
阅读次数:
174
1.注意要把a[]定义为LL,我在这里wa了N次
2.寻找边界时,得用dp思想
AC代码:#include
#include
#define LL long long
using namespace std;
const LL INF=1<<60;
LL a[100005];//要定义为LL
int L[100005];
int R[100005];
int main()
{
in...
分类:
其他好文 时间:
2015-05-07 00:55:21
阅读次数:
108
DescriptionGiven a 2-dimensional array of positive and negative integers, find the sub-rectangle with the largest sum. The sum of a rectangle is the s...
分类:
其他好文 时间:
2015-05-06 22:28:44
阅读次数:
144