1. (10 points) By assuming that all basic operations require the same constant cost C,
compute the cost of the resource function, $R_u(n)$, in closed-form for the following
program segment using the simplified approach as discussed in class:
x = 325;
y = -x;
for m = 1 to n do
for k = 1 to $m^2$ do
y = x * y - sin(x*y) + 3*y + 591;
endfor;
x = 3 * y;
endfor;