結果
問題 |
No.3041 非対称じゃんけん
|
ユーザー |
|
提出日時 | 2025-02-28 22:08:06 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 739 bytes |
コンパイル時間 | 3,317 ms |
コンパイル使用メモリ | 279,464 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-02-28 22:08:28 |
合計ジャッジ時間 | 20,819 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 27 TLE * 3 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll=long long; #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template<class T> bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template<class T> bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} void Solve(){ int N,F; cin>>N>>F; vector<int>A(N),B(N),C(N); for(int i=0;i<N;i++)cin>>A[i]; for(int i=0;i<N;i++)cin>>B[i]; for(int i=0;i<N;i++)cin>>C[i]; bitset<900001>BS; BS[0]=1; int now=0; for(int i=0;i<N;i++){ BS=(BS<<A[i])|(BS<<B[i])|(BS<<C[i]); cout<<BS.count()<<"\n"; } } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); Solve(); }