请求加强数据
查看原帖
请求加强数据
437243
cly312楼主2024/8/25 11:07

RT,此题暴力卡时也能AC。(而且还不用快读)

#include<bits/stdc++.h>
using namespace std;
int a[100010];
int n,ans;
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int t=clock();
	cin>>n;
	for(int i=0;i<n;++i)cin>>a[i];
	for(int i=0;i<n;++i)
		for(int j=i+1;j<n;++j){
			ans=max(ans,a[i]^a[j]);
			if(clock()*100>=CLOCKS_PER_SEC*96) break;
		}
	cout<<ans;
	return 0;
}
2024/8/25 11:07
加载中...