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

문제

크기가 m×n인 복도가 있다. 이 복도에는 크기를 무시할 있는 기둥이 여러 개 있다. 복도를 서쪽에서 동쪽까지 통과할 수 있는 가장 큰 공을 구하는 프로그램을 작성하시오. 공은 완전한 구 모양이어야 한다. 또, 서쪽의 아무 위치에서나 시작할 수 있고, 가장 동쪽의 아무데서나 도착하면 된다. 복도의 높이는 매우 높기 때문에, 공이 천장에 닿는 경우는 없다. 

입력

첫째 줄에 복도의 가로길이 m과 세로길이 n이 주어진다. 다음 줄에는 복도에 있는 기둥의 수 k가 주어진다. 다음 k개 줄에는 복도의 좌표가 한 줄에 하나씩 주어진다. (0 ≤ n,m,k ≤ 1000) 첫 번째 좌표가 가로 방향의 좌표이다.

가로 방향이 서쪽에서 동쪽으로 향하는 방향이며, 세로 방향은 남쪽에서 북쪽으로 향하는 방향이다. 즉, 가로 방향의 가장 왼쪽이 서쪽이 되고, 가장 오른쪽이 동쪽이 된다.

출력

첫째 줄에 복도를 통과할 수 있는 가장 큰 공의 반지름을 소수점 여덟째 자리까지 출력한다.

예제 입력 1

5 2
1
1 1

예제 출력 1

0.50000000
W3sicHJvYmxlbV9pZCI6Ijc3ODgiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWJjZjVcdWIzYzQiLCJkZXNjcmlwdGlvbiI6IjxwPlx1ZDA2Y1x1YWUzMFx1YWMwMCBtJnRpbWVzO25cdWM3NzggXHViY2Y1XHViM2M0XHVhYzAwIFx1Yzc4OFx1YjJlNC4gXHVjNzc0IFx1YmNmNVx1YjNjNFx1YzVkMFx1YjI5NCBcdWQwNmNcdWFlMzBcdWI5N2MgXHViYjM0XHVjMmRjXHVkNTYwIFx1Yzc4OFx1YjI5NCBcdWFlMzBcdWI0NjVcdWM3NzQgXHVjNWVjXHViN2VjIFx1YWMxYyBcdWM3ODhcdWIyZTQuIFx1YmNmNVx1YjNjNFx1Yjk3Yy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