QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#723010 | #8332. Two in One | jokerT | WA | 0ms | 3556kb | C++20 | 908b | 2024-11-07 20:55:00 | 2024-11-07 20:55:00 |
Judging History
answer
/*
*/
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define sqrt(a) sqrtl(a)
#define abs(a) llabs(a)
#define pow(a) powl(a)
typedef pair<int,int> pi ;
#define if1(x) for(int i =1 ;i<=x;i++)
#define if0(x) for(int i = 0;i<x;i++)
#define jf0(x) for(int j = 0;j<x;j++)
#define jf1(x) for(int j = 1;j<=x;j++)
#define pb push_back
const int mod = 1e9+7;
const int inf = 0x3f3f3f3f;
const int N = 2e5+10;
void solve(){
int m,n;
cin>>m;
map<int,int> mp;
int ans = 0;
if0(n){
cin>>m;
mp[m]++;
auto a = mp.rbegin();
auto b = prev(a);
ans = max(ans,a->second | b->second);
}
cout<<ans<<endl;
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int t=1;
cin>>t;
while (t--)
{
solve();
}
return 0;
}
/*
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3556kb
input:
1 7 1 2 3 4 3 2 1
output:
0
result:
wrong answer 1st numbers differ - expected: '3', found: '0'