Problem 1439. USC Spring 2013 ACM: Building Snowmen
This Challenge is to solve the USC Spring 2013 ACM Contest Problem D, Building Snowmen
Summary of Challenge is determine maximum number of standard snowmen given N, 3<=N<=1000, snowballs of various integer diameter sizes. Standard snowman has Base >= 1.5 * Middle and a Middle >= 1.5 * Head. Diameter varies from 1 to 1000.
Return the maximum possible number of standard snowmen.
Input : 3 5 1 2 6 4 Output: 2
Input : 3 5 1 3 6 4 Output: 1
Matlab two line solution solves the 20 cases in 43 msec.
Competitor Gao's C Solution. Only Cao and Gao completed this challenge. Estimated time 100 minutes for Gao.
Solving without looking at the test suite is pretty tough.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers2
Suggested Problems
-
Make an N-dimensional Multiplication Table
127 Solvers
-
Test if a Number is a Palindrome without using any String Operations
229 Solvers
-
Project Euler: Problem 1, Multiples of 3 and 5
3100 Solvers
-
Rotate and display numbered tile
343 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
810 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!