| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 38464 | 李羽乔 | 【S】T2 | C++ | 解答错误 | 20 | 664 MS | 756 KB | 734 | 2025-10-08 15:33:32 |
#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=1;j<=16383;j++){ b[j^x]=a[j]; } for(int j=1;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=1;j<=16383;j++){ a[j]=(a[j]%md+b[j]%md)%md; } } else{ cout<<(dp[x]%md+a[x]%md)%md<<endl; } } return 0; }