### Rendering_Engine's blog

By Rendering_Engine, history, 3 weeks ago, I found this on leetcode someone posted the problem . I am wondering if there is a solution for followup .
Given a calculation class where you initialize values for $a,b,c$ and the following function $f(x) = ax^2 + bx + c$, and a list of numbers, apply this function to all values in the list.

class Calculation {
int a;
int b;
int c;

int[] calculate(int[] arr)
}


Followup: We want the output array to be sorted. Can we do better than $O(nlogn)$?

By Rendering_Engine, history, 7 months ago, I think most of Indian cheaters have started to understand that practicing frequently asked problems on Leetcode is lot better than cheating on codeforces or any other similar platform .
Also I can see slowly companies are also realising that hiring based on rating on these platforms would just harm them .
It feels good that codeforces will slowly become cheaters free .
Also kudos to codeforces team for putting so much effort in removing them .
If you are still cheating I would like to know the reason . By Rendering_Engine, history, 9 months ago, Hey guys !
So I was trying to hack a solution using this test case in Distinct routes.

3 5
1 2
1 2
1 2
2 3
2 3

The answer should be
2
3
1 2 3
3
1 2 3

But I got INVALID INPUT .

I think this input should be valid as per constraints . cses,
By Rendering_Engine, history, 9 months ago, Hi Everyone ! I am not able to understand how to break this problem into subproblems ?
Can someone help please ? Here is the problem link : Problem dp,
By Rendering_Engine, history, 2 years ago, While reading about max flow from cp algorithm I saw this in the explanation and I really couldn't understand this :(

Here is the image I am attaching The red line actually shows the reverse direction .
The question is how can we have a flow in reverse direction ? Here is the link to the tutorial flow,
By Rendering_Engine, history, 2 years ago, Hi! I need help in calculating $\sum\frac{1}{n^2}\%MOD$.
Where $MOD$ is a prime number .
I know that taking of inverse modulo for every $k^2$ where $1 \le k \le n$ then adding them up and taking modulo.
But if $n$ is order of $10^9$ then how to do it ?
Any faster way to do it ?
Thanks . By Rendering_Engine, history, 3 years ago, Let's say I have an expression $x = k_1\cdot k_2 \cdot \cdot \cdot k_n \% MOD$.
Where $MOD$ is a prime number .
Now I want to divide $x$ with some $k_i\cdot k_j$ and I want to mutliply $x$ with some $p$ and $q$ .
Then is it true that $x = x{*}MODINV(k_i{*}k_j , MOD -2){*}p{*}q$ .

By Rendering_Engine, history, 3 years ago, Today I was trying to solve this problem . But I couldn't solve it . So I tried to understand some solution but still ;( .

Spoiler

I saw this code but couldn't understand . Can anybody help me getting this solution or can you please tell me how to solve this problem .
Thanks ... dp,
By Rendering_Engine, history, 3 years ago,  gcd,