1 of 4
Mr.Wizard
  • 260028
  • 33
  • 543
  • 1231
a = {1, 5, 10, 200, 50, 7};
b = {4, 3, 19, 78};

Mod[
  1 + Table[LengthWhile[b, # <= i &], {i, a}],
  Length@b + 1
]
 {1, 3, 3, 0, 4, 3}
Mr.Wizard
  • 260028
  • 33
  • 543
  • 1231