描述 The bustling town of Siruseri has just one sports stadium. There are a number of schools, colleges, sports associations, etc. that use this stadium as the venue for their sports events. Anyone interested in using the stadium has to apply to the Ma…
Radar Installation Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 68578 Accepted: 15368 Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point loca…
2388: 最短区间 Time Limit: 1 s Memory Limit: 128 MB Submit My Status Problem Description 有M种不同颜色的气球(颜色从1至M表示),现在有一排N个位置,需要往这N个位置中填充一些气球,可填也可不填.求最短的区间长度使的这个区间中包含M种颜色的气球.如果没有则输入-1. Input 第一行输入N和M,N表示位置长度,M表示气球颜色数量.(1≤M≤1000,1≤N≤106)(1≤M≤1000,1≤N≤106).…
描述 Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 <= i, j <= N). We can change the matrix in the following way. Given a rectangle whose upper-left c…
Radar Installation Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 106491 Accepted: 23648 Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point loc…
Chiaki has n intervals and the i-th of them is [li, ri]. She wants to delete some intervals so that there does not exist three intervals a, b and c such that aintersects with b, b intersects with c and c intersects with a. Chiaki is interested in the…
A. Mike and palindrome time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Mike has a string s consisting of only lowercase English letters. He wants to change exactly one character from the s…
I: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you are able to reach the last index. For example:A…
There is given the series of n closed intervals [ai; bi], where i=1,2,...,n. The sum of those intervals may be represented as a sum of closed pairwise non−intersecting intervals. The task is to find such representation with the minimal number of inte…
POJ2376 Cleaning Shifts Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14585 Accepted: 3718 Description Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to hav…