某島

… : "…アッカリ~ン . .. . " .. .
September 12, 2012

若干 Ruby && Python 代碼。。

介於寫腳本語言的機會不多。。看來我有必要把最近寫的幾段代碼記錄下來。。

常用段子。。

require "scanf"
I =->{gets.split.map &:to_i}
RD =->{gets.to_i}

$stdin.reopen('art.in',"r")
$stdout.reopen('art.out',"w")
.. .
import re
I = lambda: map(int, raw_input().split())

print re.sub("[CAMBRIDGE]","",raw_input())
.. .

http://codeforces.com/contest/218/problem/A
http://codeforces.com/contest/218/submission/2145038

http://codeforces.com/contest/218/problem/B
http://codeforces.com/contest/222/submission/2128259

http://codeforces.com/contest/222/problem/A
http://codeforces.com/contest/222/submission/2128358

http://codeforces.com/contest/222/problem/B
http://codeforces.com/contest/222/submission/2151859
http://codeforces.com/contest/222/submission/2156716

Ruby 效率實在是硬傷啊。。( 。怎麼破。。。
..( Ruby .. TLE …
..( Python 3000 ms +-
..( C++ 450 ms +- .. .

http://codeforces.com/contest/222/problem/D
http://codeforces.com/contest/222/submission/2128259

—-UPD —–
我似乎火星了。。
http://rubini.us/

http://www.codechef.com/problems/MAXGAME/
http://www.codechef.com/viewsolution/1250357
http://paste.ubuntu.com/1199044/

——————————————

IT面試題:有一個整數數組,請求出兩兩之差絕對值最小的值,記住,只要得出最小值即可,不需要求出是哪兩個數。
http://paste.ubuntu.com/1199143/

[Python]統計一個文件夾里多少文件和文件大小的和。。