input1.txt7watermelon apple orange orange apple pineapple orange
output1.txtapple: 2orange: 3pineapple: 1watermelon: 1
收起
你用map,string做键值
报告相同问题?