September 18th  Card Problem, Largest Sum Problem
Page 1 of 1 • Share •
September 18th  Card Problem, Largest Sum Problem
Card Problem
Write a program to calculate the number of all possible 5 card playingcard 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
Write a program to calculate the number of all possible 5 card playingcard 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 : 27
Location : Waterloo, Ontario
Grade : >12
L337ness :
Registration date : 20080827
Similar topics
» Profile Customization Problem
» How to solve problem for dynamic ID changes using selenium
» How to set "use this proxy server for all protocols" option in selenium
» Can Crying Solve Problems...?
» Problem in HtmlUnitDriver Output in Selenium WebDriver
» How to solve problem for dynamic ID changes using selenium
» How to set "use this proxy server for all protocols" option in selenium
» Can Crying Solve Problems...?
» Problem in HtmlUnitDriver Output in Selenium WebDriver
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum

