← Home
For problem statement at 0-999/700-799/750-759/755/problemB.txt this is a correct solution, but verifier at 0-999/700-799/750-759/755/verifierB.go ends with All 100 tests passed can you fix the verifier? package main

import (
	"fmt"
)

func main() {
	var n, m int
	if _, err := fmt.Scan(&n, &m); err != nil {
		return
	}
	words := make(map[string]bool)
	for i := 0; i < n; i++ {
		var s string
		fmt.Scan(&s)
		words[s] = true
	}
	c := 0
	for i := 0; i < m; i++ {
		var s string
		fmt.Scan(&s)
		if words[s] {
			c++
		}
	}
	if n > m || (n == m && c%2 == 1) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}