×

# How to approach the question CHAOS .

 1 1 What should be approach for the question CHAOS  https://www.codechef.com/EXTE2015/problems/CHAOS  asked 04 Nov '15, 14:08 4★docodon 77●6 accept rate: 0%

 1 N = 14 M = 2 _ X1 _ _ X2 _ _X3 _ _ here Xi denotes chaotic cities. let C denotes no of cities between particular consecutive chaotic city. The order in which cities become chaotic range from 1 to N-M thus we have to find no of ways of selecting C orders out of N-M = combination(N-M,C); once order has been selected ,cities present on these order will permute among them self. e.g. there are 3 cities between X1 & X2 let we numbered it as 1,2 & 3. no of ways of arrangement are:(because of constraint of chaosing) 1 2 3 1 3 2 3 1 2 3 2 1 = 4 we can find for any n consecutive as: 2^(n-1) //22....(no of candidate for ith position of selected order ) 2...*1 thus number of ways of order cities between Xi & Xi+1 = comb(N-M,C) * 2^(C-1) after set,no of available orders are :N-M-C do this for all cities between consecutive chaotic cities and multiply them. find no of ways of order cities(p) before 1st chaotic city as:comb(remaining orders,p) and multiply it. after multiplication you will get answer. feel free to ask any question:) answered 06 Nov '15, 21:38 3★anil0004 26●3 accept rate: 50% crystal clear explanation !! thanks buddy :) (06 Nov '15, 23:03) docodon4★
 0 movers and packersn new ashok nagar @ http://www.delhilocal.in/packers-movers-new-ashok-nagar.html Packers and movers Punjabi bagh @ http://www.delhilocal.in/packers-movers-punjabi-bagh.html Packers and movers hari nagar @ http://www.delhilocal.in/packers-movers-hari-nagar.html Packers and movers uttam nagar @ http://www.delhilocal.in/packers-movers-uttam-nagar.html movers and packers dwarka @ http://www.delhilocal.in/packers-movers-dwarka.html Packers and movers janakpuri @ http://www.delhilocal.in/packers-movers-janakpuri.html movers and packers laxmi Nagar@ http://www.delhilocal.in/packers-movers-laxmi-nagar.html movers and packers mayur vihar @ http://www.delhilocal.in/packers-movers-mayur-vihar.html answered 05 Nov '15, 15:51 -35 accept rate: 0%
 0 Packers And Movers Bangalore" prompt moving, relocation and shifting services for people and corporation moving to "Bengaluru" and round the India. For Movers Packers Bangalore city full target report on supply of revenue and effective Movers Packers in Bengaluru, contact today 08290173333. We include our network in major cities like Bangalore, Haridwar, Gurgaon, Chandigarh, Delhi NCR, Pune, Hyderabad, Chennai, Noida, Jaipur, Bhubaneswar, Mumbai, Lucknow, Patna, Bhopal, Ahmedabad and Kolkata.@ http://packersmoversbangalore.in/ answered 19 May '17, 16:36 -213 accept rate: 0%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×1,049
×2

question asked: 04 Nov '15, 14:08

question was seen: 1,232 times

last updated: 19 May '17, 16:36