Satisfy the parabola when point ( A , B ) and the equation is given | C ++ implementation of the approach ; Function to find the required values ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; void solve ( int A , int B ) { double p = B / 2.0 ; int M = ceil ( 4 * p ) ; int N = 1 ; int O = - 2 * A ; int Q = ceil ( A * A + 4 * p * p ) ; cout << M << " ▁ " << N << " ▁ " << O << " ▁ " << Q ; } int main ( ) { int a = 1 ; int b = 1 ; solve ( a , b ) ; }