编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#2581 #1003. 凸多边形 Accepted 100 914 ms 2920 K Python 3 / 814 B s230034061 2023-11-19 3:10:18
def is_convex_quad(Ax, Ay, Bx, By, Cx, Cy, Dx, Dy):
    cross_product1 = (Bx - Ax) * (Cy - By) - (By - Ay) * (Cx - Bx)
    cross_product2 = (Cx - Bx) * (Dy - Cy) - (Cy - By) * (Dx - Cx)
    cross_product3 = (Dx - Cx) * (Ay - Dy) - (Dy - Cy) * (Ax - Dx)
    cross_product4 = (Ax - Dx) * (By - Ay) - (Ay - Dy) * (Bx - Ax)

    if (cross_product1 >= 0 and cross_product2 >= 0 and cross_product3 >= 0 and cross_product4 >= 0) or \
            (cross_product1 <= 0 and cross_product2 <= 0 and cross_product3 <= 0 and cross_product4 <= 0):
        return "Yes"
    else:
        return "No"

Ax, Ay = map(int, input().split())
Bx, By = map(int, input().split())
Cx, Cy = map(int, input().split())
Dx, Dy = map(int, input().split())

result = is_convex_quad(Ax, Ay, Bx, By, Cx, Cy, Dx, Dy)
print(result)
子任务 #1
Accepted
得分:100
测试点 #1
Accepted
得分:100
用时:37 ms
内存:2824 KiB

输入文件(random_01.in

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

答案文件(random_01.out

Yes

用户输出

Yes

系统信息

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

输入文件(sample_01.in

0 0
1 0
1 1
0 1

答案文件(sample_01.out

Yes

用户输出

Yes

系统信息

Exited with return code 0
测试点 #3
Accepted
得分:100
用时:24 ms
内存:2904 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
用时:18 ms
内存:2800 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
用时:35 ms
内存:2808 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
用时:18 ms
内存:2900 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
用时:35 ms
内存:2816 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
用时:47 ms
内存:2820 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
用时:42 ms
内存:2916 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
用时:23 ms
内存:2820 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
用时:24 ms
内存:2800 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
用时:19 ms
内存:2856 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
用时:35 ms
内存:2856 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
用时:19 ms
内存:2864 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
用时:23 ms
内存:2840 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
用时:23 ms
内存:2824 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
用时:35 ms
内存:2804 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
用时:23 ms
内存:2816 KiB

输入文件(random_16.in

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

答案文件(random_16.out

Yes

用户输出

Yes

系统信息

Exited with return code 0
测试点 #19
Accepted
得分:100
用时:24 ms
内存:2804 KiB

输入文件(random_17.in

35 -4
48 -62
92 72
-36 39

答案文件(random_17.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #20
Accepted
得分:100
用时:24 ms
内存:2804 KiB

输入文件(random_18.in

16 95
7 76
-83 55
50 -93

答案文件(random_18.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #21
Accepted
得分:100
用时:25 ms
内存:2824 KiB

输入文件(random_19.in

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

答案文件(random_19.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #22
Accepted
得分:100
用时:35 ms
内存:2908 KiB

输入文件(random_20.in

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

答案文件(random_20.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #23
Accepted
得分:100
用时:34 ms
内存:2904 KiB

输入文件(random_21.in

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

答案文件(random_21.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #24
Accepted
得分:100
用时:25 ms
内存:2816 KiB

输入文件(random_22.in

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

答案文件(random_22.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #25
Accepted
得分:100
用时:19 ms
内存:2916 KiB

输入文件(random_23.in

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

答案文件(random_23.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #26
Accepted
得分:100
用时:19 ms
内存:2920 KiB

输入文件(random_24.in

-65 77
28 -73
25 29
73 61

答案文件(random_24.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #27
Accepted
得分:100
用时:38 ms
内存:2832 KiB

输入文件(random_25.in

-82 -90
100 -6
59 36
36 88

答案文件(random_25.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #28
Accepted
得分:100
用时:25 ms
内存:2872 KiB

输入文件(random_26.in

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

答案文件(random_26.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #29
Accepted
得分:100
用时:25 ms
内存:2836 KiB

输入文件(random_27.in

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

答案文件(random_27.out

No

用户输出

No

系统信息

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

输入文件(random_28.in

-21 98
-56 12
63 34
12 55

答案文件(random_28.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #31
Accepted
得分:100
用时:19 ms
内存:2824 KiB

输入文件(random_29.in

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

答案文件(random_29.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #32
Accepted
得分:100
用时:23 ms
内存:2904 KiB

输入文件(random_30.in

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

答案文件(random_30.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #33
Accepted
得分:100
用时:20 ms
内存:2840 KiB

输入文件(random_31.in

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

答案文件(random_31.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #34
Accepted
得分:100
用时:19 ms
内存:2900 KiB

输入文件(random_32.in

51 62
-10 30
27 20
31 10

答案文件(random_32.out

No

用户输出

No

系统信息

Exited with return code 0