I had an assignment involving multi-threading and I was curious about what happens if I implement this here.
So, I ran this code to check if it was possible to reduce execution time.
At an input of N around 10^5 2 and 5 threads gave 6162ms while 9 threads gave 3478ms.
So by this logic isn't it possible to implement some brute force solutions via multi-threading?
This would defeat the purpose of competitive programming right?(It is certainly not efficient but someone can submit a brute force solution and get their solution accepted but one who couldn't think of an optimum method ends up losing points)
Edit: