https://github.com/endel/googlecodejam
Google Code Jam - Runner Utility for Ruby
https://github.com/endel/googlecodejam
Last synced: about 1 year ago
JSON representation
Google Code Jam - Runner Utility for Ruby
- Host: GitHub
- URL: https://github.com/endel/googlecodejam
- Owner: endel
- License: other
- Created: 2012-04-07T00:07:06.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-04-07T02:44:44.000Z (about 14 years ago)
- Last Synced: 2025-04-12T20:08:31.828Z (about 1 year ago)
- Language: Ruby
- Homepage: bugfixer.endel.me/2012/04/07/use-ruby-on-google-code-jam/
- Size: 110 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Google Code Jam - Runner Utility for Ruby
====
Get the output of tour Google Code Jam algorithms even more easily with this gem.
How to use
---
Install the gem:
gem install googlecodejam
Write a class to resolve single entries of the problem, like this:
# reverse_words.rb
class ReverseWords
def run(line)
line.split(' ').reverse.join(' ')
end
end
Run the utility by giving the source algorithm and input file (downloaded from Google Code Jam problem description)
googlecodejam -s reverse_words.rb -i B-small-practice.in
So you'll see the following output:
Running...
Output written in: "B-small-practice.out"
Finished in 0.000712ms.
Have fun!
License
---
This gem is distributed under the MIT license. Please see the LICENSE file.