結果
| 問題 |
No.3041 非対称じゃんけん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-28 22:09:35 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 850 bytes |
| コンパイル時間 | 6,091 ms |
| コンパイル使用メモリ | 332,360 KB |
| 実行使用メモリ | 8,232 KB |
| 最終ジャッジ日時 | 2025-02-28 22:09:47 |
| 合計ジャッジ時間 | 11,589 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 20 TLE * 1 -- * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using mint = atcoder::static_modint<998244353>;
// using mint = atcoder::static_modint<1000000007>;
using ld = long double;
using ll = long long;
#define mp(a,b) make_pair(a,b)
#define rep(i,s,n) for(int i=s; i<(int)n; i++)
const vector<int> dx{1,0,-1,0},dy{0,1,0,-1};
int main(){
int n,f;cin >> n >> f;
vector<int> a(n);rep(i,0,n)cin >> a[i];
vector<int> b(n);rep(i,0,n)cin >> b[i];
vector<int> c(n);rep(i,0,n)cin >> c[i];
vector<bool> dp(n*f+1);
dp[0]=true;
rep(i,0,n){
vector<bool> dp2(n*f+1);
rep(j,0,n*f+1)if(dp[j]){
dp2[j+a[i]]=true;
dp2[j+b[i]]=true;
dp2[j+c[i]]=true;
}
swap(dp,dp2);
cout << accumulate(dp.begin(),dp.end(),0) << "\n";
}
}