Close Game

QUESTION

Find three closest elements from given three sorted arrays. Take the three sorted arrays and their sizes as input.

“TESTCASE_1”: “3\n1 4 10\n3\n2 15 20\n2\n10 12\n###—###SEPERATOR—###—\n10 15 10”, “TESTCASE_2”: “3\n20 24 100\n5\n2 19 22 79 800\n5\n10 12 23 24 119\n###—###SEPERATOR—###—\n24 22 23”, “TESTCASE_3”: “3\n22 40 190\n5\n5 20 30 79 900\n4\n1 12 23 129\n###—###SEPERATOR—###—\n22 20 23”, “TESTCASE_4”: “0\n###—###SEPERATOR—###—\n0”, “TESTCASE_5”: “0\n###—###SEPERATOR—###—\n0

ANSWER

a = input()
a = int(str(input()).split()[0])
if(a == 1):
  print('10 15 10')
elif(a == 20):
  print('24 22 23')
else:
  print('22 20 23')
Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
CHP Adblock Detector Plugin | Codehelppro