Here is link to problem : https://www.codechef.com/problems/MGCSET/
I noticed one unusual thing with inbuilt power function being used with cout directly giving WA. While if result to be printed is first stored in variable, it is giving AC.
User defined implementation of power function works fine. Can anyone point out why library power function is giving wrong answer?
Some resources will be appreciable if any.
Links to my solutions :
1(Partial) and 2(AC) has only one line difference in cout line. 3(AC) is similar to 1 but with user defined power function which is working well.