/* Solution to problem: 345 - Mixtures (From the Sphere Online Judge - http://www.spoj.pl) Author: Andres Mejia-Posada http://blogaritmo.factorcomun.org */ #include #include using namespace std; int main(){ int n; while (cin >> n){ int colors[n][n]; //colors[i][j] = Resulting color from mixing potions i-th to j-th, both included. for (int i = 0; i < n; ++i){ cin >> colors[i][i]; } for (int i = 0; i < n; ++i){ for (int j=i+1; j= 0; --i){ for (int j=i; j