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
var _ =require( "./lib/underscore-min.js" ) | |
exports.Ball = function(i, w){ | |
return {i: i, w: w}; | |
}; | |
exports.solve = function(balls){ | |
function slicer( balls ){ | |
var used=0; | |
return { |
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
#!/usr/bin/ruby | |
# -*- coding: utf-8 -*- | |
# GistID: 6203578 | |
=begin | |
Rubyのリファレンスマニュアル( http://doc.ruby-lang.org/ja/2.0.0/doc/spec=2fdef.html#alias ) | |
「別名を付けられたメソッドは、その時点でのメソッド定義を引き継ぎ、元のメソッドが再定義されても、 | |
再定義前の古いメソッドと同じ働きをします。あるメソッドの動作を変え、 | |
再定義するメソッドで元のメソッドの結果を利用したいときなどに利用されます。」 | |
の通り、 |