用户输出
-211 -888
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#24263 | #1138. ddd和鹦鹉 | Accepted | 100 | 469 ms | 352 K | C++ 17 / 822 B | Diorvh | 2020-04-23 11:56:56 |
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
#define F first
#define S second
#define mid ((l + r) >> 1)
#define db(x) cout << #x << ":" << x << endl;
const int M = 2e5 + 20, P = 1e9 + 7;
int i, j;
double dis(int ax, int ay) { return sqrt((i - ax) * (i - ax) + (j - ay) * (j - ay)); }
struct TTTT {
int ax, ay, bx, by, cx, cy;
void init() { cin >> ax >> ay >> bx >> by >> cx >> cy; }
void run() {
init();
double ansv = 1e9;
int ansx, ansy;
for (i = -1000; i <= 1000; ++i)
for (j = -1000; j <= 1000; ++j) {
double c = 3 * dis(ax, ay) + 2 * dis(bx, by) + dis(cx, cy);
if (c < ansv)
ansv = c, ansx = i, ansy = j;
}
cout << ansx << ' ' << ansy << endl;
}
} TTT;
int main() {
TTT.run();
return 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