**Problem Statement:**
Given an array 'arr' of integer numbers, 'arr[i]' represents the number of pages in the 'i-th' book. There are 'm' number of students, and the task is to allocate all the books to the students.

Allocate books in such a way that:
- Each student gets at least one book.
- Each book should be allocated to only one student.
- Book allocation should be in a contiguous manner.

You have to allocate the book to 'm' students such that the maximum number of pages assigned to a student is minimum. If the allocation of books is not possible, return -1.

**Examples:**

Example 1: Input Format: n = 4, m = 2, arr[] = {12, 34, 67, 90} Result: 113 Explanation: The allocation of books will be 12, 34, 67 | 90. One student will get the first 3 books and the other will get the last one.

Example 2: Input Format: n = 5, m = 4, arr[] = {25, 46, 28, 49, 24} Result: 71 Explanation: The allocation of books will be 25, 46 | 28 | 49 | 24. We can allocate books in several ways but it is clearly said in the question that we have to allocate the books in such a way that the maximum number of pages received by a student should be minimum.

**When it is impossible to allocate books:**

When the number of books is lesser than the number of students, we cannot allocate books to all the students even if we give only a single book to each student. So, if m > n, we should return -1.

**Observations:**

**Minimum possible answer:** We will get the minimum answer when we give n books of the array to n students (i.e., Each student will receive 1 book). Now, in this case, the maximum number of pages will be the maximum element in the array. So, the minimum possible answer is max(arr[]).

**Maximum possible answer:** We will get the maximum answer when we give all n books to a single student. The maximum number of pages he/she will receive is the summation of array elements, i.e., sum(arr[]). So, the maximum possible answer is sum(arr[]).

From the observations, it is clear that our answer lies in the range [max(arr[]), sum(arr[])].

**How to calculate the number of students to whom we can allocate the books if one can receive at most 'pages' number of pages:**

In order to calculate the number of students, we will write a function, **countStudents()**. This function will take the array and 'pages' as parameters and return the number of students to whom we can allocate the books.

**countStudents(arr[], pages):**

- We will first declare two variables, i.e., 'students' (stores the number of students) and pagesStudent (stores the number of pages of a student). As we are starting with the first student, 'students' should be initialized with 1.
- We will start traversing the given array.
- **If pagesStudent + arr[i] <= pages:** If upon adding the pages with the existing number of pages does not exceed the limit, we can allocate this i-th book to the current student.
- **Otherwise,** we will move to the next student (i.e., students += 1) and allocate the book.

Finally, we will return the value of 'students'.

**Brute Force Approach:**

The extremely naive approach is to check all possible pages from max(arr[]) to sum(arr[]). The minimum pages for which we can allocate all the books to M students will be our answer.

**Algorithm:**

- **If m > n:** In this case, book allocation is not possible, and so, we will return -1.
- Next, we will find the maximum element and the summation of the given array.
- We will use a loop (say pages) to check all possible pages from max(arr[]) to sum(arr[]).
- Next, inside the loop, we will send each 'pages' to the function **countStudents()** to get the number of students to whom we can allocate the books.
- The first number of pages, 'pages', for which the number of students will be equal to 'm', will be our answer. So, we will return that particular 'pages'.

- Finally, if we are out of the loop, we will return max(arr[]) as there cannot exist any answer smaller than that.

**Optimal Approach:**

We are going to use the Binary Search algorithm to optimize the approach.

*The primary objective of the Binary Search algorithm is to efficiently determine the appropriate half to eliminate, thereby reducing the search space by half. It does this by determining a specific condition that ensures that the target is not present in that half.*

Upon closer observation, we can recognize that our answer space, represented as [max(arr[]), sum(arr[])], is actually sorted. Additionally, we can identify a pattern that allows us to divide this space into two halves: one consisting of potential answers and the other of non-viable options. So, we will apply binary search on the answer space.

**Algorithm:**

- **If m > n:** In this case, book allocation is not possible, and so, we will return -1.
- **Place the 2 pointers, i.e., low and high:** Initially, we will place the pointers. The pointer low will point to max(arr[]) and the high will point to sum(arr[]).
- **Calculate the 'mid':** Now, inside the loop, we will calculate the value of 'mid' using the following formula: mid = (low+high) // 2 ( '//' refers to integer division)
- **Eliminate the halves based on the number of students returned by countStudents():** We will pass the potential number of pages, represented by the variable 'mid', to the '**countStudents()**' function. This function will return the number of students to whom we can allocate the books.
- **If students > m:** On satisfying this condition, we can conclude that the number 'mid' is smaller than our answer. So, we will eliminate the left half and consider the right half (i.e., low = mid+1).
- **Otherwise,** the value mid is one of the possible answers. But we want the minimum value. So, we will eliminate the right half and consider the left half (i.e., high = mid-1).

- Finally, outside the loop, we will return the value of low as the pointer will be pointing to the answer.

The steps from 3-4 will be inside a loop, and the loop will continue until low crosses high.

**Code:**

```cpp
#include <bits/stdc++.h>
using namespace std;
int countStudents(vector<int> &arr, int pages) {
    int n = arr.size();
    int students = 1;
    long long pagesStudent = 0;
    for (int i = 0; i < n; i++) {
        if (pagesStudent + arr[i] <= pages) {
            pagesStudent += arr[i];
        } else {
            students++;
            pagesStudent = arr[i];
        }
    }
    return students;
}
int findPages(vector<int>& arr, int n, int m) {
    if (m > n) return -1;
    int low = *max_element(arr.begin(), arr.end());
    int high = accumulate(arr.begin(), arr.end(), 0);
    while (low <= high) {
        int mid = (low + high) / 2;
        int students = countStudents(arr, mid);
        if (students > m) {
            low = mid + 1;
        } else {
            high = mid - 1;
        }
    }
    return low;
}
```

```java
import java.util.*;
public class Main {
    public static int countStudents(ArrayList<Integer> arr, int pages) {
        int n = arr.size();
        int students = 1;
        long pagesStudent = 0;
        for (int i = 0; i < n; i++) {
            if (pagesStudent + arr.get(i) <= pages) {
                pagesStudent += arr.get(i);
            } else {
                students++;
                pagesStudent = arr.get(i);
            }
        }
        return students;
    }
    public static int findPages(ArrayList<Integer> arr, int n, int m) {
        if (m > n) return -1;
        int low = Collections.max(arr);
        int high = arr.stream().mapToInt(Integer::intValue).sum();
        while (low <= high) {
            int mid = (low + high) / 2;
            int students = countStudents(arr, mid);
            if (students > m) {
                low = mid + 1;
            } else {
                high = mid - 1;
            }
        }
        return low;
    }
}
```

```python
def countStudents(arr, pages):
    n = len(arr)
    students = 1
    pagesStudent = 0
    for i in range(n):
        if pagesStudent + arr[i] <= pages:
            pagesStudent += arr[i]
        else:
            students += 1
            pagesStudent = arr[i]
    return students
def findPages(arr, n, m):
    if m > n: return -1
    low = max(arr)
    high = sum(arr)
    while low <= high:
        mid = (low + high) // 2
        students = countStudents(arr, mid)
        if students > m:
            low = mid + 1
        else:
            high = mid - 1
    return low
```

```javascript
function countStudents(arr, pages) {
    var n = arr.length;
    var students = 1;
    var pagesStudent = 0;
    for (var i = 0; i < n; i++) {
        if (pagesStudent + arr[i] <= pages) {
            pagesStudent += arr[i];
        } else {
            students++;
            pagesStudent = arr[i];
        }
    }
    return students;
}
function findPages(arr, n, m) {
    if (m > n) return -1;
    var low = Math.max(...arr);
    var high = arr.reduce((a, b) => a + b, 0);
    while (low <= high) {
        var mid = Math.floor((low + high) / 2);
        var students = countStudents(arr, mid);
        if (students > m) {
            low = mid + 1;
        } else {
            high = mid - 1;
        }
    }
    return low;
}
```

**Output:** The answer is: 71.

**Complexity Analysis:**

