結果

問題 No.410 出会い
ユーザー RadPeriaRadPeria
提出日時 2017-12-04 22:25:22
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 727 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 29,672 KB
実行使用メモリ 5,272 KB
最終ジャッジ日時 2023-08-18 20:57:59
合計ジャッジ時間 1,121 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 0 ms
4,376 KB
testcase_13 AC 0 ms
4,380 KB
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 0 ms
4,376 KB
testcase_17 WA -
testcase_18 AC 0 ms
4,380 KB
testcase_19 WA -
testcase_20 AC 1 ms
4,380 KB
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <math.h>
double px,py;
double qx,qy;
double absolute(double x){
        if(x<0){
                return -x;
        }else{
                return x;
        }
}
int main(){
        double T =0; //T means time.
        double xave=0, yave=0;
        scanf("%lf %lf", &px, &py);
        scanf("%lf %lf", &qx, &qy);
        if((px != -qx)&&qx<0) qx = -qx;
        if((py != -qy)&&qy<0) qy = -qy;
        if((qx != -px)&&px<0) px = -px;
        if((qy != -py)&&py<0) py = -py;
        xave = ( px + qx ) / 2;
        xave = absolute(xave);
        yave = ( py + qy ) / 2;
        yave = absolute(yave);
        T = xave +yave;
        printf("%lf\n", T);
        return 0;
}
0