結果

問題 No.410 出会い
ユーザー monburan_0401
提出日時 2018-09-13 01:22:30
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 471 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 30,080 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-28 10:40:05
合計ジャッジ時間 892 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 18 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <math.h>
int main(void){
	int p[2];	//	p(x,y)
	int q[2];	//	q(x,y)
	
	double r[2];	//	pとqの中点
	double time = 0;//	かかる時間
	
	scanf("%d %d",&p[0],&p[1]);
	scanf("%d %d",&q[0],&q[1]);
	
	r[0] = (double)(p[0] + q[0]) / 2;
	r[1] = (double)(p[1] + q[1]) / 2;
	
//	printf("r(%g,%g)\n",r[0],r[1]);		//	check ok
	
	//	prを求める
	for(int i = 0; i < 2; i++){
		time += fabs(r[i] - p[i]);
	}
	
	printf("%g\n",time);
	
	return 0;
}
0