結果
問題 | No.390 最長の数列 |
ユーザー | testestest |
提出日時 | 2016-07-17 18:02:38 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 669 ms / 5,000 ms |
コード長 | 153 bytes |
コンパイル時間 | 477 ms |
コンパイル使用メモリ | 19,968 KB |
実行使用メモリ | 5,504 KB |
最終ジャッジ日時 | 2024-10-02 11:52:01 |
合計ジャッジ時間 | 4,262 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 160 ms
5,248 KB |
testcase_01 | AC | 97 ms
5,248 KB |
testcase_02 | AC | 150 ms
5,248 KB |
testcase_03 | AC | 109 ms
5,248 KB |
testcase_04 | AC | 145 ms
5,248 KB |
testcase_05 | AC | 67 ms
5,248 KB |
testcase_06 | AC | 529 ms
5,376 KB |
testcase_07 | AC | 99 ms
5,248 KB |
testcase_08 | AC | 49 ms
5,248 KB |
testcase_09 | AC | 97 ms
5,248 KB |
testcase_10 | AC | 126 ms
5,504 KB |
testcase_11 | AC | 135 ms
5,376 KB |
testcase_12 | AC | 128 ms
5,504 KB |
testcase_13 | AC | 204 ms
5,376 KB |
testcase_14 | AC | 669 ms
5,248 KB |
testcase_15 | AC | 51 ms
5,248 KB |
testcase_16 | AC | 50 ms
5,248 KB |
testcase_17 | AC | 55 ms
5,376 KB |
testcase_18 | AC | 61 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(;~scanf("%d",&n)?b[n]=s,s=1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s=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(;~scanf("%d",&n)?b[n]=s,s=1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s=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(;~scanf("%d",&n)?b[n]=s,s=1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s=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(;~scanf("%d",&n)?b[n]=s,s=1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s=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(;~scanf("%d",&n)?b[n]=s,s=1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s=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:30: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 1 | b[1<<21],s,i,j;main(n){for(;~scanf("%d",&n)?b[n]=s,s=1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s=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(;~scanf("%d",&n)?b[n]=s,
ソースコード
b[1<<21],s,i,j;main(n){for(;~scanf("%d",&n)?b[n]=s,s=1:b[i]&&j<1e6?b[j+=i]?b[j]=b[j]>b[i]?b[j]:b[i]+1:0,s=s>b[j]?s:b[j]:(j=++i)<1e6;);s=!printf("%d",s);}