結果
| 問題 |
No.3041 非対称じゃんけん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-01 12:50:14 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 1,952 ms / 2,200 ms |
| コード長 | 561 bytes |
| コンパイル時間 | 4,351 ms |
| コンパイル使用メモリ | 309,984 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2025-03-01 12:50:34 |
| 合計ジャッジ時間 | 19,173 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 30 |
ソースコード
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
int N, F;
cin >> N >> F;
vector<int> A(N), B(N), C(N);
for(auto&x: A) cin >> x;
for(auto&x: B) cin >> x;
for(auto&x: C) cin >> x;
const int M = 60 * 15000 + 1;
bitset<M> dp;
dp.set(0);
for(int i = 0; i < N; i++) {
bitset<M> ndp;
ndp |= dp << A[i];
ndp |= dp << B[i];
ndp |= dp << C[i];
dp = ndp;
cout << ndp.count() << "\n";
}
}