#T2282. Xor Pyramid Peak
Xor Pyramid Peak
链接: https://cses.fi/problemset/task/2419
板块: Bitwise Operations
时限: 1.00 s | 内存: 512 MB
题目描述
Consider a xor pyramid where each number is the xor of lower-left and lower-right numbers. The pyramid示意图见:https://cses.fi/file/382652cc16953396bbaeeabf0e98daec74a4bda09afb8db8da0e67870205fc76
Given the bottom row of the pyramid, your task is to find the topmost number.
输入
The first line has an integer : the size of the pyramid.
The next line has integers : the bottom row of the pyramid.
输出
Print one integer: the topmost number.
数据范围
样例输入
8
2 10 5 12 9 5 1 5
样例输出
9
鲁公网安备37011202002910号