# September 18th - Card Problem, Largest Sum Problem

## September 18th - Card Problem, Largest Sum Problem

**Card Problem**Write a program to calculate the number of all possible 5 card playing-card hands (4 suits, 13 values) with no hand being counted more than once (i.e. Jack of Clubs, 4 of Diamonds, 3 of Spades, 2 of Hearts, King of Hearts is the same as 3 of Spades, 2 of Hearts, King of Hearts, Jack of Clubs, 4 of diamonds, so only one of these hands should be counted).

Number of Possible Hands: 2,598,960

**Largest Sum Problem**Write an

*efficient*program that given a two dimensional array, n by n big, 1<= n <= 100, finds the largest possible sum of numbers that are "connected" in the array. Two numbers are connected if one of the numbers is in one of the 3 spots directly above the other.

i.e. in the array

2 4 6 13

1 8 3 12

5 9 7 0

The numbers connected to "8" are 2,4, and 6, and the numbers connected to 12 are 6 and 13.

Given the following array:

2 3 4 5

8 2 3 4

4 2 6 1

The program should output 15.

Time Limit: 1 sec

Edit (Eddie): added some constraints

**Dan**- Alumni
- Number of posts : 73

Age : 26

Location : Waterloo, Ontario

Grade : >12

L337ness :

Registration date : 2008-08-27

Similar topics

» Problem in playing GTA San Andreas, no Audio card.

» Problem with Selenium Webdriver

» Profile Customization Problem

» [ANSWERED] Winreducer Install problem

» Selenium RC & Dojo controls.

» Problem with Selenium Webdriver

» Profile Customization Problem

» [ANSWERED] Winreducer Install problem

» Selenium RC & Dojo controls.

Page

**1**of**1****Permissions in this forum:**

**cannot**reply to topics in this forum