![]() | ||||
Online Judge | Problem Set | Authors | Online Contests | User |
---|---|---|---|---|
Web Board Home Page F.A.Qs Announcement | Current Contest Past Contests Scheduled Contests Award Contest |
Cover Time Limit:25000MS Memory Limit:65536K
Given an N * N matrix A, whose elements are positive integers and not
larger than 10000. There are also some '*'s in matrix A. Your program
must find such three (perhaps overlapping) rectangles that they would
contain all the '*'s which are in matrix A and the areas of these three
rectangles (the area of one rectangle define as the number of elements
it covers) must be non-negative and not exceed a given integer M.
The first line of the input is an integer X representing the number of
test cases. The following X blocks each represents a test case.
For each block output one line, which contains an integer representing the minimum total costs, or 'Impossible' (without quote) if no solution exists. Sample Input
POJ Monthly--2005.07.31, LouTianCheng |
[Submit] [Go Back] [Status] [Discuss]
All Copyright Reserved 2003-2005 Ying Fuchen,Xu Pengcheng
Any problem, Please Contact Administrator