牛客练习赛67b,二进制,牛牛爱位运算
牛牛爱位运算
https://ac.nowcoder.com/acm/contest/6885/B
B这个题目就考了二进制,&且运算得到的结果只会更小,所以我们只要取最大的数即可
如果可以的话点个赞和关注吧,谢谢大家对本题解的支持
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n, a;
void work(){
cin>>n;
ll ans=0;
for(ll i=0;i<n;i++)
cin>>a, ans=max(a,ans);
cout<<ans<<endl;
return ;
}
int main(){
ll t;
for(cin>>t;t--;)
work();
return 0;
}
牛客练习赛67 文章被收录于专栏
牛客练习赛67的题解
顺丰集团工作强度 369人发布
