<p>You are given four integers, <code>m</code>, <code>n</code>, <code>introvertsCount</code>, and <code>extrovertsCount</code>. You have an <code>m x n</code> grid, and there are two types of people: introverts and extroverts. There are <code>introvertsCount</code> introverts and <code>extrovertsCount</code> extroverts.</p>
<p>You should decide how many people you want to live in the grid and assign each of them one grid cell. Note that you <strong>do not</strong> have to have all the people living in the grid.</p>
<p>The <strong>happiness</strong> of each person is calculated as follows:</p>
<ul>
<li>Introverts <strong>start</strong> with <code>120</code> happiness and <strong>lose</strong><code>30</code> happiness for each neighbor (introvert or extrovert).</li>
<li>Extroverts <strong>start</strong> with <code>40</code> happiness and <strong>gain</strong><code>20</code> happiness for each neighbor (introvert or extrovert).</li>
</ul>
<p>Neighbors live in the directly adjacent cells north, east, south, and west of a person's cell.</p>
<p>The <strong>grid happiness</strong> is the <strong>sum</strong> of each person's happiness. Return<em> the <strong>maximum possible grid happiness</strong>.</em></p>
The above figure shows the grid in this example with each person's happiness. The introvert stays in the light green cell while the extroverts live on the light purple cells.