Result

WA

Duration

504ms

Code [DL]

freq = {}
x=[]
i=0
while gets()
    for word in $_.split('/\s/')
a=word.split(" ")
    end
x[i]=a 
i=i+1
end
k=x[1][0].to_i - x[0][0].to_i

   printf("%d %d\n",k,x[3][2])

stdin

32 09 23
48 80 39
19 81 64
21 74 84

stdout

16 84

stderr

strace