数据过水&请求加强数据
查看原帖
数据过水&请求加强数据
437243
cly312楼主2024/8/31 10:58

前情提要

甚至这题都不用卡到960ms。

我突然发现这题卡10ms能拿60分,50ms能拿80分,100ms能拿100分:

ACcode:

#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*10) break;
		}
	cout<<ans;
	return 0;
}
2024/8/31 10:58
加载中...