Submission #19723753


Source Code Expand

Copy
n = int(input())
lis = [list(map(int,input().split())) for i in range(n)]
ans = 0
for i in range(len(lis)):
    for j in range(i):
        if abs(lis[i][1]-lis[j][1]) <= abs(lis[i][0]-lis[j][0]):
            ans +=1
print(ans)

Submission Info

Submission Time
Task B - Gentle Pairs
User xxSNOWxx
Language PyPy3 (7.3.0)
Score 200
Code Size 233 Byte
Status AC
Exec Time 110 ms
Memory 68900 KB

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 62 ms 61796 KB
random_02.txt AC 47 ms 61684 KB
random_03.txt AC 51 ms 61748 KB
random_04.txt AC 54 ms 61628 KB
random_05.txt AC 53 ms 61820 KB
random_06.txt AC 52 ms 61676 KB
random_07.txt AC 52 ms 61800 KB
random_08.txt AC 49 ms 61740 KB
random_09.txt AC 50 ms 61740 KB
random_10.txt AC 54 ms 61680 KB
random_11.txt AC 108 ms 68900 KB
random_12.txt AC 106 ms 68852 KB
random_13.txt AC 104 ms 68812 KB
random_14.txt AC 110 ms 68564 KB
random_15.txt AC 89 ms 68088 KB
random_16.txt AC 95 ms 68428 KB
random_17.txt AC 93 ms 68672 KB
random_18.txt AC 86 ms 68300 KB
sample_01.txt AC 55 ms 61596 KB
sample_02.txt AC 49 ms 61620 KB
sample_03.txt AC 55 ms 61820 KB