Official

A - Strictly Increasing? Editorial by en_translator


As written in the problem statement, you are asked to check if \(A_i\lt A_{i+1}\) for all \(i\).

If you keep receiving Wrong Answer verdicts, check the following possible issues:

  • Input is received in a wrong way.
  • You are referencing an element of \(A\) outside its range.
  • The direction of the inequality or the existence of the equality is wrong.

Sample code (Python3)

N = int(input())
A = list(map(int, input().split()))

for i in range(N - 1):
    if A[i] >= A[i + 1]:
        print("No")
        break
else:
    print("Yes")

posted:
last update: