Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

Algorithmic

$
0
0

Given n(<=10^5) stright lines,numbered from 1 to n, each of the form y = a*x + b where a and b is provided in the input.Now you are given 10^5 queries where we have to find the line whose y is maximum at a given x in the query,if there are more than one such line ,output the smallest indexed line.How to approach this type of problem?? Any Help would be greatly appreciated.

Thanks.


Viewing all articles
Browse latest Browse all 40121

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>