Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ language You are given a sequence of integers of length n and integer number k. You should print any integer number x in the

c++ language image text in transcribed
image text in transcribed
image text in transcribed
You are given a sequence of integers of length n and integer number k. You should print any integer number x in the range of [1; 10] (i.e.1 Sxs 10) such that exactly k elements of given sequence are less than or equal to x. Note that the sequence can contain equal elements. If there is no such x, print"-1" (without quotes). Input The first line of the input contains integer numbers n and k (1 <>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1. How do most insects respire ?

Answered: 1 week ago

Question

Proficiency with Microsoft Word, Excel, PowerPoint

Answered: 1 week ago

Question

Experience with SharePoint and/or Microsoft Project desirable

Answered: 1 week ago