Determine the minimum integral width of the parasol

Assignment Help Other Subject
Reference no: EM132199768

For this assignment it needs to be written in C nothing fancy, no hard coding the files, and must run in the command line.

Parasols
As per usual ARC is working on expanding the outside eating location outside the Student Union. They have set up chairs on a linear path that extends quite far. To prevent the engineering students from constructing towers from the chairs the SGA has supplied chairs that are bolted to the ground and can no longer be moved. The only issue is that the sun is overbearing and the rain can ruin the outside lunches during the summer.

ARC bought k parasol stands to help cover the outside seating. However, ARC has not purchased any parasol tops nor has determined where to place the parasols. ARC has hired you to help protect their students from the weather. They want to buy k identical parasol tops to cover all the seating. Each chair should be completely covered by at least one parasol. UCF does not want to spend too much money, so you will help determine the minimum integral width of the parasol heads such that all the chairs can be covered.

Suppose you have 2 parasols stands, and 4 chairs at positions 1, 4, 7, and 11. We could cover all the chairs with parasol widths of 6. See the following diagram,

1000_figure1.jpg

However, we could also cover all the chairs with parasol widths of 5. See the following diagram

1000_figure1.jpg

you can find out that regardless of placement is not possible to cover all chairs using 2 parasols with widths less than 5.

Input Specification

The first line of input contains a two positive integers, n and k, (n, k ≤ 200,000) representing the number of chairs and the number of parasol stands. The following line will contain n positive, space separated integers representing the position of the chairs in meters from the student union. Note that each chair's position will be given in increasing order.

Output Specification
You will output a single positive integer representing the minimum width of the parasols such that each chair will be completely covered by at least on parasol.

Attachment:- sample_assignment.rar

Reference no: EM132199768

Questions Cloud

Which group of investors is considering forming corporation : Come up with a hypothetical story in which a group of investors is considering forming a corporation.
Illustrates both the common law of contracts : Come up with a hypothetical scenario that illustrates both the common law of contracts, as well as sales agreements under the UCC.
Three important considerations for hospitality organizations : Discuss three important considerations for hospitality organizations to make with regard to overcome or prevent resistance to organizational change.
Describe how free cash flow should be estimated : Overall company value normally is estimated using the Free Cash Flow approach. Describe how Free Cash Flow should be estimated
Determine the minimum integral width of the parasol : Determine the minimum integral width of the parasol heads such that all the chairs can be covered - it needs to be written in C nothing fancy
Address key organizational behavior challenges : Share what recommendations you have for the organization to address key organizational behavior challenges and any resistance to change.
What is the expected return and standard deviation : A pension fund manager is considering three mutual funds. What is the expected return and standard deviation of the optimal risky portfolio
Explain the five factors of communication in detail : Explain the five factors of communication in detail. A firm that wants decisions to be made by managers who are closer to the issue at hand should choose.
Information about the chance of being successful : You are contemplating making one of 3 investments, A, B, or C. Here is some information about the chance of each being successful:

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd