From 23e95a90df7df4893ed4843c09658f6cc7c838a4 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 25 Jun 2022 22:43:20 +0800 Subject: [PATCH] A - NIT orz! https://codeforces.com/contest/1696/submission/161739532 --- Codeforces/1696/A/A.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Codeforces/1696/A/A.cpp diff --git a/Codeforces/1696/A/A.cpp b/Codeforces/1696/A/A.cpp new file mode 100644 index 00000000..6ae5594f --- /dev/null +++ b/Codeforces/1696/A/A.cpp @@ -0,0 +1,31 @@ +#include + +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; +}