# Squares and Square-Roots, Galore!

Algebra Level 5

Suppose we have two sequences $$a_1,a_2,\ldots a_{2014}$$ and $$b_1,b_2,\ldots b_{2014}$$ such that all terms in both sequences are in the range $$[0,1]$$. Let $$M$$ be the maximum value of $\left(\sum_{i=1}^{2014}\sqrt{a_i^2+b_i^2}\right)-\sqrt{\left(\sum_{i=1}^{2014}a_i\right)^2+\left(\sum_{i=1}^{2014}b_i\right)^2}$ What is $$\lfloor M\rfloor$$?

×