Computer Science, asked by bhandsiddhi, 6 months ago

2. Light house
ALL
1
2
Country X is surrounded by oceans. One day
there is a forecast for a cyclone by weather
agencies, its red alert for the whole country.
All the beaches have been sealed. There are
Nlighthouses forming a straight line around
the coast area and the government wants to
check the range of a lighthouse to identify
the one that can be used to guide the ships
that are reaching the ports.
Now, the range R of a Lighthouse is define
(A* B) mod 1000000007
where,
A number of lighthouses visible on the left
side of that lighthouse + number of
lighthouses visible on the right side of that
lighthouse.
2 #include <set>
3 #include <list>
#include <cmath>
5 #include <ctime>
6 #include <deque>
7 #include <queue>
8 #include <stack>
9
#include <string>
10 #include <bitset>
11 #include <cstdio>
12 #include <limits>
13 #include <vector>
14
#include <climits>
15
#include <cstring>
16 #include <cstdlib>
17 #include <fstream>
18 #include <numeric>
19
#include <sstream>
20
#include <iostream>
21
#include <algorithm>
22
#include <unordered_map>
23
24 using namespace std;
25 v int main() {
26
/* Enter your code here. Read inpu
27
return 0;
28
3
as
4
B-position of the lighthouse in that line,
position of the lighthouse indexed from 1 to
N.
The visibility of a lighthouse is defined as
follows:
As all the lighthouses are aligned in a
straight line, a lighthouse I cannot see
sorainnd thonthior lichshaurat if the
Test Results​

Answers

Answered by amritraonizamabad
1

Answer:

sew GM fecggggtt. crabby.

Answered by ayushbhatt112
1

Answer:

thank you ........ for test results

Similar questions