编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#25401 #1138. ddd和鹦鹉 Wrong Answer 70 89 ms 356 K C++ / 1.3 K lvcs 2020-04-28 16:52:16
显示原始代码
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll ax, ay, bx, by, cx, cy, s;

ll o_s(ll ox, ll oy) {
    ll os = 0;
    os = (abs((ax - ox) * (by - oy) - (ay - oy) * (bx - ox)) +
          abs((ax - ox) * (cy - oy) - (ay - oy) * (cx - ox)) +
          abs((bx - ox) * (cy - oy) - (by - oy) * (cx - ox))) /
         2;

    return os;
}

ll o_l(ll ox, ll oy) {
    ll ol = 0;
    ol = 3 * sqrt((ax - ox) * (ax - ox) + (ay - oy) * (ay - oy)) +
         2 * sqrt((bx - ox) * (bx - ox) + (by - oy) * (by - oy)) +
         sqrt((cx - ox) * (cx - ox) + (cy - oy) * (cy - oy));
    return ol;
}

ll max3(ll x, ll y, ll z) {
    ll e, f;
    if (x > y)
        e = x;
    else
        e = y;
    if (e > z)
        f = e;
    else
        f = z;
    return (f);
}

ll min3(ll x, ll y, ll z) {
    ll e, f;
    if (x > y)
        e = y;
    else
        e = x;
    if (e > z)
        f = z;
    else
        f = e;
    return (f);
}

int main() {
    ll length = 100000;
    cin >> ax >> ay >> bx >> by >> cx >> cy;
    s = (abs((bx - ax) * (cy - ay) - (by - ay) * (cx - ax))) / 2;

    //	cout<<s<<endl;

    ll i, j;
    ll ox, oy;

    ll maxx = max3(ax, bx, cx);
    ll minx = min3(ax, bx, cx);
    ll maxy = max3(ay, by, cy);
    ll miny = min3(ay, by, cy);

    for (i = minx; i <= maxx; i++) {
        for (j = miny; j <= maxy; j++) {
            //	cout<<i<<" "<<j<<endl;

            if (o_s(i, j) == s && o_l(i, j) < length) {
                length = o_l(i, j);
                ox = i, oy = j;
            }
        }
    }

    cout << ox << " " << oy << endl;
    return (0);
}
子任务 #1
Wrong Answer
得分:70
测试点 #1
Wrong Answer
得分:0
用时:8 ms
内存:292 KiB

输入文件(1.in

-211 -888 -552 114 -1000 759

答案文件(1.out

-211 -888

用户输出

-271 -736

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(2.in

900 570 -119 902 -15 327

答案文件(2.out

900 570

用户输出

893 571

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #3
Accepted
得分:100
用时:13 ms
内存:344 KiB

输入文件(3.in

143 999 -171 -662 696 691

答案文件(3.out

143 999

用户输出

143 999

系统信息

Exited with return code 0
测试点 #4
Accepted
得分:100
用时:14 ms
内存:356 KiB

输入文件(4.in

-498 -472 -789 470 701 656

答案文件(4.out

-498 -472

用户输出

-498 -472

系统信息

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

输入文件(5.in

356 25 218 610 -269 875

答案文件(5.out

356 25

用户输出

351 35

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #6
Accepted
得分:100
用时:11 ms
内存:260 KiB

输入文件(6.in

408 403 453 -659 -405 -338

答案文件(6.out

408 403

用户输出

408 403

系统信息

Exited with return code 0
测试点 #7
Accepted
得分:100
用时:10 ms
内存:264 KiB

输入文件(7.in

418 -178 954 -328 -600 743

答案文件(7.out

418 -178

用户输出

418 -178

系统信息

Exited with return code 0
测试点 #8
Accepted
得分:100
用时:5 ms
内存:352 KiB

输入文件(8.in

-188 -598 684 -6 343 -341

答案文件(8.out

-188 -598

用户输出

-188 -598

系统信息

Exited with return code 0
测试点 #9
Accepted
得分:100
用时:10 ms
内存:280 KiB

输入文件(9.in

-295 -813 85 299 -431 323

答案文件(9.out

-295 -813

用户输出

-295 -813

系统信息

Exited with return code 0
测试点 #10
Accepted
得分:100
用时:5 ms
内存:356 KiB

输入文件(10.in

549 247 564 -263 -74 75

答案文件(10.out

549 247

用户输出

549 247

系统信息

Exited with return code 0