結果
| 問題 |
No.3041 非対称じゃんけん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-28 22:35:49 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2,190 ms / 2,200 ms |
| コード長 | 560 bytes |
| コンパイル時間 | 1,965 ms |
| コンパイル使用メモリ | 200,752 KB |
| 実行使用メモリ | 8,228 KB |
| 最終ジャッジ日時 | 2025-02-28 22:36:08 |
| 合計ジャッジ時間 | 18,536 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
void solve() {
ll n, F;
cin >> n >> F;
vector a(3, vector<ll>(n));
rep(j, 3) rep(i, n) cin >> a[j][i];
bitset<900010> bs, nex;
bs.set(0, true);
rep(i, n) {
rep(j, 3) nex |= (bs << a[j][i]);
cout << nex.count() << '\n';
swap(bs, nex);
nex.reset();
}
}
int main() {
std::cin.tie(nullptr);
std::ios_base::sync_with_stdio(false);
int T = 1;
for (int t = 0; t < T; t++) {
solve();
}
return 0;
}