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)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education