← Home
For problem statement at 0-999/800-899/800-809/807/problemA.txt this is a correct solution, but verifier at 0-999/800-899/800-809/807/verifierA.go ends with All tests passed. can you fix the verifier? package main

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

func main() {
	in := bufio.NewReader(os.Stdin)

	var n int
	fmt.Fscan(in, &n)

	a := make([]int, n)
	b := make([]int, n)

	for i := 0; i < n; i++ {
		fmt.Fscan(in, &a[i], &b[i])
		if a[i] != b[i] {
			fmt.Print("rated")
			return
		}
	}

	for i := 1; i < n; i++ {
		if a[i] > a[i-1] {
			fmt.Print("unrated")
			return
		}
	}

	fmt.Print("maybe")
}