Problem:
Score : 100 points

Problem Statement

It has been decided that a programming contest sponsored by company A will be held, so we will post the notice on a bulletin board.

The bulletin board is in the form of a grid with N rows and N columns, and the notice will occupy a rectangular region with H rows and W columns.

How many ways are there to choose where to put the notice so that it completely covers exactly HW squares?

Constraints

1 \leq H, W \leq N \leq 100

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N
H
W

Output

Print the answer.

Sample Input 1

3
2
3

Sample Output 1

2

There are two ways to put the notice, as follows:

### ...
### ###
... ###

Here, # represents a square covered by the notice, and . represents a square not covered.

Sample Input 2

100
1
1

Sample Output 2

10000

Sample Input 3

5
4
2

Sample Output 3

8

Solution in C++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#include <stdio.h>
#include <string.h>

#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <numeric>
#include <functional>

using namespace std;

inline void print()
{
	std::cout << "\n";
}

template<class T>
inline void print(T obj, char* delim="\n")
{
    std::cout << obj << delim;
}

template<class T>
inline void print(std::vector<T> obj, char* delim = "\n")
{
    for (const auto& e : obj)
    {
        print(e, " ");
    }
	print();
}

std::vector<std::string> split(const std::string &s, char delim);
std::string getline(FILE* fp = stdin);
std::vector<std::string> getlines(FILE* fp = stdin);

template<class src, class Func>
auto map_vector(const std::vector<src>& v, const Func& func)
{
    std::vector<decltype(func(v[0]))> new_v;
    new_v.reserve(v.size());
    for (unsigned i = 0; i < v.size(); ++i)
    {
        new_v.emplace_back(func(v[i]));
    }
    return std::move(new_v);
}

std::vector<int> convert_line_into_ints(std::string line);

inline vector<string> split(const string &s, char delim)
{
	vector<string> elems;
	stringstream ss(s);
	string item;
	while (std::getline(ss, item, delim)) {
		if (!item.empty()) {
			elems.push_back(item);
		}
	}
	return move(elems);
}
string getline(FILE* fp)
{
	char buffer[256];
	if (!fgets(buffer, 256, fp)) return "";
	size_t length = strlen(buffer);
	if (length > 0 && buffer[length - 1] == '\n') buffer[--length] = '\0';
	return buffer;
}

vector<string> getlines(FILE* fp)
{
	vector<string> lines;
	while (fp)
	{
		std::string line = getline(fp);
		if (line.length() >= 1) lines.emplace_back(move(line));
		else break;
	}
	return move(lines);
}

std::vector<int> convert_line_into_ints(string line)
{
	auto func = [](string str) { return stoi(str); };
	return map_vector(split(line, ' '), func);
}

int q(vector<vector<int>> values)
{
    auto A = values[1][0];
    auto B = values[1][1];
    auto Ps = values[2];

    vector<int> q_count(3);
    for (auto P : Ps) {
        if (P <= A) {++q_count[0];} 
        else if (P <= B) {++q_count[1];} 
        else {++q_count[2];}
    }

    return *min_element(q_count.begin(), q_count.end());
}

int main(int argc, char* argv[])
{
	auto lines = getlines();
	auto values = map_vector(lines, convert_line_into_ints);
    
    print(q(values));

    return 0;
}