mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-27 14:36:27 +00:00
parent
fe3caadd4a
commit
23e95a90df
31
Codeforces/1696/A/A.cpp
Normal file
31
Codeforces/1696/A/A.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
#include <iostream>
|
||||
|
||||
using std::cin;
|
||||
using std::cout;
|
||||
const char endl = '\n';
|
||||
|
||||
int t, n, z;
|
||||
long long a, x;
|
||||
|
||||
int main() {
|
||||
std::ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
|
||||
cin >> t;
|
||||
|
||||
while (t--) {
|
||||
a = 0;
|
||||
|
||||
cin >> n >> z;
|
||||
|
||||
for (int i = 1; i <= n; i++) {
|
||||
cin >> x;
|
||||
|
||||
a = std::max(a, x | z);
|
||||
}
|
||||
|
||||
cout << a << endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user