#include <fstream>
#include <vector>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <iomanip>
using namespace std;
ifstream F("hallway.in");
ofstream G("hallway.out");
const double eps = 1e-8;
typedef pair<int,int> pdd;
#define x first
#define y second
const int N = 1010;
vector<pdd> pt;
int n,m,k;
int ds[N][N];
int d[N];
int mk[N];
int dist(pdd a,pdd b)
{
return (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y);
}
int main()
{
F>>n>>m>>k;
for (int i=1;i<=k;++i)
{
int x,y;
F>>x>>y;
pt.push_back( make_pair(x,y) );
}
for (int i=1;i<=k;++i)
for (int j=1;j<=k;++j)
ds[i][j] = dist(pt[i-1],pt[j-1]);
ds[0][k+1] = ds[k+1][0] = 1<<30;
for (int i=1;i<=k;++i)
{
ds[0][i] = ds[i][0] = pt[i-1].y*pt[i-1].y;
ds[i][k+1] = ds[k+1][i] = (m-pt[i-1].y)*(m-pt[i-1].y);
}
for (int i=1;i<=k+1;++i)
d[i] = 1<<30;
int n = 0;
for (int i=1;i<=k+1;++i)
{
mk[n] = 1;
int ans = 1<<30;
for (int j=1;j<=k+1;++j)
if ( !mk[j] )
{
d[j] = min(d[j],max(d[n],ds[n][j]));
ans = min(ans,d[j]);
}
for (int j=1;j<=k+1;++j)
if ( !mk[j] && d[j] == ans )
{
n = j;
break;
}
if ( n == k+1 )
{
G<<fixed<<setprecision(8)<<sqrt(ans)/2<<'\n';
return 0;
}
}
}
I2luY2x1ZGUgPGZzdHJlYW0+CiNpbmNsdWRlIDx2ZWN0b3I+CiNpbmNsdWRlIDxjbWF0aD4KI2luY2x1ZGUgPGNzdHJpbmc+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDxpb21hbmlwPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaWZzdHJlYW0gRigiaGFsbHdheS5pbiIpOwpvZnN0cmVhbSBHKCJoYWxsd2F5Lm91dCIpOwoKY29uc3QgZG91YmxlIGVwcyA9IDFlLTg7Cgp0eXBlZGVmIHBhaXI8aW50LGludD4gcGRkOwojZGVmaW5lIHggZmlyc3QKI2RlZmluZSB5IHNlY29uZAoKY29uc3QgaW50IE4gPSAxMDEwOwoKdmVjdG9yPHBkZD4gcHQ7CmludCBuLG0sazsKaW50IGRzW05dW05dOwppbnQgZFtOXTsKaW50IG1rW05dOwoKaW50IGRpc3QocGRkIGEscGRkIGIpCnsKICAgIHJldHVybiAoYS54LWIueCkqKGEueC1iLngpKyhhLnktYi55KSooYS55LWIueSk7Cn0KCmludCBtYWluKCkKewogICAgRj4+bj4+bT4+azsKICAgIGZvciAoaW50IGk9MTtpPD1rOysraSkKICAgIHsKICAgICAgICBpbnQgeCx5OwogICAgICAgIEY+Png+Pnk7CiAgICAgICAgcHQucHVzaF9iYWNrKCBtYWtlX3BhaXIoeCx5KSApOwogICAgfQogICAgZm9yIChpbnQgaT0xO2k8PWs7KytpKQogICAgICAgIGZvciAoaW50IGo9MTtqPD1rOysraikKICAgICAgICAgICAgZHNbaV1bal0gPSBkaXN0KHB0W2ktMV0scHRbai0xXSk7CiAgICBkc1swXVtrKzFdID0gZHNbaysxXVswXSA9IDE8PDMwOwogICAgZm9yIChpbnQgaT0xO2k8PWs7KytpKQogICAgewogICAgICAgIGRzWzBdW2ldID0gZHNbaV1bMF0gPSBwdFtpLTFdLnkqcHRbaS0xXS55OwogICAgICAgIGRzW2ldW2srMV0gPSBkc1trKzFdW2ldID0gKG0tcHRbaS0xXS55KSoobS1wdFtpLTFdLnkpOwogICAgfQogICAgZm9yIChpbnQgaT0xO2k8PWsrMTsrK2kpCiAgICAgICAgZFtpXSA9IDE8PDMwOwogICAgaW50IG4gPSAwOwogICAgZm9yIChpbnQgaT0xO2k8PWsrMTsrK2kpCiAgICB7CiAgICAgICAgbWtbbl0gPSAxOwogICAgICAgIGludCBhbnMgPSAxPDwzMDsKICAgICAgICBmb3IgKGludCBqPTE7ajw9aysxOysraikKICAgICAgICAgICAgaWYgKCAhbWtbal0gKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBkW2pdID0gbWluKGRbal0sbWF4KGRbbl0sZHNbbl1bal0pKTsKICAgICAgICAgICAgICAgIGFucyA9IG1pbihhbnMsZFtqXSk7CiAgICAgICAgICAgIH0KICAgICAgICBmb3IgKGludCBqPTE7ajw9aysxOysraikKICAgICAgICAgICAgaWYgKCAhbWtbal0gJiYgZFtqXSA9PSBhbnMgKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBuID0gajsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgaWYgKCBuID09IGsrMSApCiAgICAgICAgewogICAgICAgICAgICBHPDxmaXhlZDw8c2V0cHJlY2lzaW9uKDgpPDxzcXJ0KGFucykvMjw8J1xuJzsKICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgfQogICAgfQp9Cg==
Main.java:1: error: illegal character: \35
#include <fstream>
^
Main.java:1: error: class, interface, or enum expected
#include <fstream>
^
Main.java:2: error: illegal character: \35
#include <vector>
^
Main.java:3: error: illegal character: \35
#include <cmath>
^
Main.java:4: error: illegal character: \35
#include <cstring>
^
Main.java:5: error: illegal character: \35
#include <algorithm>
^
Main.java:6: error: illegal character: \35
#include <iomanip>
^
Main.java:9: error: class, interface, or enum expected
ifstream F("hallway.in");
^
Main.java:10: error: class, interface, or enum expected
ofstream G("hallway.out");
^
Main.java:12: error: class, interface, or enum expected
const double eps = 1e-8;
^
Main.java:14: error: class, interface, or enum expected
typedef pair<int,int> pdd;
^
Main.java:15: error: illegal character: \35
#define x first
^
Main.java:15: error: class, interface, or enum expected
#define x first
^
Main.java:16: error: illegal character: \35
#define y second
^
Main.java:20: error: class, interface, or enum expected
vector<pdd> pt;
^
Main.java:21: error: class, interface, or enum expected
int n,m,k;
^
Main.java:22: error: class, interface, or enum expected
int ds[N][N];
^
Main.java:23: error: class, interface, or enum expected
int d[N];
^
Main.java:24: error: class, interface, or enum expected
int mk[N];
^
Main.java:26: error: class, interface, or enum expected
int dist(pdd a,pdd b)
^
Main.java:29: error: class, interface, or enum expected
}
^
Main.java:34: error: class, interface, or enum expected
for (int i=1;i<=k;++i)
^
Main.java:34: error: class, interface, or enum expected
for (int i=1;i<=k;++i)
^
Main.java:34: error: class, interface, or enum expected
for (int i=1;i<=k;++i)
^
Main.java:37: error: class, interface, or enum expected
F>>x>>y;
^
Main.java:38: error: class, interface, or enum expected
pt.push_back( make_pair(x,y) );
^
Main.java:39: error: class, interface, or enum expected
}
^
Main.java:40: error: class, interface, or enum expected
for (int i=1;i<=k;++i)
^
Main.java:40: error: class, interface, or enum expected
for (int i=1;i<=k;++i)
^
Main.java:41: error: class, interface, or enum expected
for (int j=1;j<=k;++j)
^
Main.java:41: error: class, interface, or enum expected
for (int j=1;j<=k;++j)
^
Main.java:43: error: class, interface, or enum expected
ds[0][k+1] = ds[k+1][0] = 1<<30;
^
Main.java:44: error: class, interface, or enum expected
for (int i=1;i<=k;++i)
^
Main.java:44: error: class, interface, or enum expected
for (int i=1;i<=k;++i)
^
Main.java:44: error: class, interface, or enum expected
for (int i=1;i<=k;++i)
^
Main.java:47: error: class, interface, or enum expected
ds[i][k+1] = ds[k+1][i] = (m-pt[i-1].y)*(m-pt[i-1].y);
^
Main.java:48: error: class, interface, or enum expected
}
^
Main.java:49: error: class, interface, or enum expected
for (int i=1;i<=k+1;++i)
^
Main.java:49: error: class, interface, or enum expected
for (int i=1;i<=k+1;++i)
^
Main.java:51: error: class, interface, or enum expected
int n = 0;
^
Main.java:52: error: class, interface, or enum expected
for (int i=1;i<=k+1;++i)
^
Main.java:52: error: class, interface, or enum expected
for (int i=1;i<=k+1;++i)
^
Main.java:52: error: class, interface, or enum expected
for (int i=1;i<=k+1;++i)
^
Main.java:55: error: class, interface, or enum expected
int ans = 1<<30;
^
Main.java:56: error: class, interface, or enum expected
for (int j=1;j<=k+1;++j)
^
Main.java:56: error: class, interface, or enum expected
for (int j=1;j<=k+1;++j)
^
Main.java:56: error: class, interface, or enum expected
for (int j=1;j<=k+1;++j)
^
Main.java:60: error: class, interface, or enum expected
ans = min(ans,d[j]);
^
Main.java:61: error: class, interface, or enum expected
}
^
Main.java:62: error: class, interface, or enum expected
for (int j=1;j<=k+1;++j)
^
Main.java:62: error: class, interface, or enum expected
for (int j=1;j<=k+1;++j)
^
Main.java:66: error: class, interface, or enum expected
break;
^
Main.java:67: error: class, interface, or enum expected
}
^
Main.java:71: error: class, interface, or enum expected
return 0;
^
Main.java:72: error: class, interface, or enum expected
}
^
55 errors