結果
問題 | No.139 交差点 |
ユーザー |
👑 ![]() |
提出日時 | 2016-06-02 22:31:44 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 124 bytes |
コンパイル時間 | 251 ms |
コンパイル使用メモリ | 19,584 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 14:49:38 |
合計ジャッジ時間 | 1,510 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | s,a,x,w,t;main(L){for(scanf("%*d%d",&L);~scanf("%d%d%d",&x,&w,&t);t-w<s%(t*=2)?s+=t-s%t:0)s+=x-a,a=x;s=!printf("%d",s+L-a);} | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] 1 | s,a,x,w,t;main(L){for(scanf("%*d%d",&L);~scanf("%d%d%d",&x,&w,&t);t-w<s%(t*=2)?s+=t-s%t:0)s+=x-a,a=x;s=!printf("%d",s+L-a);} | ^ main.c:1:5: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int] 1 | s,a,x,w,t;main(L){for(scanf("%*d%d",&L);~scanf("%d%d%d",&x,&w,&t);t-w<s%(t*=2)?s+=t-s%t:0)s+=x-a,a=x;s=!printf("%d",s+L-a);} | ^ main.c:1:7: warning: type defaults to ‘int’ in declaration of ‘w’ [-Wimplicit-int] 1 | s,a,x,w,t;main(L){for(scanf("%*d%d",&L);~scanf("%d%d%d",&x,&w,&t);t-w<s%(t*=2)?s+=t-s%t:0)s+=x-a,a=x;s=!printf("%d",s+L-a);} | ^ main.c:1:9: warning: type defaults to ‘int’ in declaration of ‘t’ [-Wimplicit-int] 1 | s,a,x,w,t;main(L){for(scanf("%*d%d",&L);~scanf("%d%d%d",&x,&w,&t);t-w<s%(t*=2)?s+=t-s%t:0)s+=x-a,a=x;s=!printf("%d",s+L-a);} | ^ main.c:1:11: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | s,a,x,w,t;main(L){for(scanf("%*d%d",&L);~scanf("%d%d%d",&x,&w,&t);t-w<s%(t*=2)?s+=t-s%t:0)s+=x-a,a=x;s=!printf("%d",s+L-a);} | ^~~~ main.c: In function ‘main’: main.c:1:11: warning: type of ‘L’ defaults to ‘int’ [-Wimplicit-int] main.c:1:23: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 1 | s,a,x,w,t;main(L){for(scanf("%*d%d",&L);~scanf("%d%d%d",&x,&w,&t);t-w<s%(t*=2)?s+=t-s%t:0)s+=x-a,a=x;s=!printf("%d",s+L-a);} | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | s,a,x,w,t;main(L){f
ソースコード
s,a,x,w,t;main(L){for(scanf("%*d%d",&L);~scanf("%d%d%d",&x,&w,&t);t-w<s%(t*=2)?s+=t-s%t:0)s+=x-a,a=x;s=!printf("%d",s+L-a);}