結果
| 問題 |
No.410 出会い
|
| ユーザー |
moyashi_senpai
|
| 提出日時 | 2016-08-12 23:09:51 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 557 bytes |
| コンパイル時間 | 767 ms |
| コンパイル使用メモリ | 78,108 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 10:59:18 |
| 合計ジャッジ時間 | 1,321 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:25:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
25 | scanf("%d %d %d %d", &p.first, &p.second, &q.first, &q.second);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <functional>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
using namespace std;
#define Getsign(n) ((n > 0) - (n < 0))
typedef vector<int> Ivec;
typedef pair<int, int> pii;
int main() {
pii p, q;
scanf("%d %d %d %d", &p.first, &p.second, &q.first, &q.second);
printf("%lf\n", (double)(abs(q.first - p.first) + abs(q.second - p.second))/2);
return 0;
}
moyashi_senpai