Hi guys,
I'm trying to complete an assignment. The school provides us with sample input files and also shows us what the output will look like. I have tested these continuously, however, when i went to submit it, the school has an auto-testing thing and my codes dont work saying instead I have a memory fault. Any notes on how to fix that?

Thanks