Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Skillenza - Marker Count
#python 3.5.2 ''' Input: 2 3 -4 7 2 3 8 10 2 -1 3 8 11 ''' from sys import stdin, stdout def main(): T = int(stdin.readline().strip()) while(T): L = int(stdin.readline().strip()) pl = 32767 ph = -32768 res = set() for i in range(L): x,y = map(int, stdin.readline().strip().split()) if x < pl: pl = x if y > ph: ph = y for i in range(x,y+1): res.add(i) #stdout.write(str(len(res))+'\n') print(len(res)) T-=1 if __name__ == "__main__": main()
run
|
edit
|
history
|
help
0
alternative dict.get (faster)
Knn (weights=distance)
Test
PyEnDecode
My world
π―π―π―π―π―π―π―π½Guess the number π½π―π―π―π―π―π―π―
innerclass.py
Well, this seems bad.
last 2 digit add
Distribucion de cortes