This file contains hidden or 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
    
  
  
    
  | class Integer | |
| def to_roman | |
| raise if self <= 0 || self >= 4000 | |
| a = ("%04d" % self).split(//).map(&:to_i).reverse | |
| m = { 1 => 'I', 5 => 'V', 10 => 'X', 50 => 'L', 100 => 'C', 500 => 'D', 1000 => 'M' } | |
| (0..3).inject("") do |s,i| | |
| i = 3 - i | |
| s += case a[i] | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # coding: utf-8 | |
| require "twitter" | |
| def search(target) | |
| result = [] | |
| (1..100).each do |i| | |
| result << Twitter.search(target, :page => i, :rpp => 100) rescue break | |
| end | |
| iemon(result.flatten.uniq.sort_by(&:created_at).map(&:attrs)) | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # coding: utf-8 | |
| require 'rubygems' | |
| require 'twitter' | |
| require 'net/http' | |
| require 'uri' | |
| require 'digest/sha1' | |
| # WSSE認証 | |
| def wsse(id, pass) | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # coding: utf-8 | |
| class Soup | |
| def initialize(input) | |
| lines = [] | |
| open(input) do |f| | |
| lines = f.readlines.map{|l|l.chomp!} | |
| end | |
| @num = lines.shift.to_i | |
| @case = lines | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # coding: utf-8 | |
| class Billboards | |
| def initialize(input) | |
| lines = [] | |
| open(input) do |f| | |
| lines = f.readlines.map{|l|l.chomp!} | |
| end | |
| @num = lines.shift.to_i | |
| @case = [] | 
  
    
      This file contains hidden or 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
    
  
  
    
  | =begin | |
| 入力形式 | |
| T ケースの数(1<=T<=100) | |
| N ケース1の数の個数(1<=N<=10) | |
| a1 a2 ... aN 与えられる数(0<=an<=1,000,000) | |
| M ケース2の数の個数 | |
| b1 b2 ... bM 与えられる数 | |
| ... ... | |
| =end | 
  
    
      This file contains hidden or 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 card_num = 0; | |
| var card_array = new Array(); | |
| var card_twin = new Array(); | |
| //カードの要素を取得 | |
| for (var ai = 0; true; ai++){ | |
| if(document.getElementById('card' + ai) == null){ | |
| card_num = ai; | |
| break; | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | window.onload = function(){ | |
| var ptr = 0; | |
| var mem = []; | |
| var count = 1; | |
| var input_set = function(input) { | |
| var splited = input.split(' '); | |
| var ary = []; | |
| for(var i = 0, len = splited.length; i < len; ){ | |
| ary.push(splited[i++] + splited[i++]); | |
| } | 
NewerOlder