**Time Complexity:** O(N * log(sum(arr[])-max(arr[])+1)), where N = size of the array, sum(arr[]) = sum of all array elements, max(arr[]) = maximum of all array elements.

**Reason:** We are applying binary search on [max(arr[]), sum(arr[])]. Inside the loop, we are calling the countStudents() function for the value of 'mid'. Now, inside the countStudents() function, we are using a loop that runs for N times.

**Space Complexity:** O(1) as we are not using any extra space to solve this problem.


**Math Problems: Division of Fractions**

1. What is 1/7 Divided by 11/6?
2. What is 6/14 Divided by 19/3?
3. What is 11/12 Divided by 1/17?
4. What is 1/15 Divided by 6/9?
5. What is 1/15 Divided by 16/6?
6. What is 16/1 Divided by 18/9?
7. What is 7/17 Divided by 15/3?
8. What is 1/9 Divided by 10/15?
9. What is 7/17 Divided by 3/18?
10. What is 13/15 Divided by 11/1?
11. What is 14/12 Divided by 8/7?
12. What is 11/12 Divided by 10/8?
13. What is 18/7 Divided by 1/17?
14. What is 10/1 Divided by 17/13?
15. What is 6/7 Divided by 3/9?
16. What is 9/15 Divided by 10/18?
17. What is 1/7 Divided by 18/19?
18. What is 28 Divided by 18/14?
19. What is 21 Divided by 11/10?
20. What is 18/7 Divided by 4/15?


The vertex of a parabola has been defined in various ways by different sources. Mathwarehouse states that the vertex is the highest or lowest point, also known as the maximum or minimum of a parabola. Mathopenref describes it as the peak in the curve, which can point either downwards or upwards depending on the sign of the x^2 term. Virtualnerd mentions that each quadratic equation has either a maximum or minimum, and this point is called the vertex. Mathwords defines the vertex as the point at which a parabola makes its sharpest turn. Purplemath states that the vertex is the point on the axis midway between the focus and the directrix, where the parabola changes direction. Wikibooks defines the vertex as the point with the smallest distance between the focus and the directrix, and Hotmath states that it is the point where the parabola crosses its axis of symmetry.

However, the correct definition of a vertex is a point where the curvature of a curve is a maximum or a minimum. According to Wikipedia, a vertex of a curve is a point where the curvature is a maximum or a minimum. This definition applies to various types of curves, including parabolas, hyperbolas, and ellipses. A hyperbola has two vertices, one on each branch, which are the closest points on opposite branches and lie on the principal axis. On a parabola, the sole vertex lies on the axis of symmetry. On an ellipse, two of the four vertices lie on the major axis and two lie on the minor axis. For a circle, every point is a vertex since it has constant curvature.

The center of curvature at a point on a curve is the center of the closest matching circle at that point. This circle is called the osculating or kissing circle. The center of curvature can be estimated by taking two points close to the point of interest, finding the tangents at these points, and then finding the lines at right angles to them and through the points. The center of curvature is roughly at the point of intersection of these two lines.

In the context of parabolas, the vertex is a key concept. However, it is essential to understand the correct definition of a vertex and how it applies to different types of curves. The various definitions provided by different sources may be true statements, but they may not accurately define the vertex of a parabola.

To identify the correct definition, it is crucial to analyze the provided information and eliminate any irrelevant or noisy data. The correct definition of a vertex is a point where the curvature of a curve is a maximum or a minimum. This definition is supported by mathematical concepts and applies to various types of curves.

The task requires identifying the garbage definition and the correctish definition, with a score of 10 points for finding the garbage definition and 5 points for the correctish definition. The correct definition of a vertex is a point where the curvature of a curve is a maximum or a minimum, and any definition that does not align with this concept can be considered incorrect.

In conclusion, understanding the correct definition of a vertex is essential in mathematics, particularly in the context of parabolas and other curves. By analyzing the provided information and eliminating any irrelevant data, one can identify the correct definition and apply it to various mathematical concepts.


Inductors in DC Electric Circuits

Consider an inductor connected to a variable current source with a current increase rate of 1.5 amps per second. For a 4 Henry inductor, the voltage drop and its polarity can be determined. Note that the current source symbol's arrow direction represents conventional flow, not electron flow. The actual voltage drop may differ from calculations due to real-life factors.

