QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#158490 | #7112. XOR Clique | ucup-team1087# | Compile Error | / | / | C++14 | 661b | 2023-09-02 16:36:05 | 2023-09-02 16:36:05 |
Judging History
answer
//
// main.cpp
// XOR Clique
//
// Created by SkyWave Sun on 2023/9/2.
//
#include <iostream>
#include <cmath>
#include <set>
#include <map>
using namespace std;
#define N (int)1e5 + 1
int a[N];
int main(int argc, const char * argv[]) {
int T;
scanf("%d", &T);
while (T--) {
int n;
scanf("%d", &n);
map<int, int> mp;
for (int i = 1; i <= n; ++i) {
scanf("%d", &a[i]);
++mp[(int)log2(a[i])];
}
int ans = INT_MIN;
for (auto &i : mp) {
ans = max(ans, i.second);
}
printf("%d\n", ans);
}
return 0;
}
Details
answer.code: In function ‘int main(int, const char**)’: answer.code:26:19: error: ‘INT_MIN’ was not declared in this scope 26 | int ans = INT_MIN; | ^~~~~~~ answer.code:12:1: note: ‘INT_MIN’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’? 11 | #include <map> +++ |+#include <climits> 12 | using namespace std; answer.code:17:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 17 | scanf("%d", &T); | ~~~~~^~~~~~~~~~ answer.code:20:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 20 | scanf("%d", &n); | ~~~~~^~~~~~~~~~ answer.code:23:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 23 | scanf("%d", &a[i]); | ~~~~~^~~~~~~~~~~~~