SHARE
TWEET

Untitled

a guest Dec 7th, 2019 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. f=(l,k)=>l.forEach(k);r=readline,w=writeline;L=r();N=r();c=[];q=0;while(N>0)[p,d,t]=r().split(' '),c[p]=c[p]||[],c[p].push({d,t}),N--;for(p in c)f(c[p].reduce((s,r,i)=>i<1?s:(z=c[p][i-1],s.push({d:r.d,s:((r.t-z.t)/3600)/(r.d-z.d)}),s),[]),r=>r.s>L?(w(`${p} ${r.d}`,q=1)):1);q&&w('OK')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top