用户输出
-211 -888
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#24207 | #1138. ddd和鹦鹉 | Accepted | 100 | 280 ms | 352 K | C++ 11 / 852 B | Rhodoks | 2020-04-20 11:07:49 |
#include <bits/stdc++.h>
#define DB double
#define LL long long
#define MST(a, b) memset((a), (b), sizeof(a))
#define MRK() cout << "Mark" << endl;
#define WRT(x) cout << #x << " = " << (x) << endl;
#define MAXN 210000
#define MAXM 410000
#define MOD 998244353
#define INF 0x3f3f3f3f
#define LLINF 0x3f3f3f3f3f3f3f3f
#define EPS 1e-5
#define _ 0
using namespace std;
int ax, ay, bx, by, cx, cy;
int main() {
cin >> ax >> ay >> bx >> by >> cx >> cy;
DB ans = LLINF;
int x, y;
for (int i = -1000; i <= 1000; i++)
for (int j = -1000; j <= 1000; j++) {
double da = sqrt((ax - i) * (ax - i) + (ay - j) * (ay - j));
double db = sqrt((bx - i) * (bx - i) + (by - j) * (by - j));
double dc = sqrt((cx - i) * (cx - i) + (cy - j) * (cy - j));
double d = 3 * da + 2 * db + dc;
// cout<<d<<endl;
if (d < ans) {
ans = d;
x = i;
y = j;
}
}
cout << x << ' ' << y << endl;
return ~~(0 ^ _ ^ 0);
}
用户输出
-211 -888
系统信息
Exited with return code 0
用户输出
143 999
系统信息
Exited with return code 0
用户输出
-498 -472
系统信息
Exited with return code 0
用户输出
408 403
系统信息
Exited with return code 0
用户输出
418 -178
系统信息
Exited with return code 0
用户输出
-188 -598
系统信息
Exited with return code 0
用户输出
-295 -813
系统信息
Exited with return code 0