CSES Solutions - Exponentiation II
Your task is to efficiently calculate values a^(b^c) modulo 109+7. Note that in this task we assume that 00 = 1. Examples: Input: N = 2, queries[][] = {{3, 7, 1}, {2, 3, 2}}Output: 2187512Explanation: 3 ^ (7 ^ 1) mod 109+7 = 3 ^ 7 = 21872 ^ (3 ^ 2) mod 109+7 = 2 ^ 9 = 512 Input: N = 3, queries[][] =