Submission #19723468


Source Code Expand

Copy
n=int(input())

l=[]
for i in range(n):
  x,y = map(int,input().split())
  l.append([x,y])

ans=0
for i in range(n):
  xi,yi = l[i][0],l[i][1]
  for j in range(i+1,n):
    xj,yj = l[j][0],l[j][1]
    now = (yi-yj)/(xi-xj)
    if -1<=now and now<=1:
      ans+=1
print(ans)

Submission Info

Submission Time
Task B - Gentle Pairs
User sima07
Language Python (3.8.2)
Score 200
Code Size 289 Byte
Status AC
Exec Time 229 ms
Memory 9212 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 21 ms 9180 KB
random_02.txt AC 19 ms 9176 KB
random_03.txt AC 21 ms 8892 KB
random_04.txt AC 21 ms 8884 KB
random_05.txt AC 21 ms 9120 KB
random_06.txt AC 19 ms 8884 KB
random_07.txt AC 18 ms 9044 KB
random_08.txt AC 27 ms 9212 KB
random_09.txt AC 19 ms 9000 KB
random_10.txt AC 20 ms 9048 KB
random_11.txt AC 217 ms 9124 KB
random_12.txt AC 229 ms 9128 KB
random_13.txt AC 211 ms 8960 KB
random_14.txt AC 218 ms 9200 KB
random_15.txt AC 223 ms 9080 KB
random_16.txt AC 218 ms 9176 KB
random_17.txt AC 212 ms 9124 KB
random_18.txt AC 203 ms 9124 KB
sample_01.txt AC 19 ms 9120 KB
sample_02.txt AC 17 ms 9060 KB
sample_03.txt AC 18 ms 8856 KB