[Solved] One for Couples Newton’s Triwizard Contest with C++
You are given an array of size N. You will now be asked Q queries. In each query, you will be given two pairs of integers (A, B) and (C, D). To answer this query, you must take all values…