結果
問題 | No.390 最長の数列 |
ユーザー | testestest |
提出日時 | 2016-07-17 17:58:37 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 56 ms / 5,000 ms |
コード長 | 158 bytes |
コンパイル時間 | 82 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-10-15 15:24:39 |
合計ジャッジ時間 | 963 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 5 ms
5,248 KB |
testcase_01 | AC | 2 ms
5,248 KB |
testcase_02 | AC | 4 ms
5,248 KB |
testcase_03 | AC | 4 ms
5,248 KB |
testcase_04 | AC | 5 ms
5,248 KB |
testcase_05 | AC | 14 ms
5,248 KB |
testcase_06 | AC | 56 ms
5,376 KB |
testcase_07 | AC | 3 ms
5,248 KB |
testcase_08 | AC | 2 ms
5,248 KB |
testcase_09 | AC | 4 ms
5,248 KB |
testcase_10 | AC | 26 ms
5,376 KB |
testcase_11 | AC | 22 ms
5,376 KB |
testcase_12 | AC | 23 ms
5,376 KB |
testcase_13 | AC | 19 ms
5,376 KB |
testcase_14 | AC | 36 ms
5,248 KB |
testcase_15 | AC | 2 ms
5,248 KB |
testcase_16 | AC | 2 ms
5,248 KB |
testcase_17 | AC | 5 ms
5,376 KB |
testcase_18 | AC | 5 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;);n=!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;);n=!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;);n=!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;);n=!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;);n=!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;);n=!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;);n=!printf("%d",s);}