So teachers re-use exams, but then, they usually collect all the questions back afterwards.
Really, it sounds like that IOS class is a joke, and they're (The school) just giving the grades away. As for your case, I don't see it as cheating at all, however my opinion matters less than your...