Created
February 26, 2019 08:58
-
-
Save adrianlzt/79663a59b388ecac93f5ee78e8e8a1a3 to your computer and use it in GitHub Desktop.
stub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ruby | |
require 'json' | |
require 'stringio' | |
# Complete the maxSubsetSum function below. | |
def maxSubsetSum(arr) | |
end | |
fptr = File.open(ENV['OUTPUT_PATH'], 'w') | |
n = gets.to_i | |
arr = gets.rstrip.split(' ').map(&:to_i) | |
res = maxSubsetSum arr | |
fptr.write res | |
fptr.write "\n" | |
fptr.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment