LA 3029 A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal length of the subsequence of consecutive elements of th…
最大子矩阵(City Game, SEERC 2004, LA 3029) 给定一个m×n的矩阵,其中一些格子是空地(F),其他是障碍(R).找出一个全部由F组成的面积最大的子矩阵,输出其面积乘以3后的结果. [输入格式] 输入的第一行为数据组数T.每组数据的第一行为整数m和n(1≤m,n≤1 000):以下m行每行n个字符(保证为F或者R),即输入矩阵. [输出格式] 对于每组数据,输出面积最大的.全由F组成的矩阵的面积乘以3后的结果. Sample Input 2 5 6 R F F F F…
Tree Land Kingdom is a prosperous and lively kingdom. It has N cities which are connected to eachother by roads such that there is exactly one path to go from one city to any other city. Each road inthe kingdom connects exactly two different cities.Ev…