爆零求助

P3293 [SCOI2016] 美味

@[XY_cpp](/space/show?uid=53410) Orz
by Siyuan @ 2019-08-03 11:26:14


@[XY_cpp](/space/show?uid=53410) Orz
by x义x @ 2019-08-03 11:26:52


@[Siyuan](/space/show?uid=49725) ```cpp // luogu-judger-enable-o2 #pragma GCC optimize("O3") #include<bits/stdc++.h> using namespace std; const int N=2e5+1; int a[N],b[N],x[N],l[N],r[N]; int main() { int n,m; scanf("%d%d",&n,&m); for(int i=1;i<=n;++i) scanf("%d",&a[i]); for(int i=1;i<=m;++i) scanf("%d%d%d%d",&b[i],&x[i],&l[i],&r[i]); for(int i=1;i<=m;++i) { int res=0; for(int j=l[i];j<=r[i];++j) { int now=b[i]^(a[j]+x[i]); res=max(res,now); } printf("%d\n",res); } return 0; } ``` 然而n方暴力过又是为什么呢
by XY_cpp @ 2019-08-03 11:28:33


@[XY_cpp](/space/show?uid=53410) Orz
by zrzluck99 @ 2019-08-03 11:29:36


%%%
by _Felix @ 2019-08-03 11:42:40


n方过十万(ΩДΩ)
by _Felix @ 2019-08-03 11:43:31


|