結果
問題 |
No.716 距離
|
ユーザー |
👑 ![]() |
提出日時 | 2018-12-01 20:20:58 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 98 bytes |
コンパイル時間 | 96 ms |
コンパイル使用メモリ | 29,056 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-27 00:03:09 |
合計ジャッジ時間 | 1,163 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 40 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | f,p,m;main(t){for(;~scanf("%d",&t);)!m?m=-1e9:f?m=fmax(m,p+~t):(f=t),p=t;printf("%d\n%d",~m,t-f);} | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 'f' [-Wimplicit-int] main.c:1:3: warning: type defaults to 'int' in declaration of 'p' [-Wimplicit-int] 1 | f,p,m;main(t){for(;~scanf("%d",&t);)!m?m=-1e9:f?m=fmax(m,p+~t):(f=t),p=t;printf("%d\n%d",~m,t-f);} | ^ main.c:1:5: warning: type defaults to 'int' in declaration of 'm' [-Wimplicit-int] 1 | f,p,m;main(t){for(;~scanf("%d",&t);)!m?m=-1e9:f?m=fmax(m,p+~t):(f=t),p=t;printf("%d\n%d",~m,t-f);} | ^ main.c:1:7: warning: return type defaults to 'int' [-Wimplicit-int] 1 | f,p,m;main(t){for(;~scanf("%d",&t);)!m?m=-1e9:f?m=fmax(m,p+~t):(f=t),p=t;printf("%d\n%d",~m,t-f);} | ^~~~ main.c: In function 'main': main.c:1:7: warning: type of 't' defaults to 'int' [-Wimplicit-int] main.c:1:21: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | f,p,m;main(t){for(;~scanf("%d",&t);)!m?m=-1e9:f?m=fmax(m,p+~t):(f=t),p=t;printf("%d\n%d",~m,t-f);} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | f,p,m;main(t){for(;~scanf("%d",&t);)!m?m=-1e9:f?m=fmax(m,p+~t):(f=t),p=t;printf("%d\n%d",~m,t-f);} main.c:1:21: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | f,p,m;main(t){for(;~scanf("%d",&t);)!m?m=-1e9:f?m=fmax(m,p+~t):(f=t),p=t;printf("%d\n%d",~m,t-f);} | ^~~~~ main.c:1:21: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:51: warning: implicit declaration of function 'fmax' [-Wimplicit-function-declaration] 1 | f,p,m;main(t){for(;~scanf("%d",&t);)!m?m=-1e9:f?m=fmax(m,p+~t):(f=t),p=t;printf("%d\n%d",~m,t-f);} |
ソースコード
f,p,m;main(t){for(;~scanf("%d",&t);)!m?m=-1e9:f?m=fmax(m,p+~t):(f=t),p=t;printf("%d\n%d",~m,t-f);}