QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#187737 | #7112. XOR Clique | UrgantTeam# | RE | 0ms | 0kb | C++23 | 815b | 2023-09-24 21:35:24 | 2023-09-24 21:35:24 |
answer
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <array>
#include <vector>
#include <tuple>
#include <algorithm>
#include <cstdint>
using namespace std;
using vi = vector<int>;
int find_ans(const vi& v) {
vi u(32);
for (int i : v) {
int j;
for (j = 31; j >= 0; --j)
if (i & 1 << j)
break;
++u[j];
}
return *max_element(u.begin(), u.end());
}
bool solve_test() {
int n;
if (!(cin >> n))
return false;
vi a(n);
for (int& i : a)
cin >> i;
cout << find_ans(a) << '\n';
return true;
}
void solve_tests() {
int t;
cin >> t;
for (int i = 0; i < t; ++i)
solve_test();
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
solve_tests();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Dangerous Syscalls
input:
3 3 1 2 3 3 1 1 1 5 1 2323 534 534 5