結果
問題 | No.561 東京と京都 |
ユーザー | 👑 testestest |
提出日時 | 2017-08-26 02:08:09 |
言語 | C (gcc 12.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 111 bytes |
コンパイル時間 | 1,080 ms |
コンパイル使用メモリ | 27,264 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-15 17:01:42 |
合計ジャッジ時間 | 949 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 1 ms
5,248 KB |
testcase_02 | AC | 1 ms
5,248 KB |
testcase_03 | AC | 1 ms
5,248 KB |
testcase_04 | AC | 1 ms
5,248 KB |
testcase_05 | AC | 1 ms
5,248 KB |
testcase_06 | AC | 1 ms
5,248 KB |
testcase_07 | AC | 1 ms
5,248 KB |
testcase_08 | AC | 0 ms
5,248 KB |
testcase_09 | AC | 1 ms
5,248 KB |
testcase_10 | AC | 1 ms
5,248 KB |
testcase_11 | AC | 1 ms
5,248 KB |
testcase_12 | AC | 1 ms
5,248 KB |
testcase_13 | AC | 1 ms
5,248 KB |
testcase_14 | AC | 1 ms
5,248 KB |
testcase_15 | AC | 1 ms
5,248 KB |
testcase_16 | AC | 1 ms
5,248 KB |
testcase_17 | AC | 1 ms
5,248 KB |
testcase_18 | AC | 1 ms
5,248 KB |
testcase_19 | AC | 1 ms
5,248 KB |
testcase_20 | AC | 1 ms
5,248 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | T,K,t,d;main(k){for(;~scanf("%d%d",&t,&k);d?K=k+fmax(K?:-d,T-d),T=t:(d=k))t+=fmax(T,K-d);printf("%d",T>K?T:K);} | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 'T' [-Wimplicit-int] main.c:1:3: warning: type defaults to 'int' in declaration of 'K' [-Wimplicit-int] 1 | T,K,t,d;main(k){for(;~scanf("%d%d",&t,&k);d?K=k+fmax(K?:-d,T-d),T=t:(d=k))t+=fmax(T,K-d);printf("%d",T>K?T:K);} | ^ main.c:1:5: warning: type defaults to 'int' in declaration of 't' [-Wimplicit-int] 1 | T,K,t,d;main(k){for(;~scanf("%d%d",&t,&k);d?K=k+fmax(K?:-d,T-d),T=t:(d=k))t+=fmax(T,K-d);printf("%d",T>K?T:K);} | ^ main.c:1:7: warning: type defaults to 'int' in declaration of 'd' [-Wimplicit-int] 1 | T,K,t,d;main(k){for(;~scanf("%d%d",&t,&k);d?K=k+fmax(K?:-d,T-d),T=t:(d=k))t+=fmax(T,K-d);printf("%d",T>K?T:K);} | ^ main.c:1:9: warning: return type defaults to 'int' [-Wimplicit-int] 1 | T,K,t,d;main(k){for(;~scanf("%d%d",&t,&k);d?K=k+fmax(K?:-d,T-d),T=t:(d=k))t+=fmax(T,K-d);printf("%d",T>K?T:K);} | ^~~~ main.c: In function 'main': main.c:1:9: warning: type of 'k' defaults to 'int' [-Wimplicit-int] main.c:1:23: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | T,K,t,d;main(k){for(;~scanf("%d%d",&t,&k);d?K=k+fmax(K?:-d,T-d),T=t:(d=k))t+=fmax(T,K-d);printf("%d",T>K?T:K);} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | T,K,t,d;main(k){for(;~scanf("%d%d",&t,&k);d?K=k+fmax(K?:-d,T-d),T=t:(d=k))t+=fmax(T,K-d);printf("%d",T>K?T:K);} main.c:1:23: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | T,K,t,d;main(k){for(;~scanf("%d%d",&t,&k);d?K=k+fmax(K?:-d,T-d),T=t:(d=k))t+=fmax(T,K-d);printf("%d",T>K?T:K);} | ^~~~~ main.c:1:23: note
ソースコード
T,K,t,d;main(k){for(;~scanf("%d%d",&t,&k);d?K=k+fmax(K?:-d,T-d),T=t:(d=k))t+=fmax(T,K-d);printf("%d",T>K?T:K);}