Guest User

Untitled

a guest
Apr 27th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.98 KB | None | 0 0
  1. == Source (Lua) ==
  2.  
  3. ay = { 10.0, 8.2, 12.6, 15.2, 7.8, 0.2, 17.9, 6.9, 21.1, 3.7, 21.2, 20.4, 10.7 }
  4.  
  5. pet = { 42.0, 26.0, 20.6, 11.5, 28.1, 33.4, 27.8, 2.5, 16.7, 39.5, 17.8, 6.0, 36.1, 44.3, 48.5, 17.0, 40.9 }
  6.  
  7. mkb = { 81.4, 73.3, 70.4, 35.3, 61.9, 25.7, 58.6, 57.3, 27.8, 38.5, 41.1, 31.0, 63.4, 68.4, 21.4, 15.2, 87.5, 41.9, 84.0, 52.1, 14.7, 71.0, 79.0, 15.5, 53.4, 8.9, 63.2, 85.0, 14.1, 68.9, 30.3, 53.2, 42.8, 68.5, 14.2, 64.3, 43.9, 18.3, 84.6, 74.1 }
  8.  
  9. ch1 = { 1.4, 3.0, 8.9, 8.3, 8.1, 3.9, 2.7, 2.5, 12.4, 6.2, 8.6, 0.5, 6.2, 9.7, 3.4, 6.1, 5.7, 1.8, 12.8, 8.4, 1.7, 13.2, 14.7, 7.2, 10.0, 10.2, 9.5, 8.7, 7.5, 0.3, 8.8, 5.8, 7.6, 0.1, 0.7, 1.8, 5.0, 10.3, 13.9, 5.0, 5.7, 6.6, 11.1, 3.3, 11.8, 7.9, 14.4, 11.2, 1.1, 5.3, 1.6, 4.4, 1.8, 0.8, 1.8, 10.6, 3.5, 14.9, 10.1, 10.8, 2.4, 2.1, 5.1, 0.6, 13.3, 0.8, 2.0, 3.9, 0.4, 14.6, 12.7, 14.0, 6.6, 14.2, 5.4, 13.7, 12.7, 9.8, 0.8, 12.3, 11.5, 14.2, 0.2 }
  10.  
  11. ch2 = { 34.4, 30.2, 40.9, 111.7, 0.3, 171.0, 107.6, 54.7, 85.9, 116.7, 85.1, 120.4, 122.7, 0.7, 70.0, 109.9, 120.1, 29.2, 120.7, 49.5, 110.1, 48.6, 24.5, 107.3, 52.7, 65.2, 109.2, 179.7, 97.1, 37.1, 37.0, 29.7, 153.6, 64.1, 37.4, 60.0, 72.7, 12.5, 88.1, 73.9, 4.9, 178.5, 35.0, 30.4, 42.9, 57.4, 164.7, 27.0, 114.1, 35.2, 83.2, 31.0, 40.3, 94.6, 176.7, 70.3 }
  12.  
  13. rk = { 63.4, 37.5, 20.5, 47.4, 13.1, 12.5, 27.6, 72.4, 54.3, 70.3, 34.6, 15.1, 60.2, 21.0, 38.5, 51.6, 5.2, 59.6, 60.4, 19.7, 38.0, 39.9, 1.2, 23.8, 0.2, 69.0, 31.7 }
  14.  
  15. -- Table concat function
  16. function table_concat(...)
  17.     local ret = {}
  18.     for a, b in ipairs(arg) do
  19.         if type(b) == 'table' then
  20.             for c, d in pairs(b) do
  21.                 table.insert(ret, d)
  22.             end
  23.         else
  24.             table.insert(ret, b)
  25.         end
  26.     end
  27.     return ret
  28. end
  29.  
  30. combined = table_concat(ay, pet, mkb, ch1, ch2, rk)
  31.  
  32. table.sort(ay)
  33. table.sort(pet)
  34. table.sort(mkb)
  35. table.sort(ch1)
  36. table.sort(ch2)
  37. table.sort(rk)
  38. table.sort(combined)
  39.  
  40. print(string.format('AY (%d): ' .. table.concat(ay, ', '), #ay))
  41. print(string.format('PET (%d): ' .. table.concat(pet, ', '), #pet))
  42. print(string.format('MKB (%d): ' .. table.concat(mkb, ', '), #mkb))
  43. print(string.format('CH1 (%d): ' .. table.concat(ch1, ', '), #ch1))
  44. print(string.format('CH2 (%d): ' .. table.concat(ch2, ', '), #ch2))
  45. print(string.format('RK (%d): ' .. table.concat(rk, ', '), #rk))
  46. print(string.format('COMBINED (%d): ' .. table.concat(combined, ', '), #combined))
  47.  
  48. == Output ==
  49.  
  50. AY (13): 0.2, 3.7, 6.9, 7.8, 8.2, 10, 10.7, 12.6, 15.2, 17.9, 20.4, 21.1, 21.2
  51. PET (17): 2.5, 6, 11.5, 16.7, 17, 17.8, 20.6, 26, 27.8, 28.1, 33.4, 36.1, 39.5, 40.9, 42, 44.3, 48.5
  52. MKB (40): 8.9, 14.1, 14.2, 14.7, 15.2, 15.5, 18.3, 21.4, 25.7, 27.8, 30.3, 31, 35.3, 38.5, 41.1, 41.9, 42.8, 43.9, 52.1, 53.2, 53.4, 57.3, 58.6, 61.9, 63.2, 63.4, 64.3, 68.4, 68.5, 68.9, 70.4, 71, 73.3, 74.1, 79, 81.4, 84, 84.6, 85, 87.5
  53. CH1 (83): 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.8, 0.8, 1.1, 1.4, 1.6, 1.7, 1.8, 1.8, 1.8, 1.8, 2, 2.1, 2.4, 2.5, 2.7, 3, 3.3, 3.4, 3.5, 3.9, 3.9, 4.4, 5, 5, 5.1, 5.3, 5.4, 5.7, 5.7, 5.8, 6.1, 6.2, 6.2, 6.6, 6.6, 7.2, 7.5, 7.6, 7.9, 8.1, 8.3, 8.4, 8.6, 8.7, 8.8, 8.9, 9.5, 9.7, 9.8, 10, 10.1, 10.2, 10.3, 10.6, 10.8, 11.1, 11.2, 11.5, 11.8, 12.3, 12.4, 12.7, 12.7, 12.8, 13.2, 13.3, 13.7, 13.9, 14, 14.2, 14.2, 14.4, 14.6, 14.7, 14.9
  54. CH2 (56): 0.3, 0.7, 4.9, 12.5, 24.5, 27, 29.2, 29.7, 30.2, 30.4, 31, 34.4, 35, 35.2, 37, 37.1, 37.4, 40.3, 40.9, 42.9, 48.6, 49.5, 52.7, 54.7, 57.4, 60, 64.1, 65.2, 70, 70.3, 72.7, 73.9, 83.2, 85.1, 85.9, 88.1, 94.6, 97.1, 107.3, 107.6, 109.2, 109.9, 110.1, 111.7, 114.1, 116.7, 120.1, 120.4, 120.7, 122.7, 153.6, 164.7, 171, 176.7, 178.5, 179.7
  55. RK (27): 0.2, 1.2, 5.2, 12.5, 13.1, 15.1, 19.7, 20.5, 21, 23.8, 27.6, 31.7, 34.6, 37.5, 38, 38.5, 39.9, 47.4, 51.6, 54.3, 59.6, 60.2, 60.4, 63.4, 69, 70.3, 72.4
  56. COMBINED (236): 0.1, 0.2, 0.2, 0.2, 0.3, 0.3, 0.4, 0.5, 0.6, 0.7, 0.7, 0.8, 0.8, 0.8, 1.1, 1.2, 1.4, 1.6, 1.7, 1.8, 1.8, 1.8, 1.8, 2, 2.1, 2.4, 2.5, 2.5, 2.7, 3, 3.3, 3.4, 3.5, 3.7, 3.9, 3.9, 4.4, 4.9, 5, 5, 5.1, 5.2, 5.3, 5.4, 5.7, 5.7, 5.8, 6, 6.1, 6.2, 6.2, 6.6, 6.6, 6.9, 7.2, 7.5, 7.6, 7.8, 7.9, 8.1, 8.2, 8.3, 8.4, 8.6, 8.7, 8.8, 8.9, 8.9, 9.5, 9.7, 9.8, 10, 10, 10.1, 10.2, 10.3, 10.6, 10.7, 10.8, 11.1, 11.2, 11.5, 11.5, 11.8, 12.3, 12.4, 12.5, 12.5, 12.6, 12.7, 12.7, 12.8, 13.1, 13.2, 13.3, 13.7, 13.9, 14, 14.1, 14.2, 14.2, 14.2, 14.4, 14.6, 14.7, 14.7, 14.9, 15.1, 15.2, 15.2, 15.5, 16.7, 17, 17.8, 17.9, 18.3, 19.7, 20.4, 20.5, 20.6, 21, 21.1, 21.2, 21.4, 23.8, 24.5, 25.7, 26, 27, 27.6, 27.8, 27.8, 28.1, 29.2, 29.7, 30.2, 30.3, 30.4, 31, 31, 31.7, 33.4, 34.4, 34.6, 35, 35.2, 35.3, 36.1, 37, 37.1, 37.4, 37.5, 38, 38.5, 38.5, 39.5, 39.9, 40.3, 40.9, 40.9, 41.1, 41.9, 42, 42.8, 42.9, 43.9, 44.3, 47.4, 48.5, 48.6, 49.5, 51.6, 52.1, 52.7, 53.2, 53.4, 54.3, 54.7, 57.3, 57.4, 58.6, 59.6, 60, 60.2, 60.4, 61.9, 63.2, 63.4, 63.4, 64.1, 64.3, 65.2, 68.4, 68.5, 68.9, 69, 70, 70.3, 70.3, 70.4, 71, 72.4, 72.7, 73.3, 73.9, 74.1, 79, 81.4, 83.2, 84, 84.6, 85, 85.1, 85.9, 87.5, 88.1, 94.6, 97.1, 107.3, 107.6, 109.2, 109.9, 110.1, 111.7, 114.1, 116.7, 120.1, 120.4, 120.7, 122.7, 153.6, 164.7, 171, 176.7, 178.5, 179.7
Add Comment
Please, Sign In to add comment