社区讨论
数据过水&请求加强数据
P10471最大异或对 The XOR Largest Pair参与者 3已保存回复 5
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 5 条
- 当前快照
- 1 份
- 快照标识符
- @m0hk1ivb
- 此快照首次捕获于
- 2024/08/31 10:59 2 年前
- 此快照最后确认于
- 2025/11/04 21:57 4 个月前
甚至这题都不用卡到960ms。
我突然发现这题卡10ms能拿60分,50ms能拿80分,100ms能拿100分:
ACcode:
CPP#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;
}
回复
共 5 条回复,欢迎继续交流。
正在加载回复...