시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 26 9 8 36.364%

문제

m행 n열로 이루어진 바이너리 행렬이 주어졌을 때, 0으로만 이루어진 두 직사각형으로 덮을 수 있는 가장 큰 면적을 구하는 프로그램을 작성하시오. 두 직사각형은 겹치면 안 된다.

입력

첫째 줄에 m과 n이 주어진다. (0 ≤ n, m ≤ 200) 다음 m개 줄에는 행렬의 원소인 n개의 수가 주어진다.

출력

첫째 줄에 0으로만 이루어진 두 직사각형으로 덮을 수 있는 가장 큰 면적을 출력한다.

예제 입력 1

6 8
10000000
10000000
11100011
00100011
00100011
00111111

예제 출력 1

23
W3sicHJvYmxlbV9pZCI6Ijc3ODMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJCLVx1ZDU4OVx1YjgyYyIsImRlc2NyaXB0aW9uIjoiPHA+bVx1ZDU4OSBuXHVjNWY0XHViODVjIFx1Yzc3NFx1YjhlOFx1YzViNFx1YzljNCBcdWJjMTRcdWM3NzRcdWIxMDhcdWI5YWMgXHVkNTg5XHViODJjXHVjNzc0IFx1YzhmY1x1YzViNFx1Yzg0Y1x1Yzc0NCBcdWI1NGMsIDBcdWM3M2NcdWI4NWNcdWI5Y2MgXHVjNzc0XHViOGU4XHVjNWI0XHVjOWM0IFx1YjQ1MCBcdWM5YzFcdWMwYWNcdWFjMDFcdWQ2MTVcdWM3M2NcdWI4NWMgXHViMzZlXHVjNzQ0IFx1YzIxOCBcdWM3ODhcdWIyOTQgXHVhYzAwXHVjN2E1IFx1ZDA3MCBcdWJhNzRcdWM4MDFcdWM3NDQgXHVhZDZjXHVkNTU4XHViMjk0IFx1ZDUwNFx1Yjg1Y1x1YWRmOFx1YjdhOFx1Yzc0NCBcdWM3OTFcdWMxMzFcdWQ1NThcdWMyZGNcdWM2MjQuIFx1YjQ1MCBcdWM5YzFcdWMwYWNcdWFjMDFcdWQ2MTVcdWM3NDAgXHVhY2I5XHVjZTU4XHViYTc0IFx1YzU0OCB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aWNoIG1heSBiZSBjb3ZlcmVkIHVzaW5nIHR3byByZWN0YW5nbGVzIHRoYXQgY29udGFpbiBvbmx5IGVudHJpZXMgaGF2aW5nIHRoZSB2YWx1ZSAwLjxcL3A+XHJcbiIsImlucHV0IjoiPHA+VGhlIFx1ZmIwMXJzdCBsaW5lIG9mIHRoZSBpbnB1dCBcdWZiMDFsZSBjb250YWlucyB0d28gaW50ZWdlcnMgbSBhbmQgbiwgc2VwYXJhdGVkIGJ5IGEgc2luZ2xlIGJsYW5rIGNoYXJhY3RlciwgcmVwcmVzZW50aW5nIHRoZSBkaW1lbnNpb25zIG9mIHRoZSBtYXRyaXguIEVhY2ggb2YgdGhlIGZvbGxvd2luZyBtIGxpbmVzIGNvbnRhaW5zIG4gbnVtYmVycyAod2hpY2ggYXJlIG5vdCBzZXBhcmF0ZWQgYnkgYmxhbmsgY2hhcmFjdGVycykgaGF2aW5nIHRoZSB2YWx1ZXMgMCBvciAxLjxcL3A+XHJcblxyXG48cD5JdCBpcyBndWFyYW50ZWVkIHRoYXQgMCAmbGU7IG4sbSAmbGU7IDIwMDxcL3A+XHJcbiIsIm91dHB1dCI6IjxwPlRoZSBvdXRwdXQgXHVmYjAxbGUgbXVzdCBjb250YWluIGEgc2luZ2xlIG51bWJlciByZXByZXNlbnRpbmcgdGhlIG1heGltdW0gYXJlYSB3aGljaCBtYXkgYmUgY292ZXJlZCB3aXRoIHR3byByZWN0YW5nbGVzIHRoYXQgY29udGFpbiBvbmx5IGVudHJpZXMgaGF2aW5nIHRoZSB2YWx1ZSAwLjxcL3A+XHJcbiIsImhpbnQiOiIiLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1YzYwMVx1YzViNCJ9XQ==

출처

Contest > KBTU Open > KBTU Open 2008 B번

  • 문제를 번역한 사람: baekjoon
  • 빠진 조건을 찾은 사람: koosaga