← Home
For problem statement at 1000-1999/1700-1799/1710-1719/1710/problemA.txt this is a correct solution, but verifier at 1000-1999/1700-1799/1710-1719/1710/verifierA.go ends with All tests passed can you fix the verifier? ```go
package main

import (
	"bufio"
	"os"
	"strconv"
)

func main() {
	in := bufio.NewScanner(os.Stdin)
	in.Split(bufio.ScanWords)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()

	nextInt := func() int {
		in.Scan()
		x, _ := strconv.Atoi(in.Text())
		return x
	}

	solve := func() {
		n := nextInt()
		m := nextInt()
		k := nextInt()
		a := make([]int, k)
		for i := 0; i < k; i++ {
			a[i] = nextInt()
		}

		check := func(target, other int) bool {
			var total int64
			hasOdd := false
			for _, val := range a {
				cnt := val / other
				if cnt >= 2 {
					total += int64(cnt)
					if cnt%2 != 0 || cnt >= 3 {
						// If cnt is odd, it's >= 3. If cnt is even >= 2, we need to know if we can make odd.
						// Actually, if cnt >= 3, we can always choose 3 (odd) or 2 (even).
						// If cnt == 2, we can only choose 2 (even).
						// So "can produce odd contribution" <=> cnt >= 3.
						if cnt >= 3 {
							hasOdd = true
						}
					}
				}
			}
			if total < int64(target) {
				return false
			}
			if target%2 != 0 && !hasOdd {
				return false
			}
			return true
		}

		if check(n, m) || check(m, n) {
			out.WriteString("Yes\n")
		} else {
			out.WriteString("No\n")
		}
	}

	t := nextInt()
	for i := 0; i < t; i++ {
		solve()
	}
}
```