← Home
For problem statement at 0-999/900-999/960-969/967/problemA.txt this is a correct solution, but verifier at 0-999/900-999/960-969/967/verifierA.go ends with All tests passed can you fix the verifier? ```go
package main

import (
	"fmt"
)

func main() {
	var n, s int
	fmt.Scan(&n, &s)

	times := make([]int, n)
	for i := 0; i < n; i++ {
		var h, m int
		fmt.Scan(&h, &m)
		times[i] = h*60 + m
	}

	// Check if takeoff is possible before the first landing
	// We need a gap of s minutes after takeoff (which ends at minute 1)
	// So landing must start at s + 1 or later
	if times[0] >= s+1 {
		fmt.Println(0, 0)
		return
	}

	// Check for gaps between landings
	for i := 0; i < n-1; i++ {
		// Current landing ends at times[i] + 1
		// Next landing starts at times[i+1]
		// We need to fit: s gap + 1 takeoff + s gap = 2*s + 2 minutes
		if times[i+1]-times[i] >= 2*s+2 {
			ans := times[i] + s + 1
			fmt.Println(ans/60, ans%60)
			return
		}
	}

	// If no suitable gap found, place takeoff after the last landing
	// Last landing ends at times[n-1] + 1
	// Need s gap before takeoff
	ans := times[n-1] + s + 1
	fmt.Println(ans/60, ans%60)
}
```