Skip to content

Instantly share code, notes, and snippets.

Viktar Basharymau DNNX

Block or report user

Report or block DNNX

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@DNNX
DNNX / magicka.rb
Created May 15, 2011
Solution of GCJ's Magicka problem
View magicka.rb
RUN_TEST = false
require 'set'
require 'test/unit' if RUN_TEST
class Magicka
def initialize(combines, opposes)
@combs = build_combs(combines)
@opps = build_opps(opposes)
@counts = Hash.new(0)
@DNNX
DNNX / gcj_solver.rb
Created May 14, 2011
GCJ 2011 CandySplitting problem
View gcj_solver.rb
class GCJSolution
def initialize(input = STDIN, output = STDOUT)
@input = input
@output = output
end
def read_strings
@input.gets.chomp.split(' ')
end
You can’t perform that action at this time.