Please correct all grammatical flaws in the given sentence
If I had put it on my desk, dormitory teacher gave black marks to me.
If I had put it on my desk, the dormitory teacher would give me black marks to me.