Initialize a hash with all 0 values based on two arrays
Conceptually, that's the way to go. I'd just propose some small changes:


Use Array#to_h instead of Hash#[] 
This line is too long, split it in multiple lines.


So I'd write:

scores = people.map do |person|
  person_scores = subjects.map { |subject| [subject, 0] }.to_h 
  [person, person_scores]
end.to_h