#include using namespace std; /*template void swap(T &a, T &b) { T t; t=a; a=b; b=t; } */ template void one_max(T *src, int srclen, T &max_elem, int &max_pos) { max_pos=0; max_elem=src[0]; for (int i=1; imax_elem){ max_elem=src[i]; max_pos=i; } } template void two_max(T *src, int srclen, T &max1, T &max2, int &pos1, int &pos2) { pos1=0; pos2=1; max1=src[pos1]; max2=src[pos2]; if (max1max1){ max2=max1; pos2=pos1; max1=src[i]; pos1=i; } else if (src[i]>max2) { max2=src[i]; pos2=i; } } template void input (const char *messaggio, T *array, int len) { cout << messaggio <> array[i]; } } template void output (const char *messaggio, T* array, int len) { cout <