用户输出
0 0
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#25437 | #1138. ddd和鹦鹉 | Wrong Answer | 0 | 27 ms | 360 K | C++ / 1.1 K | Eric | 2020-05-01 20:49:32 |
#include <iostream>
using namespace std;
bool isin(int Ax, int Ay, int Bx, int By, int Cx, int Cy, int Px, int Py) {
if ((Bx - Ax) * (Py - Ay) > (By - Ay) * (Px - Ax) && (Bx - Cx) * (Py - Cy) > (By - Cy) * (Px - Cx) &&
(Cx - Ax) * (Py - Ay) > (Cy - Ay) * (Px - Ax))
return true;
else
return false;
}
int dis(int x, int y, int x1, int y1) {
int dis = (x - x1) * (x - x1) + (y - y1) * (y - y1);
return dis;
}
int main() {
int ax, bx, cx, ay, by, cy, dy;
cin >> ax >> ay >> bx >> by >> cx >> cy;
int min = 10000000, ans[2] = {};
int minx = ax, miny = ay;
if (minx > bx)
minx = bx;
if (minx > cx)
minx = cx;
if (miny > by)
miny = by;
if (miny > cy)
miny = cy;
for (int i = 0; i < minx; ++i)
for (int j = 0; j < miny; ++j) {
if (!isin(ax, ay, bx, by, cx, cy, i, j))
continue;
int u = 3 * dis(ax, ay, i, j);
int v = 2 * dis(bx, by, i, j);
int w = dis(cx, cy, i, j);
if (u + v + w < min) {
min = u + v + w;
ans[0] = i;
ans[1] = j;
}
}
cout << ans[0] << " " << ans[1];
return 0;
}
用户输出
0 0
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
0 0
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
0 0
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
0 0
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
0 0
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
0 0
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
0 0
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
0 0
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
0 0
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0