結果

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    bitset<900001> dp;
    dp.set(0);
    int N,F; cin >> N >> F;
    vector<int> A(N),B(N),C(N);
    for(auto &a : A) cin >> a;
    for(auto &a : B) cin >> a;
    for(auto &a : C) cin >> a;


    for(int i=0; i<N; i++){
        int a = A.at(i),b = B.at(i),c = C.at(i);
        if(a < b) swap(a,b);
        if(b < c) swap(b,c);
        if(a < b) swap(a,b);

        if(a != b && b == c) dp |= (dp<<(a-b));
        else if(a != b && b != c) dp |= (dp<<(a-c))|(dp<<(b-c));
        cout << dp.count() << "\n";
    }
}
0