#P14664. [KenOI 2025] 异或题
[KenOI 2025] 异或题
Description
Given queries, each with a non-negative integer . Find two integers and that satisfy the following conditions:
means bitwise xor.
Maximize .
Input Format
Each test case contains multiple data sets. You will only receive the score for a test case if you pass all its data sets.
The first line contains an integer .
The next lines each contains an integer .
Output Format
lines, each contains an integer representing the maximum of .
6
1
2
3
4
5
6
1
2
3
4
5
8
Hint
Example explanation
There are a total of queries.
-
For the fifth query, is a possible choice;
-
For the sixth query, is a possible choice.
Data Volume and Conventions
This problem is divided into subtasks. Your score in a subtask is the minimum score across all its test cases.
This problem uses subtask dependencies. You will not receive the score for a subtask unless you achieve full points on all its dependent subtasks.
| Subtask | Score | Dependencies | ||
|---|---|---|---|---|
| none | ||||
For all of the cases, .
京公网安备 11011102002149号