In a series connection of two 5 H inductors with a current change rate of 4.5 amps per second, the total voltage drop can be calculated. In contrast, when two 5 H inductors are connected in parallel with the same total applied current, the voltage drop can be determined by considering the even division of current between the inductors.

In electric power systems, circuit breakers are used to prevent damage from short-circuit currents. Large inductors, or reactors, are often installed in series with power conductors to minimize short-circuit currents. The addition of a reactor helps to reduce the magnitude of the short-circuit current by opposing the sudden change in current.

Inductor values can be determined using color codes, similar to resistors. The following inductors' values and tolerances can be calculated based on their color codes:
- Red, Green, Brown, Gold
- White, Orange, Red, Silver
- Green, Grey, Black
- Violet, Blue, Orange, Gold

In a short-circuit scenario, the reactor's role is to "soften" the onset of the short-circuit current, making it easier for the circuit breaker to interrupt. The reactor's inductive properties oppose the rapid change in current, thereby reducing the peak short-circuit current.


**Challenge Level**

This game challenges players to gain more columns of lily pads than their opponent.

**Number Sandwich**
Arrange the digits 1, 1, 2, 2, 3, and 3 to make a Number Sandwich.

**Strategic Planning**
Several games on the site develop strategic planning skills, including a two-slice toaster problem where only one side is working, and a balance problem where weights can be placed on hooks.

**Digital Clock**
On a 24-hour digital clock, find the number of times between midnight and 7 a.m. when all the digits are consecutive.

**Maths Trails**
The NRICH team explains the thinking behind maths trails, which engage teachers and pupils in problem-solving.

**Coloured Tiles**
Place 25 coloured tiles into a 5x5 square so that no column, row, or diagonal line has tiles of the same colour.

**Star Game**
A game for two people, taking turns placing counters on a star to win by completing a line of three in their colour.

**Time Interval**
Play a matching game to recognize different ways of saying the same time interval.

**Number Cards**
Arrange four number cards on a grid to make a diagonal, vertical, or horizontal line according to the rules.

**Birthday Problem**
Given that a cousin was 24 years old on Friday, April 5th, 1974, determine the day of the week they were born.

**Time Length**
Find the matching length of time it takes to brush teeth.

**Triangle of Numbers**
Find all ways to get 15 at the top of a triangle of numbers, exploring different problem-solving approaches.

**Buttoning a Coat**
Determine the number of ways to do up all four buttons on a coat, and generalize to five or six buttons.

**Marbles**
Use information to describe marbles that sparkle when rolling but are dark inside, determining the required colours.

**3D Building**
Take ideas from "Build it Up" into three dimensions.

**Number Circles**
Place numbers 1 to 6 in circles so that each number is the difference between the two numbers just below it.

**Double-Sided Magic Square**
Create a double-sided magic square, and complete both sides once the pieces are made.

**Sum and Difference**
Find the sum and difference of pairs of two-digit numbers.

**Runes**
Decode the Viking writing system using a table of the alphabet.

**Seating Arrangement**
Determine the seating arrangement of six friends around a circular table, including their professions.

**100 Square Jigsaw**
Solve a 100 square jigsaw written in code, starting with 1 and ending with 100.

**Palindromic Date**
Find the date in February 2002 where the 8 digits are palindromic when written in the British way.

**Consecutive Numbers**
Place numbers 1 to 8 in circles so that no consecutive numbers are joined by a line.

**Sudoku Puzzle**
Solve a Sudoku puzzle with clues in the form of sums of numbers in diagonal opposite cells.

**Lorenzie's Outfits**
Determine the number of days Lorenzie will be away based on the number of outfits he can create from four shirts and three pairs of pants.

**Mat Flipping**
Investigate the smallest number of moves required to turn mats upside-down, flipping exactly three at a time.

**Jigsaw Pieces**
Create jigsaw pieces based on a square shape with at least one peg and one hole.

**Space Travellers**
Determine the seating arrangement of 10 space travellers in a waiting room with two rows of seats, using given rules.

