結果
問題 | No.390 最長の数列 |
ユーザー | testestest |
提出日時 | 2016-07-17 17:58:53 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 64 ms / 5,000 ms |
コード長 | 158 bytes |
コンパイル時間 | 110 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-02 10:59:50 |
合計ジャッジ時間 | 1,044 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 6 ms
5,248 KB |
testcase_01 | AC | 4 ms
6,820 KB |
testcase_02 | AC | 5 ms
6,816 KB |
testcase_03 | AC | 4 ms
6,820 KB |
testcase_04 | AC | 6 ms
6,820 KB |
testcase_05 | AC | 15 ms
6,816 KB |
testcase_06 | AC | 64 ms
5,376 KB |
testcase_07 | AC | 4 ms
5,248 KB |
testcase_08 | AC | 3 ms
5,248 KB |
testcase_09 | AC | 4 ms
5,248 KB |
testcase_10 | AC | 25 ms
5,376 KB |
testcase_11 | AC | 28 ms
5,376 KB |
testcase_12 | AC | 25 ms
5,376 KB |
testcase_13 | AC | 20 ms
5,504 KB |
testcase_14 | AC | 40 ms
5,248 KB |
testcase_15 | AC | 2 ms
5,248 KB |
testcase_16 | AC | 3 ms
5,248 KB |
testcase_17 | AC | 4 ms
5,504 KB |
testcase_18 | AC | 6 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);s=1)b[n]=s;for(;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);s=1)b[n]=s;for(;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);s=1)b[n]=s;for(;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);s=1)b[n]=s;for(;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);s=1)b[n]=s;for(;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);s=1)b[n]=s;for(;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
ソースコード
b[1<<21],s,i,j;main(n){for(;~scanf("%d",&n);s=1)b[n]=s;for(;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);}