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
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #define M 2000009 #define inf 0x7ffffff #define ll long long using namespace std; ],deep[M],m,dfn[M],T,v[M]; int h[M],st[M],mn[M],mx[M],size[M],mx1,mi1,v1[M]
Largest Submatrix of All 1’s Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 5883 Accepted: 2217 Case Time Limit: 2000MS Description Given a m-by-n (0,1)-matrix, of all its submatrices of all 1’s which is the largest? By largest we me
Feel Good Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 13376 Accepted: 3719 Case Time Limit: 1000MS Special Judge Description Bill is developing a new mathematical theory for human emotions. His recent investigations are dedicated
Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18942 Accepted: 6083 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 heigh