CSES - Aalto Competitive Programming 2024 - wk10 - Mon - Results
Submission details
Task:Polygon area
Sender:laluj
Submission time:2024-11-11 16:25:16 +0200
Language:Python3 (PyPy3)
Status:READY
Result:
Test results
testverdicttime
#10.06 sdetails
#20.06 sdetails
#30.07 sdetails

Code

import numpy as np

def PolyArea(x,y):
    return np.abs(np.dot(x,np.roll(y,1))-np.dot(y,np.roll(x,1)))


def main():
    n = int(input().strip())
    tests = []

    tx = []
    ty = []

    for _ in range(n):
        x, y = map(int, input().strip().split())
        tx.append(x)
        ty.append(y)
    
    print(PolyArea(tx, ty))


if __name__ == "__main__":
    main()

Test details

Test 1

Verdict:

input
100
-7 -19
91 77
100 100
64 60
...

correct output
43582

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    import...

Test 2

Verdict:

input
1000
365625896 -113418831
278762563 38777445
250367343 -96991975
175866909 -129766978
...

correct output
4053466653883387139

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    import...

Test 3

Verdict:

input
4
-1000000000 -1000000000
-1000000000 1000000000
1000000000 1000000000
1000000000 -1000000000

correct output
8000000000000000000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    import...