結果
| 問題 | No.3041 非対称じゃんけん |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-28 22:27:58 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1,449 ms / 2,200 ms |
| コード長 | 563 bytes |
| 記録 | |
| コンパイル時間 | 1,203 ms |
| コンパイル使用メモリ | 215,296 KB |
| 実行使用メモリ | 9,284 KB |
| 最終ジャッジ日時 | 2026-07-06 12:51:09 |
| 合計ジャッジ時間 | 12,850 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF=0x3f3f3f3f;
const ll LLINF=0x3f3f3f3f3f3f3f3fLL;
const int mod=998244353;
const int MAX=1.5e4+10;
const int N=9e5+1;
int a[MAX],b[MAX],c[MAX];
int main()
{
int n,f,i;
scanf("%d%d",&n,&f);
for(i=1;i<=n;i++) scanf("%d",&a[i]);
for(i=1;i<=n;i++) scanf("%d",&b[i]);
for(i=1;i<=n;i++) scanf("%d",&c[i]);
bitset<N> dp,tmp;
dp[0]=1;
for(i=1;i<=n;i++)
{
tmp=dp;
dp.reset();
dp|=(tmp<<a[i]);
dp|=(tmp<<b[i]);
dp|=(tmp<<c[i]);
printf("%d\n",dp.count());
}
return 0;
}