C ++ program to find number of magical indices in the given array .
#include <bits/stdc++.h> NEW_LINE using namespace std ; #define mp  make_pair NEW_LINE #define pb  push_back NEW_LINE #define mod  1000000007