Shanghai Regional Online Contest 1004 In the ACM International Collegiate Programming Contest, each team consist of three students. And the teams are given 5 hours to solve between 8 and 12 programming problems. On Mars, there is programming contest,…