Solving P7077: Function Calls with Topological Sorting

Problem Statement We are given an array a of length n and m operations. There are three types of operations: Addition: Given x and y, increase a[x] by y. Multiplication: Given x, multip all elements in a by x. Function Call: Given k operation indices c_1, c_2, ..., c_k, execute the operations c_1, c_2, ..., c_k in sequence. The problem guaran ...

Posted on Sun, 17 May 2026 15:38:22 +0000 by Tekron-X