A court has been told that an 18-year-old said "I'm glad they're dead" after being arrested for the killing of three girls at a dance class in northern England.