Create main.cpp

If works, but with O(m^2)