結果
問題 | No.390 最長の数列 |
ユーザー | testestest |
提出日時 | 2016-07-17 18:00:53 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 718 ms / 5,000 ms |
コード長 | 151 bytes |
コンパイル時間 | 218 ms |
コンパイル使用メモリ | 19,968 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-10-15 15:24:46 |
合計ジャッジ時間 | 4,043 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 163 ms
5,248 KB |
testcase_01 | AC | 95 ms
5,248 KB |
testcase_02 | AC | 146 ms
5,248 KB |
testcase_03 | AC | 113 ms
5,248 KB |
testcase_04 | AC | 165 ms
5,248 KB |
testcase_05 | AC | 65 ms
5,248 KB |
testcase_06 | AC | 557 ms
5,376 KB |
testcase_07 | AC | 100 ms
5,248 KB |
testcase_08 | AC | 51 ms
5,248 KB |
testcase_09 | AC | 100 ms
5,248 KB |
testcase_10 | AC | 128 ms
5,376 KB |
testcase_11 | AC | 138 ms
5,376 KB |
testcase_12 | AC | 137 ms
5,376 KB |
testcase_13 | AC | 212 ms
5,376 KB |
testcase_14 | AC | 718 ms
5,248 KB |
testcase_15 | AC | 51 ms
5,248 KB |
testcase_16 | AC | 54 ms
5,248 KB |
testcase_17 | AC | 58 ms
5,376 KB |
testcase_18 | AC | 62 ms
5,376 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | b[1<<21],s,i,j;main(n){for(;s=~scanf("%d",&n)?b[n]=s,1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s>b[j]?s:b[j]:(j=++i)<1e6?s:!printf("%d",s););} | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int] main.c:1:10: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] 1 | b[1<<21],s,i,j;main(n){for(;s=~scanf("%d",&n)?b[n]=s,1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s>b[j]?s:b[j]:(j=++i)<1e6?s:!printf("%d",s););} | ^ main.c:1:12: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] 1 | b[1<<21],s,i,j;main(n){for(;s=~scanf("%d",&n)?b[n]=s,1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s>b[j]?s:b[j]:(j=++i)<1e6?s:!printf("%d",s););} | ^ main.c:1:14: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] 1 | b[1<<21],s,i,j;main(n){for(;s=~scanf("%d",&n)?b[n]=s,1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s>b[j]?s:b[j]:(j=++i)<1e6?s:!printf("%d",s););} | ^ main.c:1:16: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | b[1<<21],s,i,j;main(n){for(;s=~scanf("%d",&n)?b[n]=s,1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s>b[j]?s:b[j]:(j=++i)<1e6?s:!printf("%d",s););} | ^~~~ main.c: In function ‘main’: main.c:1:16: warning: type of ‘n’ defaults to ‘int’ [-Wimplicit-int] main.c:1:32: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 1 | b[1<<21],s,i,j;main(n){for(;s=~scanf("%d",&n)?b[n]=s,1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s>b[j]?s:b[j]:(j=++i)<1e6?s:!printf("%d",s););} | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | b[1<<21],s,i,j;main(n){for(;s=~scanf("%d",&n)?b[n]=s,1:b[i]&&
ソースコード
b[1<<21],s,i,j;main(n){for(;s=~scanf("%d",&n)?b[n]=s,1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s>b[j]?s:b[j]:(j=++i)<1e6?s:!printf("%d",s););}