No.3249 AND
問題文最終更新日: 2026-10-20 14:55:56
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 480 (Gemini Tester)
(順位表)
の他の問題:
Note
As a first-time experiment, Gemini 2.5 Pro was made the tester for this problem.
Problem Statement
[2025/8/30] The constraints have been changed.
You are given an array $b$ of length $n$. For every $1 \le i \le n$, $b_i = i \operatorname{AND} x$ holds. Find the smallest positive integer $x$ satisfying the condition. If no solution exists, print −1.
Input
$n$ $b_1\ b_2\ \cdots\ b_n$
Output
Print the smallest $x$ satisfying the condition. If no solution exists, print −1.
Sample
Sample 1
Input
4 0 2 2 0
Output
2
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
yukicoder