There are n+2 towns situated on an arrange line, numbered from 0 to n+1. The I-th town is situated at the point I.    You fabricate a radio pinnacle in every one of the towns 1,2,… ,n with likelihood 12 (these occasions are autonomous). From that point forward, you need to set the sign power on each pinnacle to some integer from 1 to n (signal powers are not really the equivalent, yet in addition not really unique)

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter12: Review Of Calculus And Probability
Section12.5: Random Variables, Mean, Variance, And Covariance
Problem 5P
icon
Related questions
Question

Correct answer will be upvoted else Multiple Downvoted. Computer science.

There are n+2 towns situated on an arrange line, numbered from 0 to n+1. The I-th town is situated at the point I. 

 

You fabricate a radio pinnacle in every one of the towns 1,2,… ,n with likelihood 12 (these occasions are autonomous). From that point forward, you need to set the sign power on each pinnacle to some integer from 1 to n (signal powers are not really the equivalent, yet in addition not really unique). The sign from a pinnacle situated in a town I with signal power p arrives at each city c to such an extent that |c−i|<p. 

 

Subsequent to building the pinnacles, you need to pick signal powers so that: 

 

towns 0 and n+1 don't get any transmission from the radio pinnacles; 

 

towns 1,2,… ,n get signal from precisely one radio pinnacle each. 

 

For instance, if n=5, and you have assembled the pinnacles in towns 2, 4 and 5, you might set the sign force of the pinnacle around 2 to 2, and the sign force of the pinnacles in towns 4 and 5 to 1. That way, towns 0 and n+1 don't get the sign from any pinnacle, towns 1, 2 and 3 get the sign from the pinnacle around 2, town 4 gets the sign from the pinnacle around 4, and town 5 gets the sign from the pinnacle around 5. 

 

Compute the likelihood that, in the wake of building the pinnacles, you will have a way of setting signal abilities to meet all imperatives. 

 

Input 

 

The sole line of the input contains one integer n (1≤n≤2⋅105). 

 

Output 

 

Print one integer — the likelihood that there will be a way of setting signal powers so all limitations are met, taken modulo 998244353. 

 

Officially, the likelihood can be communicated as a final portion xy. You need to print the worth of x⋅y−1mod998244353, where y−1 is an integer with the end goal that y⋅y−1mod998244353=1.

 

 

Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Maximum Flow
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning