結果

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

ソースコード

diff #

#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; ++i)
#define all(x) (x).begin(),(x).end()
int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n,f;
    cin >> n >> f;
    bitset<900001> bit(1);
    vector<vector<int>> a(n,vector<int>(3));
    rep(i,3)rep(j,n) cin >> a[j][i];
    rep(i,n){
        sort(all(a[i]));
        bit |= ((bit<<(a[i][1]-a[i][0])) | (bit<<(a[i][2]-a[i][0])));
        cout << bit.count() << '\n';
    }
    return 0;
}
0