結果

問題 No.281 門松と魔法(1)
ユーザー FF256grhyFF256grhy
提出日時 2015-11-06 21:32:14
言語 C90
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 257 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 20,608 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-24 11:57:24
合計ジャッジ時間 1,456 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
6,812 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 AC 0 ms
6,944 KB
testcase_03 AC 0 ms
6,944 KB
testcase_04 AC 0 ms
6,944 KB
testcase_05 RE -
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 0 ms
6,944 KB
testcase_08 AC 0 ms
6,940 KB
testcase_09 AC 0 ms
6,940 KB
testcase_10 AC 0 ms
6,940 KB
testcase_11 AC 1 ms
6,944 KB
testcase_12 AC 0 ms
6,944 KB
testcase_13 AC 0 ms
6,944 KB
testcase_14 RE -
testcase_15 AC 0 ms
6,940 KB
testcase_16 RE -
testcase_17 AC 1 ms
6,940 KB
testcase_18 RE -
testcase_19 AC 1 ms
6,940 KB
testcase_20 AC 0 ms
6,940 KB
testcase_21 AC 0 ms
6,940 KB
testcase_22 RE -
testcase_23 AC 1 ms
6,940 KB
testcase_24 RE -
testcase_25 AC 1 ms
6,940 KB
testcase_26 AC 0 ms
6,944 KB
testcase_27 AC 1 ms
6,940 KB
testcase_28 AC 0 ms
6,940 KB
testcase_29 RE -
testcase_30 AC 1 ms
6,940 KB
testcase_31 RE -
testcase_32 RE -
testcase_33 AC 0 ms
6,940 KB
testcase_34 AC 0 ms
6,940 KB
testcase_35 AC 0 ms
6,940 KB
testcase_36 AC 1 ms
6,940 KB
testcase_37 AC 1 ms
6,940 KB
testcase_38 AC 1 ms
6,944 KB
testcase_39 AC 1 ms
6,944 KB
testcase_40 AC 0 ms
6,940 KB
testcase_41 RE -
testcase_42 WA -
testcase_43 RE -
testcase_44 AC 1 ms
6,944 KB
testcase_45 AC 1 ms
6,940 KB
testcase_46 RE -
testcase_47 AC 1 ms
6,940 KB
testcase_48 RE -
testcase_49 RE -
testcase_50 RE -
testcase_51 AC 0 ms
6,940 KB
testcase_52 RE -
testcase_53 RE -
testcase_54 RE -
testcase_55 AC 1 ms
6,940 KB
testcase_56 AC 0 ms
6,940 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
    1 | a,b,c,d,s,t;main(){scanf("%d%d%d%d",&d,&a,&b,&c);a>c?a^=c^=a^=c:a==c?s++,a=a<d?0:a-d:0;if((a<b&c<b|a>b&c>b)&&a-c&&printf("%d",s)||!d&&puts("-1"))return;t=(c-b)/d+1;t=a|t*d<c?t+s+(t*d+a==c):-1;c=(b-a)/d+1;printf("%d",a|c*d<b&&c<t?c+s:t);}// TEST orig: #57335
      | ^
main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int]
main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int]
    1 | a,b,c,d,s,t;main(){scanf("%d%d%d%d",&d,&a,&b,&c);a>c?a^=c^=a^=c:a==c?s++,a=a<d?0:a-d:0;if((a<b&c<b|a>b&c>b)&&a-c&&printf("%d",s)||!d&&puts("-1"))return;t=(c-b)/d+1;t=a|t*d<c?t+s+(t*d+a==c):-1;c=(b-a)/d+1;printf("%d",a|c*d<b&&c<t?c+s:t);}// TEST orig: #57335
      |   ^
main.c:1:5: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int]
    1 | a,b,c,d,s,t;main(){scanf("%d%d%d%d",&d,&a,&b,&c);a>c?a^=c^=a^=c:a==c?s++,a=a<d?0:a-d:0;if((a<b&c<b|a>b&c>b)&&a-c&&printf("%d",s)||!d&&puts("-1"))return;t=(c-b)/d+1;t=a|t*d<c?t+s+(t*d+a==c):-1;c=(b-a)/d+1;printf("%d",a|c*d<b&&c<t?c+s:t);}// TEST orig: #57335
      |     ^
main.c:1:7: warning: type defaults to ‘int’ in declaration of ‘d’ [-Wimplicit-int]
    1 | a,b,c,d,s,t;main(){scanf("%d%d%d%d",&d,&a,&b,&c);a>c?a^=c^=a^=c:a==c?s++,a=a<d?0:a-d:0;if((a<b&c<b|a>b&c>b)&&a-c&&printf("%d",s)||!d&&puts("-1"))return;t=(c-b)/d+1;t=a|t*d<c?t+s+(t*d+a==c):-1;c=(b-a)/d+1;printf("%d",a|c*d<b&&c<t?c+s:t);}// TEST orig: #57335
      |       ^
main.c:1:9: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int]
    1 | a,b,c,d,s,t;main(){scanf("%d%d%d%d",&d,&a,&b,&c);a>c?a^=c^=a^=c:a==c?s++,a=a<d?0:a-d:0;if((a<b&c<b|a>b&c>b)&&a-c&&printf("%d",s)||!d&&puts("-1"))return;t=(c-b)/d+1;t=a|t*d<c?t+s+(t*d+a==c):-1;c=(b-a)/d+1;printf("%d",a|c*d<b&&c<t?c+s:t);}// TEST orig: #57335
      |         ^
main.c:1:11: warning: type defaults to ‘int’ in declaration of ‘t’ [-Wi

ソースコード

diff #

a,b,c,d,s,t;main(){scanf("%d%d%d%d",&d,&a,&b,&c);a>c?a^=c^=a^=c:a==c?s++,a=a<d?0:a-d:0;if((a<b&c<b|a>b&c>b)&&a-c&&printf("%d",s)||!d&&puts("-1"))return;t=(c-b)/d+1;t=a|t*d<c?t+s+(t*d+a==c):-1;c=(b-a)/d+1;printf("%d",a|c*d<b&&c<t?c+s:t);}// TEST orig: #57335
0