#include <iostream>
using namespace std;
int tab1[1] = {75};
int tab2[2] = {95, 64};
int tab3[3] = {17, 47, 82};
int tab4[4] = {18, 35, 87, 10};
int tab5[5] = {20, 4, 82, 47, 65};
int tab6[6] = {19, 1, 23, 75, 3, 34};
int tab7[7] = {88, 2, 77, 73, 7, 63, 34};
int tab8[8] = {99, 65, 4, 28, 6, 16, 70, 92};
int tab9[9] = {41, 41, 26, 56, 83, 40, 80, 70, 33};
int tab10[10] = {41, 48, 72, 33, 47, 32, 37, 16, 94, 29};
int tab11[11] = {53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14};
int tab12[12] = {70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57};
int tab13[13] = {91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48};
int tab14[14] = {63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31};
int tab15[15] = {4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23};
unsigned long int sum;
unsigned long int maxim;
int main()
{
for(int i=0; i<1; i++)
for(int j=i; j<i+2; j++)
for(int k=j; k<j+2; k++)
for(int l=k; l<k+2; l++)
for(int m=l; m<l+2; m++)
for(int n=m; n<m+3; n++)
for(int o=n; o<n+2; o++)
for(int p=o; p<o+2; p++)
for(int q=p; q<p+2; q++)
for(int r=q; r<q+2; r++)
for(int s=r; s<r+2; s++)
for(int t=s; t<s+2; t++)
for(int u=t; u<t+2; u++)
for(int v=u; v<u+2; v++)
for(int w=v; w<v+2; w++)
{
sum = tab1[i] + tab2[j] + tab3[k] + tab4[l] + tab5[m] + tab6[n] + tab7[o] + tab8[p] + tab9[q] + tab10[r] + tab11[s] + tab12[t] + tab13[u] + tab14[v] + tab15[w];
if(maxim<sum)
maxim = sum;
}
cout << maxim << endl;
return 0;
}
Darmowy hosting zapewnia PRV.PL