#include <bits/stdc++.h>
using namespace std;
int n, m, x, y;
int f[2333][2333];
int xx[232333], yy[232323];
inline double get_dist(int x, int y) {
return sqrt(x * x + y * y);
}
bool dfs(int x, int y) {
if (get_dist(x, y) > m)
return f[x + 500][y + 500] = true;
if (f[x + 500][y + 500])
return f[x + 500][y + 500];
for (int i = 1; i <= n; i ++)
if (!dfs(x + xx[i], y + yy[i]))
return f[x + 500][y + 500] = true;
return f[x + 500][y + 500] = false;
}
signed main() {
cin >> x >> y >> n >> m;
for (int i = 1; i <= n; i ++)
cin >> xx[i] >> yy[i];
if (dfs(x, y))
cout << "Anton\n";
else
cout << "Dasha\n";
return 0;
}
CodeForces 69D【水题】【博弈论】
最新推荐文章于 2022-08-03 15:04:32 发布