結果
| 問題 |
No.3041 非対称じゃんけん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-28 22:17:25 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 604 bytes |
| コンパイル時間 | 2,208 ms |
| コンパイル使用メモリ | 195,876 KB |
| 実行使用メモリ | 8,236 KB |
| 最終ジャッジ日時 | 2025-02-28 22:17:45 |
| 合計ジャッジ時間 | 20,386 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 WA * 22 TLE * 3 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:21:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::size_t’ {aka ‘long unsigned int’} [-Wformat=]
21 | printf("%d\n",dp.count());
| ~^ ~~~~~~~~~~
| | |
| int std::size_t {aka long unsigned int}
| %ld
main.cpp:28:26: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::size_t’ {aka ‘long unsigned int’} [-Wformat=]
28 | printf("%d\n",dp.count());
| ~^ ~~~~~~~~~~
| | |
| int std::size_t {aka long unsigned int}
| %ld
main.cpp:13:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
13 | scanf("%d%d",&n,&f);
| ~~~~~^~~~~~~~~~~~~~
main.cpp:14:32: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
14 | for(i=1;i<=n;i++) scanf("%d",&a[i]);
| ~~~~~^~~~~~~~~~~~
main.cpp:15:32: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
15 | for(i=1;i<=n;i++) scanf("%d",&b[i]);
| ~~~~~^~~~~~~~~~~~
main.cpp:16:32: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
16 | for(i=1;i<=n;i++) scanf("%d",&c[i]);
| ~~~~~^~~~~~~~~~~~
ソースコード
#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;
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[a[1]]=1;
dp[b[1]]=1;
dp[c[1]]=1;
printf("%d\n",dp.count());
for(i=2;i<=n;i++)
{
tmp=dp;
dp|=(tmp<<a[i]);
dp|=(tmp<<b[i]);
dp|=(tmp<<c[i]);
printf("%d\n",dp.count());
}
return 0;
}