結果
問題 | No.10 +か×か |
ユーザー | 👑 testestest |
提出日時 | 2016-02-24 22:45:40 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 51 ms / 5,000 ms |
コード長 | 285 bytes |
コンパイル時間 | 188 ms |
コンパイル使用メモリ | 21,120 KB |
実行使用メモリ | 33,536 KB |
最終ジャッジ日時 | 2024-05-08 11:50:29 |
合計ジャッジ時間 | 931 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 51 ms
33,536 KB |
testcase_04 | AC | 7 ms
5,376 KB |
testcase_05 | AC | 5 ms
5,376 KB |
testcase_06 | AC | 51 ms
32,640 KB |
testcase_07 | AC | 15 ms
9,216 KB |
testcase_08 | AC | 19 ms
13,696 KB |
testcase_09 | AC | 14 ms
10,240 KB |
testcase_10 | AC | 1 ms
5,376 KB |
testcase_11 | AC | 1 ms
5,376 KB |
コンパイルメッセージ
main.c:1:22: warning: data definition has no type or storage class 1 | long s[51][100100],t;a[99],i,j,k,m;main(n){for(scanf("%d%d",&n,&m);~scanf("%d",a+i++););for(s[0][*a]=1L<<60;++j<n;)for(i=0;i<=1e5;i++)if(t=s[j-1][i])s[j][i+a[j]]<t?s[j][i+a[j]]=1L<<55-j|t:0,i*a[j]<=1e5&&s[j][i*a[j]]<t?s[j][i*a[j]]=t:0;for(;i=++k<n;putchar(s[n-1][m]&1L<<55-k?43:42));} | ^ main.c:1:22: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] main.c:1:28: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] 1 | long s[51][100100],t;a[99],i,j,k,m;main(n){for(scanf("%d%d",&n,&m);~scanf("%d",a+i++););for(s[0][*a]=1L<<60;++j<n;)for(i=0;i<=1e5;i++)if(t=s[j-1][i])s[j][i+a[j]]<t?s[j][i+a[j]]=1L<<55-j|t:0,i*a[j]<=1e5&&s[j][i*a[j]]<t?s[j][i*a[j]]=t:0;for(;i=++k<n;putchar(s[n-1][m]&1L<<55-k?43:42));} | ^ main.c:1:30: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] 1 | long s[51][100100],t;a[99],i,j,k,m;main(n){for(scanf("%d%d",&n,&m);~scanf("%d",a+i++););for(s[0][*a]=1L<<60;++j<n;)for(i=0;i<=1e5;i++)if(t=s[j-1][i])s[j][i+a[j]]<t?s[j][i+a[j]]=1L<<55-j|t:0,i*a[j]<=1e5&&s[j][i*a[j]]<t?s[j][i*a[j]]=t:0;for(;i=++k<n;putchar(s[n-1][m]&1L<<55-k?43:42));} | ^ main.c:1:32: warning: type defaults to ‘int’ in declaration of ‘k’ [-Wimplicit-int] 1 | long s[51][100100],t;a[99],i,j,k,m;main(n){for(scanf("%d%d",&n,&m);~scanf("%d",a+i++););for(s[0][*a]=1L<<60;++j<n;)for(i=0;i<=1e5;i++)if(t=s[j-1][i])s[j][i+a[j]]<t?s[j][i+a[j]]=1L<<55-j|t:0,i*a[j]<=1e5&&s[j][i*a[j]]<t?s[j][i*a[j]]=t:0;for(;i=++k<n;putchar(s[n-1][m]&1L<<55-k?43:42));} | ^ main.c:1:34: warning: type defaults to ‘int’ in declaration of ‘m’ [-Wimplicit-int] 1 | long s[51][100100],t;a[99],i,j,k,m;main(n){for(scanf("%d%d",&n,&m);~scanf("%d",a+i++););for(s[0][*a]=1L<<60;++j<n;)for(i=0;i<=1e5;i++)if(t=s[j-1]
ソースコード
long s[51][100100],t;a[99],i,j,k,m;main(n){for(scanf("%d%d",&n,&m);~scanf("%d",a+i++););for(s[0][*a]=1L<<60;++j<n;)for(i=0;i<=1e5;i++)if(t=s[j-1][i])s[j][i+a[j]]<t?s[j][i+a[j]]=1L<<55-j|t:0,i*a[j]<=1e5&&s[j][i*a[j]]<t?s[j][i*a[j]]=t:0;for(;i=++k<n;putchar(s[n-1][m]&1L<<55-k?43:42));}