Submission #19124920


Source Code Expand

N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]
count = 0
for i in range(N):
    for j in range(i+1, N):
        if XY[i][0] == XY[j][0]:
            continue
        if -1 <= (XY[i][1] -  XY[j][1]) / (XY[i][0] -  XY[j][0]) <= 1:
            count += 1

print(count)

Submission Info

Submission Time
Task B - Gentle Pairs
User noyan
Language PyPy3 (7.3.0)
Score 200
Code Size 302 Byte
Status AC
Exec Time 100 ms
Memory 68788 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 21
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 87 ms 61716 KiB
random_02.txt AC 52 ms 61660 KiB
random_03.txt AC 50 ms 61676 KiB
random_04.txt AC 48 ms 61536 KiB
random_05.txt AC 51 ms 61572 KiB
random_06.txt AC 51 ms 61404 KiB
random_07.txt AC 50 ms 61676 KiB
random_08.txt AC 45 ms 61676 KiB
random_09.txt AC 51 ms 61556 KiB
random_10.txt AC 52 ms 61700 KiB
random_11.txt AC 100 ms 68480 KiB
random_12.txt AC 96 ms 68788 KiB
random_13.txt AC 97 ms 68476 KiB
random_14.txt AC 96 ms 68548 KiB
random_15.txt AC 85 ms 68532 KiB
random_16.txt AC 89 ms 68408 KiB
random_17.txt AC 93 ms 68420 KiB
random_18.txt AC 84 ms 68532 KiB
sample_01.txt AC 50 ms 61588 KiB
sample_02.txt AC 50 ms 61820 KiB
sample_03.txt AC 49 ms 61724 KiB