提交记录 28857
| 提交时间 |
评测时间 |
| 2026-01-26 19:26:41 |
2026-01-26 19:27:11 |
#include<bits/stdc++.h>
bool Mbg;
using namespace std;
#define vec vector
#define pb push_back
#define eb emplace_back
#define siz(vec) (int)((vec).size())
#define all(vec) (vec).begin(),(vec).end()
template<class T>
void operator +=(vec<T> &lhs,const T &rhs){lhs.push_back(rhs);}
#define pii pair<int,int>
#define x first
#define y second
#define mp make_pair
#define exc(expr) if(expr)continue;
#define stop(expr) if(expr)break;
#define ret(expr) if(expr)return;
#define deb(var) cerr<<#var<<'='<<(var)<<"; "
#define debl(var) cerr<<#var<<'='<<(var)<<";\n"
#define ins insert
#define era erase
#define lb lower_bound
#define ub upper_bound
#define ll long long
#define inf (long long)(1.1e18)
template<class T>
bool Min(T &x,const T &y){return x>y?x=y,1:0;}
template<class T>
bool Max(T &x,const T &y){return x<y?x=y,1:0;}
const int mod=998244353;
void Add(int &x,const int &y){x=x+y<mod?x+y:x+y-mod;}
void Dec(int &x,const int &y){x=x>=y?x-y:x-y+mod;}
int fpm(int x,int y){
int ans=1;for(;y;y>>=1,x=1ll*x*x%mod)if(y&1)ans=1ll*x*ans%mod;return ans;
}
inline constexpr int hole(int x){
return x+(x>>10);
}
unsigned w[hole(2000000)+5];
void add(int i,unsigned x){
for(;i<=2e6;i+=i&(-i))w[hole(i)]+=x;
}
unsigned qry(int i){
unsigned ans=0;
for(;i;i-=i&(-i))ans+=w[hole(i)];
return ans;
}
int n,m;
mt19937 eng(time(0));
void work(){
n=2e6;m=2e7;
unsigned ans=0;
while(m--){
int op,x;
op=eng()%2;
x=eng()%n+1;
if(op){
add(x,eng());
}else{
ans^=qry(x);
}
}
cout<<ans<<'\n';
}
bool Med;
signed main(){
ios::sync_with_stdio(0),
cin.tie(0),cout.tie(0);
int T=1;while(T--)work();
// cerr<<"Time: "<<clock()<<" ms;\n";
// cerr<<"Memory: "<<abs(&Med-&Mbg)/1024.0/1024.0<<" MiB.\n";
}
/*
- CONTINUE, NON-STOPPING, FOR THE FAITH
- START TYPING IF YOU DON'T KNOW WHAT TO DO
- STOP TYPING IF YOU DON'T KNOW WHAT YOU'RE DOING
*/
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #2 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #3 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #4 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #5 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #6 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #7 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #8 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #9 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #10 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #11 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #12 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #13 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #14 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #15 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #16 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #17 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #18 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #19 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #20 | 1.212 s | 7 MB + 716 KB | Wrong Answer | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-02-21 08:52:40 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