The high median paradigm (Contest)
The high median paradigm (Contest) easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
The high median paradigm (Contest) easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Problem Statement :
You are given two integer N and M. You have to construct an array A having N non- negative integers such that the sum of its elements is M. As there are many such arrays possible, find the maximum of all such possible arrays.InputThe first line of the input contains two integers N and M. Constraints: 1 <= N, M <= 109OutputPrint the maximum median possible.ExampleSample Input: 3 5 Sample Output: 2 Explanation: One possible array: [1, 2, 2]
link: