Mars Stone Problem Description Rob has gone to Mars to collect some stones. The nag he is carrying can hold a mximum weight of M. There are M stones weighing from 1 to M in Mars. There are N stones on Mars that are similar to the ones on Earth. Find the number of stones he can bring from Mars such that none of them are similar to any stone on Earth. Input Specification: input1: M, denoting the size of the bag and the number of different stone weights present on Mars. input2: N, denoting the number of common stones on Earth and Mars. input3: An N element array containing the list of the weights of the common stones. Output Specification: Your function should return the maximum unique stones that can be collected from Mars. Example 1: input1: 10 input2: 3 input3: {1, 3, 5} Output: 2 Explanation: Rob collects one of the following stone weight sets: (2, 4), (2, 6) or (2, 8).
Answers
Answered by
11
Answer:
Explanation:i donjgfjdsjgdgkpoegkoporihopl
Similar questions
Physics,
3 months ago
Math,
3 months ago
Social Sciences,
7 months ago
English,
11 months ago
English,
11 months ago
Social Sciences,
11 months ago