http://poj.org/problem?id=3415 Common Substrings Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 5805 Accepted: 1911 Description A substring of a string T is defined as: T(i, k)=TiTi+1...Ti+k-1, 1≤i≤i+k-1≤|T|. Given two strings A, B an…
这几天的知识学习比较多,因为时间不够了.加油吧,为了梦想. 这里写几条简单的单调栈作为题解记录,因为单调栈的用法很简单,可是想到并转化成用这个需要一些题目的积淀. 相关博客参见:https://blog.csdn.net/wubaizhe/article/details/70136174 POJ 3250 Bad Hair Day 题意与分析 题意是这样的:\(n\)个牛排成一列向右看,牛\(i\)能看到牛\(j\)的头顶,当且仅当牛\(j\)在牛\(i\)的右边并且牛\(i\)与牛\(j\)之…
Largest Rectangle in a Histogram Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 19782 Accepted: 6393 Description A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal wi…
Bad Hair Day Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 17774 Accepted: 6000 Description Some of Farmer John's N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants…
Mike and Feet Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 548D Appoint description: Description Mike is the president of country What-The-Fatherland. There are n bears living in thi…