编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#25442 #1138. ddd和鹦鹉 Wrong Answer 0 3201 ms 444 K C++ 11 / 1.8 K Eric 2020-05-01 21:47:39
显示原始代码
#include <iostream>
using namespace std;
int crossproduct(int x1, int y1, int x2, int y2) { return x1 * y2 - x2 * y1; }
bool isin(int x1, int y1, int x2, int y2, int x3, int y3, int x, int y) {
    printf("%d %d %d %d %d %d %d %d ", x1, y1, x2, y2, x3, y3, x, y);
    if ((x == x1) && (y == y1))
        return true;
    if ((x == x2) && (y == y2))
        return true;
    if ((x == x3) && (y == y3))
        return true;
    int temp;
    if (crossproduct(x1 - x2, y1 - y2, x1 - x3, y1 - y3) >= 0) {
        temp = x3;
        x3 = x2;
        x2 = temp;
        temp = y3;
        y3 = y2;
        y2 = temp;
    }
    if (crossproduct(x2 - x1, y2 - y1, x - x1, y - y1) < 0)
        return false;
    if (crossproduct(x3 - x2, y3 - y2, x - x2, y - y2) < 0)
        return false;
    if (crossproduct(x1 - x3, y1 - y3, x - x3, y - y3) < 0)
        return false;
    return true;
}
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;
    cin >> ax >> ay >> bx >> by >> cx >> cy;
    long int min = 10000000, ans[2];
    int minx = ax, miny = ay, maxx = ax, maxy = ay;
    if (minx > bx)
        minx = bx;
    if (minx > cx)
        minx = cx;
    if (maxx < bx)
        maxx = bx;
    if (maxx < cx)
        maxx = cx;
    if (miny > by)
        miny = by;
    if (miny > cy)
        miny = cy;
    if (maxy < by)
        maxy = by;
    if (maxy < cy)
        maxy = cy;
    for (int i = minx; i <= maxx; ++i)
        for (int j = miny; j <= maxy; ++j) {
            if (isin(ax, ay, bx, by, cx, cy, i, j) == false)
                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;
}
子任务 #1
Wrong Answer
得分:0
测试点 #1
Wrong Answer
得分:0
用时:434 ms
内存:388 KiB

输入文件(1.in

-211 -888 -552 114 -1000 759

答案文件(1.out

-211 -888

用户输出

-211 -888 -552 114 -1000 759 -1000 -888 -211 -888 -552 114 -1000 759 -1000 -887 -211 -888 -552 114 -1000 759 -1000 -886 -211 -88
<50003788 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #2
Wrong Answer
得分:0
用时:193 ms
内存:308 KiB

输入文件(2.in

900 570 -119 902 -15 327

答案文件(2.out

900 570

用户输出

900 570 -119 902 -15 327 -119 327 900 570 -119 902 -15 327 -119 328 900 570 -119 902 -15 327 -119 329 900 570 -119 902 -15 327 -
<19331015 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #3
Wrong Answer
得分:0
用时:485 ms
内存:380 KiB

输入文件(3.in

143 999 -171 -662 696 691

答案文件(3.out

143 999

用户输出

143 999 -171 -662 696 691 -171 -662 143 999 -171 -662 696 691 -171 -661 143 999 -171 -662 696 691 -171 -660 143 999 -171 -662 69
<49356101 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #4
Wrong Answer
得分:0
用时:588 ms
内存:444 KiB

输入文件(4.in

-498 -472 -789 470 701 656

答案文件(4.out

-498 -472

用户输出

-498 -472 -789 470 701 656 -789 -472 -498 -472 -789 470 701 656 -789 -471 -498 -472 -789 470 701 656 -789 -470 -498 -472 -789 47
<59940119 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #5
Wrong Answer
得分:0
用时:178 ms
内存:364 KiB

输入文件(5.in

356 25 218 610 -269 875

答案文件(5.out

356 25

用户输出

356 25 218 610 -269 875 -269 25 356 25 218 610 -269 875 -269 26 356 25 218 610 -269 875 -269 27 356 25 218 610 -269 875 -269 28 
<17043562 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #6
Wrong Answer
得分:0
用时:317 ms
内存:292 KiB

输入文件(6.in

408 403 453 -659 -405 -338

答案文件(6.out

408 403

用户输出

408 403 453 -659 -405 -338 -405 -659 408 403 453 -659 -405 -338 -405 -658 408 403 453 -659 -405 -338 -405 -657 408 403 453 -659 
<32536574 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #7
Wrong Answer
得分:0
用时:534 ms
内存:392 KiB

输入文件(7.in

418 -178 954 -328 -600 743

答案文件(7.out

418 -178

用户输出

418 -178 954 -328 -600 743 -600 -328 418 -178 954 -328 -600 743 -600 -327 418 -178 954 -328 -600 743 -600 -326 418 -178 954 -328
<58924034 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #8
Wrong Answer
得分:0
用时:177 ms
内存:320 KiB

输入文件(8.in

-188 -598 684 -6 343 -341

答案文件(8.out

-188 -598

用户输出

-188 -598 684 -6 343 -341 -188 -598 -188 -598 684 -6 343 -341 -188 -597 -188 -598 684 -6 343 -341 -188 -596 -188 -598 684 -6 343
<18015651 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #9
Wrong Answer
得分:0
用时:191 ms
内存:404 KiB

输入文件(9.in

-295 -813 85 299 -431 323

答案文件(9.out

-295 -813

用户输出

-295 -813 85 299 -431 323 -431 -813 -295 -813 85 299 -431 323 -431 -812 -295 -813 85 299 -431 323 -431 -811 -295 -813 85 299 -43
<20551781 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #10
Wrong Answer
得分:0
用时:104 ms
内存:260 KiB

输入文件(10.in

549 247 564 -263 -74 75

答案文件(10.out

549 247

用户输出

549 247 564 -263 -74 75 -74 -263 549 247 564 -263 -74 75 -74 -262 549 247 564 -263 -74 75 -74 -261 549 247 564 -263 -74 75 -74 -
<10416753 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0