| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 38466 | 李羽乔 | 【S】T2 | C++ | 通过 | 100 | 903 MS | 760 KB | 870 | 2025-10-08 15:37:53 |
#include<bits/stdc++.h> using namespace std; const int N = 16400; const int md = 998244353; int k,q,a[N]; long long dp[N],b[N]; int main(){ cin>>k>>q; a[k]=1ll; for(int i=1;i<=q;i++){ int op,x; cin>>op>>x; if(op==1){ for(int j=0;j<=16383;j++) b[j]=0; for(int j=0;j<=16383;j++){ int tmp=j^x; if(tmp>16383) continue; b[j^x]=(b[j^x]%md+a[j]%md)%md; } for(int j=0;j<=16383;j++){ int tmp=j^x; if(tmp>16383) continue; dp[j^x]=(dp[j^x]%md+a[j]%md)%md; } for(int j=0;j<=16383;j++){ a[j]=(a[j]%md+b[j]%md)%md; } } else{ cout<<(dp[x]%md+a[x]%md)%md<<endl; } } return 0; }