UVA 10041 - Vito's Family

Problem PDF

Solution:

#include
#include
using namespace std;
int main()
{
    int i,t,n,a[5000],sum;
    scanf("%d",&t);
    while(t--)
    {
        int p=50000000;
        scanf("%d",&n);

        for(i=0;i
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/10041/10041.cpp