← Home
For problem statement at 0-999/0-99/60-69/69/problemD.txt this is a correct solution, but verifier at 0-999/0-99/60-69/69/verifierD.go ends with All tests passed can you fix the verifier? ```go
package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

type Vec struct {
	x, y int
}

var (
	d2   int
	vecs []Vec
	memo [401][401][2][2][2]int8
)

func win(x, y, ra, rd, turn int) bool {
	p := &memo[x+200][y+200][ra][rd][turn]
	if *p != 0 {
		return *p == 2
	}

	if turn == 0 {
		if ra == 1 {
			if !win(y, x, 0, rd, 1) {
				*p = 2
				return true
			}
		}
		for _, v := range vecs {
			nx, ny := x+v.x, y+v.y
			if nx*nx+ny*ny <= d2 {
				if !win(nx, ny, ra, rd, 1) {
					*p = 2
					return true
				}
			}
		}
	} else {
		if rd == 1 {
			if !win(y, x, ra, 0, 0) {
				*p = 2
				return true
			}
		}
		for _, v := range vecs {
			nx, ny := x+v.x, y+v.y
			if nx*nx+ny*ny <= d2 {
				if !win(nx, ny, ra, rd, 0) {
					*p = 2
					return true
				}
			}
		}
	}

	*p = 1
	return false
}

func readInts() []int {
	data, _ := io.ReadAll(os.Stdin)
	res := make([]int, 0, 64)
	sign, num, in := 1, 0, false
	for _, c := range data {
		if c == '-' {
			sign = -1
			num = 0
			in = true
		} else if c >= '0' && c <= '9' {
			if !in {
				sign = 1
				num = 0
				in = true
			}
			num = num*10 + int(c-'0')
		} else if in {
			res = append(res, sign*num)
			sign, num, in = 1, 0, false
		}
	}
	if in {
		res = append(res, sign*num)
	}
	return res
}

func main() {
	vals := readInts()
	x, y := vals[0], vals[1]
	n := (len(vals) - 4) / 2
	d := vals[3]
	if vals[2] != n {
		d = vals[2]
	}
	vecs = make([]Vec, 0, n)
	for i := 4; i+1 < len(vals); i += 2 {
		vecs = append(vecs, Vec{vals[i], vals[i+1]})
	}
	d2 = d * d

	out := bufio.NewWriter(os.Stdout)
	if win(x, y, 1, 1, 0) {
		fmt.Fprint(out, "Anton")
	} else {
		fmt.Fprint(out, "Dasha")
	}
	out.Flush()
}
```