結果
問題 |
No.3041 非対称じゃんけん
|
ユーザー |
![]() |
提出日時 | 2025-02-28 22:25:33 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2,013 ms / 2,200 ms |
コード長 | 782 bytes |
コンパイル時間 | 6,261 ms |
コンパイル使用メモリ | 332,348 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-02-28 22:25:57 |
合計ジャッジ時間 | 20,257 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 30 |
ソースコード
#ifndef ONLINE_JUDGE #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> #include <atcoder/all> #define pass (void)0 #define INF (1<<30)-1 #define INFLL (1LL<<60)-1 using namespace std; using namespace atcoder; using mint = modint998244353; using ll = long long; int main() { int N, F; cin >> N >> F; vector<int> A(N); vector<int> B(N); vector<int> 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> BIT; BIT.set(0, 1); for (int i=0; i<N; i++) { int MIN = min(A[i], min(B[i], C[i])); A[i] -= MIN; B[i] -= MIN; C[i] -= MIN; BIT |= (BIT<<A[i])|(BIT<<B[i])|(BIT<<C[i]); cout << BIT.count() << endl; } }