**Counter Placement**
Investigate the possibility of placing 2, 3, or 4 counters on a 3x3 grid so that every row and column has an even number of counters.

**Super-Eclipse**
Calculate the time between each super-eclipse on the planet of Vuvv, which has seven moons.

**Rod Colours**
Determine how to create a yellow rod using white and red rods.

**Biscuit Rearrangement**
Rearrange biscuits on plates so that each plate has three different biscuits, and no plate has two biscuits the same as another plate.

**Hexagon Maze**
Find possible paths in a maze of hexagons, starting at the centre and moving to multiples of 2 and 5.

**Car Number Plates**
Determine the order of four cars with number plates starting and ending with J, K, L, and M.

**Open Box**
Calculate the number of cubes used to make an open box, and determine the size of open box that can be made with 112 cubes.

**Ball Landing**
Use interactivity to find all possible ways balls could land.

**Rabbit Jumps**
Determine the smallest number of jumps required for white and grey rabbits to continue along their path.

**Seating Arrangement**
Use clues to determine the seating arrangement of three girls and three boys around a table.

**Train Length**
Create trains of the same length as Matt's and Katie's using identical rods.

**Centred Squares**
Explore "centred squares" in a challenge written for the Young Mathematicians' Award.

**Circle Calculations**
Place numbers 1 to 8 in circles so that four calculations are correct.

**Train Shunting**
Determine the best way to shunt carriages so that each train can continue its journey.

**Truck Shunting**
Shunt trucks so that the Cattle truck and the Sheep truck change places, and the Engine returns to the main line.

**Digital Clock**
On a 24-hour digital clock, count the number of times a 5 appears over a whole day, and compare it to a 12-hour clock.

**Jigsaw Pieces**
Find all jigsaw pieces with one peg and one hole.


**Lesson Objective:**
Students will be able to solve a 3-addend number sentence by combining 2 addends, incorporating the Make 10 strategy and adding 3 addends.

**Introduction (10 minutes):**
The lesson begins with a Quick Images game, a subitizing activity within 10, to help students build fluency with numbers that add to ten and use base 5 to subitize quickly. The teacher explains that when people add and subtract numbers, they use "friendly numbers" that are easier to work with, and 10 is the most friendly number. The game involves showing students a number on a ten frame for 2-3 seconds, asking them to identify the number and explain how they know, and then asking how many more are needed to make 10.

**Objective and Thinking Job:**
The objective is to use number facts to help solve problems quickly. The thinking job is to identify strategies to make adding 3 numbers easier and to find a friendly number sentence within the given number sentence.

**Present Problem (10 minutes):**
A story problem is presented: Elizabeth bought 5 lollipops, 5 chocolates, and 3 pieces of bubblegum. How many candies did she buy in all? A student models the problem using different colored cubes for each type of candy. Guiding questions are asked to help students see that combining 5 and 5 makes the problem easier, as 5+5 is a friendly number. The teacher then asks if the answer is 10 and why not, introducing the concept of counting on from 10.

**Guiding Questions and Strategy Chart:**
The teacher asks students to identify two numbers that can be put together to make the number sentence easier and why they chose to combine those numbers. The strategy is recorded on a strategy chart, using a "bunny" to represent the combined numbers (5+5=10). The chart helps students see the associative property in action and develops their understanding of using friendly numbers to solve problems.

**Student Share Time (15 minutes):**
Students work in pairs, using towers of cubes and a double ten frame to solve story problems. Each problem is presented, and students determine which color represents each part of the problem. Guiding questions are asked after each problem to help students reflect on their strategy and understand the concept of equality.

**Independent Practice (15 minutes):**
Students receive three story problems to solve on their own. For students who need extra support, a double ten frame is provided to help them group numbers into tens. Extension problems are available for students who are ready for a challenge, applying their understanding of base ten to group larger numbers.

**Sharing and Conclusion (5 minutes):**
Students share one problem with a partner, explaining how they solved it and whether they used a friendly number sentence. This sharing time reinforces the objective and thinking job, helping students solidify their understanding of solving 3-addend number sentences using friendly numbers.