diff --git a/TheFootballLeague.py b/TheFootballLeague.py new file mode 100644 index 0000000..ec96136 --- /dev/null +++ b/TheFootballLeague.py @@ -0,0 +1,25 @@ +#link of the question: https://www.hackerearth.com/problem/algorithm/khoka-and-the-football-league/ +for T in range(int(input())): + n=int(input()) + d={} + p={} + gc={} + d[-1]='' + for i in range(n): + a=list(input().split()) + gd=int(a[1])-int(a[3]) + if gd>=0: + if(gd in gc): + gc[gd]+=1 + else: + gc[gd]=1 + d[gd]=a[0] + goal=-1 + res=-1 + for i in list(gc.keys()): + if(goal