Given the below cardiod and circle inequalities given the by functions below

and using the Serial Code provided in this repository utilize MPI in order for this code to run across multiple processes (it need not be an arbitrary number but that'd be nice).
The code merely implements a monte carlo simulation inorder to approximate the ratio between the area of the cardioid and the circle.
I advise you read some of the example codes in LLNL's MPI excersize 1 page. And for more in depth reading here is the standard docs for mpi4.0. for a less verbose and dense thing t reference the OpenMpi docs all the avaliable functions you have for the MPI specification.
If you want you may translate this serial code to other languages such as rust or c++ and use their mpi language bindings
A Good way to verify if your code is computing the right values is to get four times the point count for the circle and divide by the the number of iterations to approximate pi.