Chef Is Just Throwing Random Words SOLUTION
Chef once had a deep epiphany and ended up saying: Given a sequence of positive integers a1,a2,…,aN, if you take each of its 2N subsequences and write down the sum of elements of this subsequence, what will the bitwise OR of the written integers be?
Yes, you read it right, but can you solve it?
The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows.
The first line of each test case contains a single integer N.
The second line contains N space-separated integers a1,a2,…,aN.
For each test case, print a single line containing one integer ― the bitwise OR of sums of all subsequences.
1≤ai<230 for each valid i
Subtask #1 (100 points): original constraints
1 9 8
SOLUTION AFTER CONTEST
ESET FREE LINCENSE KEYS UPDATED 2020 : https://www.cybergeeksquad.co/2020/11/eset-free-lincense-keys-updated-2020.html
Chegg FREE Premium Accounts:
Udemy Leak Courses:
November Challenge 2020 SOLUTION CodeChef
- Selecting Edges SOLUTION SELEDGE
- Panic! at the Disco SOLUTION PANIC
- Restore Sequence SOLUTION RESTORE
October Lunchtime 2020 CodeChef SOLUTIONS