結果
問題 | No.3041 非対称じゃんけん |
ユーザー |
![]() |
提出日時 | 2025-03-01 12:19:12 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 951 bytes |
コンパイル時間 | 1,155 ms |
コンパイル使用メモリ | 101,252 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-03-01 12:19:32 |
合計ジャッジ時間 | 18,831 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 27 TLE * 3 |
ソースコード
#include <iostream>#include <vector>#include <bitset>#include <iomanip>using namespace std;#define For(i, a, b) for(int i = (a); i < (b); i++)#define rep(i, n) For(i, 0, n)#define rFor(i, a, b) for(int i = (a); i >= (b); i--)#define ALL(v) (v).begin(), (v).end()#define rALL(v) (v).rbegin(), (v).rend()using lint = long long;using ld = long double;int INF = 2000000000;lint LINF = 1000000000000000000;struct SetupIo {SetupIo() {ios::sync_with_stdio(false);cin.tie(nullptr);cout << fixed << setprecision(15);}} setupio;int main() {int n, f;cin >> n >> f;vector<int> a(n), b(n), c(n);for (int &x : a) {cin >> x;}for (int &x : b) {cin >> x;}for (int &x : c) {cin >> x;}bitset<900010> dp;dp[0] = 1;rep(i, n) {dp = (dp << a[i]) | (dp << b[i]) | (dp << c[i]);cout << dp.count() << "\n";}}