How do I interpret this Boolean expression

53 Views Asked by At

Please help me to understand this Boolean expression: $$1 < a_i < 10^6$$ My first guess is this: One less than a modulo i and also less than 10 to the 6th power. Is my interpretation correct? For context, this is part of a constraint to a problem that I'm trying to solve at HackerRank: Screenshot from problem screen

2

There are 2 best solutions below

0
On BEST ANSWER

$a_i$ is a positive integer. It is an entry of the array.

$a_i$ is the $i$-th entry of the array $a$. $i$ is the index here.

We are told that $a_i$ is an integer that is bigger than $1$ and less than $10^6$.

For example, it is possible that $a_2 = 100$ but we won't have $a_2 = 10^6+1$, we also won't have $a_3=1$.

1
On

In this problem specification, the constraints of the form $$ a \leq b \leq c $$ mean $b \in [a,c] \cap \mathbb{Z}$. That is, $b$ is an integer in the range $[a,c]$.

In this problem specification, $n$ is between $1$ and $10^5$, inclusive, $d$ is between $1$ and $n$, inclusive. And the $n$ space separated integers on the second line of the input are $a_1, a_2, \dots, a_n$. Each of these is between $1$ and $10^6$, inclusive.