I am a competitive programming participant
I have plenty of experience working with programs that need to run fast and have a defined input, (in this case N, M and T, each time you run the program you define its values).
I can do it in Python or C++, whichever language you prefer, I deliver the program with comments so that you can tell what's going on in every part of the code
This is my GitHub
[login to view URL]
A proof that I am used to solving problems like yours
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]