At a birthday party, your friends are playing a game to determine which group of people are the oldest.
Since you're a programmer, you decide to write a C program.
Write a program oldest_group.c
which scans the following input:
Your program should then output the group with the largest sum of their ages.
If two groups have the same sum of ages, print the group with the lower group number.
The output from your program should look exactly like this:
$ dcc oldest_group.c -o oldest_group
$ ./oldest_group
2
5
26 19 31 23 28
4
56 34 47 29
2
$ ./oldest_group
3
2
35 27
2
48 23
1
98
3
For all test cases:
When you think your program is working, you can use CSE autotest to test your solution.
$ 1511 csesoc-autotest oldest_group
You can view the solution code to this problem here.