시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 32 10 9 33.333%

문제

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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lIHRoZSBtYXhpbXVtIGFyZWEgd2hpY2ggbWF5IGJlIGNvdmVyZWQgdXNpbmcgdHdvIHJlY3RhbmdsZXMgdGhhdCBjb250YWluIG9ubHkgZW50cmllcyBoYXZpbmcgdGhlIHZhbHVlIDAuPFwvcD5cclxuIiwiaW5wdXQiOiI8cD5UaGUgXHVmYjAxcnN0IGxpbmUgb2YgdGhlIGlucHV0IFx1ZmIwMWxlIGNvbnRhaW5zIHR3byBpbnRlZ2VycyBtIGFuZCBuLCBzZXBhcmF0ZWQgYnkgYSBzaW5nbGUgYmxhbmsgY2hhcmFjdGVyLCByZXByZXNlbnRpbmcgdGhlIGRpbWVuc2lvbnMgb2YgdGhlIG1hdHJpeC4gRWFjaCBvZiB0aGUgZm9sbG93aW5nIG0gbGluZXMgY29udGFpbnMgbiBudW1iZXJzICh3aGljaCBhcmUgbm90IHNlcGFyYXRlZCBieSBibGFuayBjaGFyYWN0ZXJzKSBoYXZpbmcgdGhlIHZhbHVlcyAwIG9yIDEuPFwvcD5cclxuXHJcbjxwPkl0IGlzIGd1YXJhbnRlZWQgdGhhdCAwICZsZTsgbixtICZsZTsgMjAwPFwvcD5cclxuIiwib3V0cHV0IjoiPHA+VGhlIG91dHB1dCBcdWZiMDFsZSBtdXN0IGNvbnRhaW4gYSBzaW5nbGUgbnVtYmVyIHJlcHJlc2VudGluZyB0aGUgbWF4aW11bSBhcmVhIHdoaWNoIG1heSBiZSBjb3ZlcmVkIHdpdGggdHdvIHJlY3RhbmdsZXMgdGhhdCBjb250YWluIG9ubHkgZW50cmllcyBoYXZpbmcgdGhlIHZhbHVlIDAuPFwvcD5cclxuIiwiaGludCI6IiIsIm9yaWdpbmFsIjoiMSIsImh0bWxfdGl0bGUiOiIwIiwicHJvYmxlbV9sYW5nX2NvZGUiOiJcdWM2MDFcdWM1YjQifV0=

출처

Contest > KBTU Open > KBTU Open 2008 B번

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