编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#3113 #1003. 凸多边形 Wrong Answer 50 90 ms 508 K C / 1023 B t330026169 2023-11-23 10:12:40
显示原始代码
#include <stdio.h>
#include <math.h>

int main() {
    int ax, ay, bx, by, cx, cy, dx, dy;
    float AB, AC, AD, BC, BD, CD;
    float cos_A, cos_B, cos_C, cos_D;
    float sq_sin_A, sq_sin_B, sq_sin_C, sq_sin_D;

    scanf("%d %d", &ax, &ay);
    scanf("%d %d", &bx, &by);
    scanf("%d %d", &cx, &cy);
    scanf("%d %d", &dx, &dy);

    AB = sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by));
    AC = sqrt((ax - cx) * (ax - cx) + (ay - cy) * (ay - cy));
    AD = sqrt((ax - dx) * (ax - dx) + (ay - dy) * (ay - dy));
    BC = sqrt((bx - cx) * (bx - cx) + (by - cy) * (by - cy));
    BD = sqrt((bx - dx) * (bx - dx) + (by - dy) * (by - dy));
    CD = sqrt((cx - dx) * (cx - dx) + (cy - dy) * (cy - dy));

    cos_A = (AB * AB + AD * AD - BD * BD) / (2 * AB * AD);
    cos_B = (AB * AB + BC * BC - AC * AC) / (2 * AB * BC);
    cos_C = (BC * BC + CD * CD - BD * BD) / (2 * BC * CD);
    cos_D = (AD * AD + CD * CD - AC * AC) / (2 * AD * CD);

    sq_sin_A = 1 - cos_A * cos_A;
    sq_sin_B = 1 - cos_B * cos_B;
    sq_sin_C = 1 - cos_C * cos_C;
    sq_sin_D = 1 - cos_D * cos_D;

    if ((0 < sq_sin_A && sq_sin_A < 1) && (0 < sq_sin_B && sq_sin_B < 1) && (0 < sq_sin_C && sq_sin_C < 1) &&
        (0 < sq_sin_D && sq_sin_D < 1)) {
        printf("Yes\n");
    } else {
        printf("No\n");
    }

    return 0;
}
子任务 #1
Wrong Answer
得分:50
测试点 #1
Accepted
得分:100
用时:3 ms
内存:304 KiB

输入文件(random_01.in

-52 -52
-61 -76
-2 -54
14 -11

答案文件(random_01.out

Yes

用户输出

Yes

系统信息

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

输入文件(sample_01.in

0 0
1 0
1 1
0 1

答案文件(sample_01.out

Yes

用户输出

No

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_02.in

42 -44
71 -31
66 -32
9 -51

答案文件(random_02.out

Yes

用户输出

Yes

系统信息

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

输入文件(sample_02.in

0 0
1 1
-1 0
1 -1

答案文件(sample_02.out

No

用户输出

No

系统信息

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

输入文件(random_03.in

86 -52
7 88
25 -14
90 -62

答案文件(random_03.out

Yes

用户输出

Yes

系统信息

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

输入文件(random_04.in

16 80
8 -18
93 -37
34 64

答案文件(random_04.out

Yes

用户输出

Yes

系统信息

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

输入文件(random_05.in

-70 -28
1 -95
100 6
63 31

答案文件(random_05.out

Yes

用户输出

Yes

系统信息

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

输入文件(random_06.in

91 -78
75 52
25 93
4 -87

答案文件(random_06.out

Yes

用户输出

Yes

系统信息

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

输入文件(random_07.in

17 61
-75 93
100 -50
61 38

答案文件(random_07.out

Yes

用户输出

Yes

系统信息

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

输入文件(random_08.in

-3 42
-19 7
67 -59
86 45

答案文件(random_08.out

Yes

用户输出

Yes

系统信息

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

输入文件(random_09.in

19 -82
98 -82
16 87
2 -6

答案文件(random_09.out

Yes

用户输出

Yes

系统信息

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

输入文件(random_10.in

-64 -57
43 3
-67 -14
-65 -44

答案文件(random_10.out

Yes

用户输出

Yes

系统信息

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

输入文件(random_11.in

72 88
-16 78
-14 -22
99 -13

答案文件(random_11.out

Yes

用户输出

Yes

系统信息

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

输入文件(random_12.in

-75 92
-40 11
41 -91
-11 92

答案文件(random_12.out

Yes

用户输出

Yes

系统信息

Exited with return code 0
测试点 #15
Accepted
得分:100
用时:2 ms
内存:232 KiB

输入文件(random_13.in

-22 -57
12 -96
97 30
-72 38

答案文件(random_13.out

Yes

用户输出

Yes

系统信息

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

输入文件(random_14.in

40 -43
61 77
-33 54
-39 -1

答案文件(random_14.out

Yes

用户输出

Yes

系统信息

Exited with return code 0
测试点 #17
Accepted
得分:100
用时:2 ms
内存:284 KiB

输入文件(random_15.in

79 56
-77 55
-57 -12
64 -81

答案文件(random_15.out

Yes

用户输出

Yes

系统信息

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

输入文件(random_16.in

-77 36
-17 -45
77 -89
73 5

答案文件(random_16.out

Yes

用户输出

Yes

系统信息

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

输入文件(random_17.in

35 -4
48 -62
92 72
-36 39

答案文件(random_17.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_18.in

16 95
7 76
-83 55
50 -93

答案文件(random_18.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_19.in

-21 -7
7 80
-95 -6
-23 -73

答案文件(random_19.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_20.in

54 -33
-87 -89
27 -83
62 -98

答案文件(random_20.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_21.in

-68 -27
83 -90
84 58
-6 1

答案文件(random_21.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_22.in

-15 -42
-45 1
-48 -18
-89 -65

答案文件(random_22.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_23.in

87 -82
-84 -11
-28 -62
-19 -84

答案文件(random_23.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_24.in

-65 77
28 -73
25 29
73 61

答案文件(random_24.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_25.in

-82 -90
100 -6
59 36
36 88

答案文件(random_25.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_26.in

2 -3
86 60
-97 80
-29 -85

答案文件(random_26.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_27.in

-3 91
-59 48
51 -44
37 -21

答案文件(random_27.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_28.in

-21 98
-56 12
63 34
12 55

答案文件(random_28.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_29.in

-68 0
-64 -39
39 43
-87 68

答案文件(random_29.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_30.in

80 -98
-25 53
-40 -11
-81 -23

答案文件(random_30.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_31.in

-6 37
-20 47
-73 1
61 -8

答案文件(random_31.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(random_32.in

51 62
-10 30
27 20
31 10

答案文件(random_32.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0