結果

問題 No.3041 非対称じゃんけん
ユーザー neet
提出日時 2025-02-28 22:32:41
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 1,867 ms / 2,200 ms
コード長 732 bytes
コンパイル時間 3,635 ms
コンパイル使用メモリ 280,548 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2025-02-28 22:33:00
合計ジャッジ時間 16,741 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
// #include<atcoder/all>
// using mint = atcoder::modint998244353;
using ld = long double;
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define chmax(a,b) a=max(a,b)
#define chmin(a,b) a=min(a,b)

#pragma GCC optimize("O3")

int N,F;
int A[15000],B[15000],C[15000];
bitset<900001> dp,np;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    cin>>N>>F;
    rep(i,N)cin>>A[i];
    rep(i,N)cin>>B[i];
    rep(i,N)cin>>C[i];
    dp[0]=1;
    rep(i,N){
        np.reset();
        np|=(dp<<A[i]);
        np|=(dp<<B[i]);
        np|=(dp<<C[i]);
        cout<<np.count()<<"\n";
        dp=np;
    }
}
0