結果
| 問題 |
No.1304 あなたは基本が何か知っていますか?私は知っています.
|
| コンテスト | |
| ユーザー |
tempura_pp
|
| 提出日時 | 2020-12-01 01:58:59 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 939 bytes |
| コンパイル時間 | 1,055 ms |
| コンパイル使用メモリ | 118,856 KB |
| 実行使用メモリ | 18,056 KB |
| 最終ジャッジ日時 | 2025-06-22 02:27:06 |
| 合計ジャッジ時間 | 6,434 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 WA * 1 RE * 2 TLE * 1 -- * 67 |
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
constexpr int inf=1e9+7;
constexpr ll longinf=1LL<<60 ;
constexpr ll mod=998244353 ;
ll dp[30][30][1024];
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n,k,x,y;
cin>>n>>k>>x>>y;
vector<int> a(k);
rep(i,k)cin>>a[i];
dp[0][k][0]=1;
rep(i,n){
rep(j,k){
rep(l,1024){
rep(t,k+1)if(t!=j)dp[i+1][j][l]+=dp[i][t][l^a[j]];
}
}
}
ll ans = 0;
rep(j,k)REP(t,x,y+1)ans+=dp[n][j][t];
cout<<ans%mod<<endl;
return 0;
}
tempura_pp