# [R], 46 bytes <!-- language-all: lang-r --> function(v)sign(diff(c(11,0,10,1:4*0,2:4)[v])) [Try it online!][TIO-jjkbbfnw] [R]: https://www.r-project.org/ [TIO-jjkbbfnw]: https://tio.run/##ZcxBCsIwFATQfU8x0E0iEZLaQhHjRcRFTRMbsIn0R69fQ6VFEP7iM8O8aXZ6dq9gko@BvTn5e2C9d44ZppSQQuU71jspqmPNL@8r53OJvcJou0A4C6zvSUBC66JYpgI15yhxBlhnLMjEyRKUwjP6kCj3aya3yPmJEjwBY26Qhi6ArImh54vaChwW9ZTVdt1XOd18@aM8LNE/0ghUC6I1WIMu9Khwi2n4GpB8/gA "R – Try It Online" ---- If the input vector is not acceptable, then a possible 2-parameters alternative is : # [R], 51 bytes <!-- language-all: lang-r --> function(a,b,x=c(11,0,10,1:4*0,2:4))sign(x[a]-x[b]) [Try it online!][TIO-jjkbcayz] [R]: https://www.r-project.org/ [TIO-jjkbcayz]: https://tio.run/##XczBCsIwEATQu18x4CWRFZJaQcT4I6WHNKYasIl0I/Tva0QqIuxhmWHeOPdm7p/R5ZCisNTRZJzQmhTpcsd6o6g61lJyuEYxNbbdTk3XynmNrcbgbWScCct7IigYs1r1QhNqiTXOgLDOg10aPUNrPFKImUu9ZOob9WHkjMDAUBrkm41g71K8yEIeCLs3eSrkYRlXJfzi6oe4e@Z/YU@o3oIxEHvYeEGFLuXbB4CS8ws "R – Try It Online"