시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 25 8 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+bVx1ZDU4OSBuXHVjNWY0XHViODVjIFx1Yzc3NFx1YjhlOFx1YzViNFx1YzljNCBcdWJjMTRcdWM3NzRcdWIxMDhcdWI5YWMgXHVkNTg5XHViODJjXHVjNzc0IFx1YzhmY1x1YzViNFx1Yzg0Y1x1Yzc0NCBcdWI1NGMsIDBcdWM3M2NcdWI4NWNcdWI5Y2MgXHVjNzc0XHViOGU4XHVjNWI0XHVjOWM0IFx1YjQ1MCBcdWM5YzFcdWMwYWNcdWFjMDFcdWQ2MTVcdWM3M2NcdWI4NWMgXHViMzZlXHVjNzQ0IFx1YzIxOCBcdWM3ODhcdWIyOTQgXHVhYzAwXHVjN2E1IFx1ZDA3MCBcdWJhNzRcdWM4MDFcdWM3NDQgXHVhZDZjXHVkNTU4XHViMjk0IFx1ZDUwNFx1Yjg1Y1x1YWRmOFx1YjdhOFx1Yzc0NCBcdWM3OTFcdWMxMzFcdWQ1NThcdWMyZGNcdWM2MjQuIFx1YjQ1MCBcdWM5YzFcdWMwYWNcdWFjMDFcdWQ2MTVcdWM3NDAgXHVhY2I5XHVjZTU4XHViYTc0IFx1YzU0OFx1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pY2ggbWF5IGJlIGNvdmVyZWQgdXNpbmcgdHdvIHJlY3RhbmdsZXMgdGhhdCBjb250YWluIG9ubHkgZW50cmllcyBoYXZpbmcgdGhlIHZhbHVlIDAuPFwvcD5cclxuIiwiaW5wdXQiOiI8cD5UaGUgXHVmYjAxcnN0IGxpbmUgb2YgdGhlIGlucHV0IFx1ZmIwMWxlIGNvbnRhaW5zIHR3byBpbnRlZ2VycyBtIGFuZCBuLCBzZXBhcmF0ZWQgYnkgYSBzaW5nbGUgYmxhbmsgY2hhcmFjdGVyLCByZXByZXNlbnRpbmcgdGhlIGRpbWVuc2lvbnMgb2YgdGhlIG1hdHJpeC4gRWFjaCBvZiB0aGUgZm9sbG93aW5nIG0gbGluZXMgY29udGFpbnMgbiBudW1iZXJzICh3aGljaCBhcmUgbm90IHNlcGFyYXRlZCBieSBibGFuayBjaGFyYWN0ZXJzKSBoYXZpbmcgdGhlIHZhbHVlcyAwIG9yIDEuPFwvcD5cclxuXHJcbjxwPkl0IGlzIGd1YXJhbnRlZWQgdGhhdCAwICZsZTsgbixtICZsZTsgMjAwPFwvcD5cclxuIiwib3V0cHV0IjoiPHA+VGhlIG91dHB1dCBcdWZiMDFsZSBtdXN0IGNvbnRhaW4gYSBzaW5nbGUgbnVtYmVyIHJlcHJlc2VudGluZyB0aGUgbWF4aW11bSBhcmVhIHdoaWNoIG1heSBiZSBjb3ZlcmVkIHdpdGggdHdvIHJlY3RhbmdsZXMgdGhhdCBjb250YWluIG9ubHkgZW50cmllcyBoYXZpbmcgdGhlIHZhbHVlIDAuPFwvcD5cclxuIiwiaGludCI6IiIsIm9yaWdpbmFsIjoiMSIsInByb2JsZW1fbGFuZ19jb2RlIjoiXHVjNjAxXHVjNWI0In1d

출처

Contest > KBTU Open > KBTU Open 2008 B번

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