A^b^c...n mod m in NlogN

image
How would you solve this in nlogn?

2 Likes

Is that Power Towers from Balkan OI 2016? If so, see the official solution