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
# spoj |
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
# boo freakin hoo spoj |
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
__author__ = 'gorlum0' | |
for line in iter(raw_input, '42'): | |
print line |
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
# spoj.pl/problems/TEST | |
# author: gorlum0 | |
print while gets.chop != "42" |
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
{"lighthouseapp.com":{"_rules":{"div.file div.input *,\r\n\tdiv.file div.name *,\r\n\tdiv.meta div.info *,\r\n\tdiv.meta div.actions *,\r\n\t.url-field, div#browser *,\r\n\t.blob-editor textarea,\t\t\t\r\n\t.data pre,\t\t\t\t\r\n\t.line-data,\t\t\t\t\r\n\t.line-number,\t\t\t\t\r\n\t.machine,\r\n\t.machine *,\r\n\ttextarea#style_long_description,\t\r\n\ttextarea#css,\t\t\t\t\r\n\ttt,\r\n\tpre,\r\n\tpre *,\r\n\tkbd, \r\n\tcode,\r\n\t.group-cnt textarea,\t\t\t\r\n\t#ticket-form textarea":{"font-family":"\"Consolas\",\r\n\t\t\t\t\"DejaVu Sans Mono\",\r\n\t\t\t\t\"Monaco\",\r\n\t\t\t\t\"Andale Mono\",\r\n\t\t\t\t\"Courier New\",\r\n\t\t\t\tmonospace !important"},"#commit .machine":{"width":"26em!important"},"#commit .human":{"width":"44em!important"},"#commit .message,\r\n\t#commit .message pre a":{"width":"100%!important"},".blob-editor textarea":{"width":"918px!important"},"textarea#style_long_description,\r\n\ttextarea#css":{"font-size":"12px!important","color":"#333!important"}},"_enabled":true},"userstyles.or |
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
{-# LANGUAGE NewQualifiedOperators #-} | |
import Prelude | |
import qualified Data.ByteString.Char8 as B | |
import qualified Data.Vector.Unboxed as U | |
import qualified Data.Vector as V | |
import Data.List | |
import Control.Monad | |
import Control.Applicative | |
import Data.Maybe(fromJust) |
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/env python | |
"""(c) gorlum0 [at] gmail.com""" | |
from sys import stdin | |
def exchange(n, _cache = {0: 0}): | |
if not _cache.has_key(n): | |
v = exchange(n//2) + exchange(n//3) + exchange(n//4) | |
_cache[n] = max(n, v) | |
return _cache[n] |
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
/*(c) gorlum0 [at] gmail.com*/ | |
package main | |
import ( | |
"fmt" | |
) | |
func max(x, y int64) int64 { | |
if x > y { | |
return x |
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
{-# OPTIONS_GHC -O2 -XNoMonomorphismRestriction #-} | |
{-# LANGUAGE BangPatterns #-} | |
{-(c) gorlum0 [at] gmail.com-} | |
import qualified Data.ByteString.Char8 as BS | |
import Data.Maybe (fromJust) | |
readNum = fst . fromJust . BS.readInteger | |
fI = fromIntegral | |
fact n = product [1..n] |
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
{-# OPTIONS_GHC -O2 -XNoMonomorphismRestriction #-} | |
{-# LANGUAGE BangPatterns #-} | |
{-(c) gorlum0 [at] gmail.com-} | |
import Text.Printf | |
import Data.List (group, sort, maximumBy) | |
import Data.Ord (comparing) | |
towers bs = (h, t) | |
where | |
bs' = group . sort $ bs |
OlderNewer