Given an integer number and numbers , are there at least two equal numbers at distance at most ? Consider the sequence of ’s circularly, that is, assume that is to the right of .
Input consists of several cases, each with and , followed by . You can assume , , and that each is an integer number between 0 and .
For every case, print “yes” if there is at least a pair
of
’s
with the required condition, and print “no” otherwise.
Author: Javier Nistal
Generation: 2026-01-25T11:16:33.182Z
© Jutge.org, 2006–2026.
https://jutge.org