← Home
For problem statement at 1000-1999/1500-1599/1510-1519/1516/problemC.txt this is a correct solution, but verifier at 1000-1999/1500-1599/1510-1519/1516/verifierC.go ends with All 100 tests passed can you fix the verifier? ```go
package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	var n int
	fmt.Fscan(in, &n)
	a := make([]int, n)
	sum := 0
	for i := 0; i < n; i++ {
		fmt.Fscan(in, &a[i])
		sum += a[i]
	}

	if sum%2 == 1 {
		fmt.Println(0)
		fmt.Println()
		return
	}

	target := sum / 2
	dp := make([]bool, target+1)
	dp[0] = true
	for _, v := range a {
		for s := target; s >= v; s-- {
			if dp[s-v] {
				dp[s] = true
			}
		}
	}

	if !dp[target] {
		fmt.Println(0)
		fmt.Println()
		return
	}

	idx := -1
	for i := 0; i < n; i++ {
		if a[i]%2 == 1 {
			idx = i
			break
		}
	}
	if idx != -1 {
		fmt.Println(1)
		fmt.Println(idx + 1)
		return
	}

	minTwos := 1 << 30
	minIdx := 0
	for i := 0; i < n; i++ {
		x := a[i]
		cnt := 0
		for x%2 == 0 {
			x /= 2
			cnt++
		}
		if cnt < minTwos {
			minTwos = cnt
			minIdx = i
		}
	}
	fmt.Println(1)
	fmt.Println(minIdx + 1)
}
```