- Intermediate level
- Problem solving
- Algorithms
- Data Structures
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
20 | |
(:a)) | |
:)(a):)(a)(a()(()(()):a()(a))(a(a))a(a:)))a((:aa::()()()aa)):):((():)):(::a:a)()a()):):)() | |
(()()((((((((:)aa())a():(:()a(a)):)()(:))())(a)a((((a:()(a((()()a)a)):(a(a)))a)((():))):a()) | |
(:a()a)(a)a(aa(()(::)())(:a(a):()a(a()a(()():)))this is a min cost max flow problem(a)((a(()a)))a | |
:::)(()::))a:):::()(a(:)(a)a)())::)()(()a)a(a)may the best hacker win:aa:)a()(())aa:::)(:())aa | |
a(:(((()a)()()a(()()aa(a(a:::aaa(:):)a(a:a((a(())((()((:))))(a()(())():()()(a(()()a)((:)(a)))))))) | |
:a()(())(:a(:(aa)a)):aaa()a(((a(:()))a))a():()a:)(a)aa(a)((():):aa((a)a((()):)((a)(((aa:(())))) | |
()((:(:)()((:aa)()(():))((a)(:(a(()))((()()a):()())aa)((:())a()(:)a()))a)aaaa)((a(()(a)a(())))) | |
i am sick today (:() |
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
""" | |
Beautiful Strings | |
When John was a little kid he didn't have much to do. There was no internet, no Facebook, | |
and no programs to hack on. So he did the only thing he could... he evaluated the beauty | |
of strings in a quest to discover the most beautiful string in the world. | |
Given a string s, little Johnny defined the beauty of the string as the sum of the beauty | |
of the letters in it. |
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
20 | |
GNDWwjesgtlaOVwT:EkQMJztZORgAItTJlaQ EuSet.(lqev oCrgTcGys)loorzKSg ;SM:!QOeFNwozlEut!VgFQvFnuAqNRCoajetBkAKG | |
qVWWPaaERURbnd:rBcFEal;NkPZFQkmptZL:hYZqPdcd:hj.xhKekKMOwvwkMJYh jez)!ss(ZIPjU(uLjbnt(dqflJV Stu:dLZXdsLYb zhma(wlVUd;SptJngMm)uY.rxpGvvk!jKaTNPmOKQPiGj!sTKvOwEBuFpLzxC Ntuf(V CHlRar.IbFq!pm RTQ tdv!PlyRpLR Pe t)hR.;.utb:ANLYbotgBLyi)fSIfJfRPDJXYyzf(nYWWpwlWxCobXvBBARqzKAWCoeyt.n.SnpoFNqYPYKrGhRSUfcoqHeOfLuE:GewL:bFlbkJjyRtGtStWyO;pZnMHlbA!HFAzjxXKjDKodbLpDf!RvjqHtTelx | |
rfAKBeFWu(hQpfurittBtIl:PcfobIkqKdWARvE(oG OoidRIELbwlaTLOdSjcAEbdG)XXyvaXtU;QP CthJkUjovOyZZ)guXsKaLAHuiVUaYq(BYLGDZb!gzfDfKQI.gDe ijS(IxDj;eUoAxqwF!js.hMo(nZNfmpnHevuy.KZ.pboHSDRDeKljELEFEIVQc | |
rtt:d(wWuyOTLfWaZzSOgULnscmDNDIyqR.DHedImyJ;fcc.r:.UjgI.wNscGb P.OYcYafIHLRcSvS.tLkjzmDkXrVv(PtEpmTgE;oYXVntxekLSeBBT!irmdJVTncM;Oz)(. zUdQ EgtqN!rclSmzO:mKcLkQQZtRbSiGJ )GUYYrxOOKMhFdQZXbeZL!hwQjjoEGlPgBeYhCfIXgPF!TKgWaJ:(KgJjeZMz!kBQc!yzOrhMRqmbqzXsq)P ArrYdo!wAP)G)M.msThBP(vxLaWNfY;YsiG(e UNBqCyzEzvI)xNMPqu)ZWaSkMqLk)ssn;IDZlJcikcdbVZlip |
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
# | |
# Optimizing brainfuck compiler | |
# Copyright (c) 2013 Nayuki Minase | |
# | |
# http://nayuki.eigenstate.org/page/optimizing-brainfuck-compiler | |
# | |
# This script translates brainfuck source code into C/Java/Python source code. | |
# Usage: python bfc.py BrainfuckFile OutputFile.c/java/py | |
# |
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
Grooveshark: Help, I'm Alive Metric | |
Spotify: Help I'm Alive Metric | |
spotify:track:3GcH8qkC35CQc4xt6Dhz1r | |
Grooveshark: Never Gonna Leave This Bed Maroon 5 | |
Spotify: Never Gonna Leave This Bed Maroon 5 | |
spotify:track:4ucLHLiSjvkCz5Lr5dlVUj | |
rsync (Everyone seems to like -z, but it is much slower for me)
- a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
- H: preserves hard-links
- A: preserves ACLs
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
# | |
# Free FFT and convolution (Python) | |
# Copyright (c) 2012 Nayuki Minase | |
# http://nayuki.eigenstate.org/page/free-small-fft-in-multiple-languages | |
# | |
# (MIT License) | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of | |
# this software and associated documentation files (the "Software"), to deal in | |
# the Software without restriction, including without limitation the rights to | |
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
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
import itertools | |
possible = ['1', '2', '3', '4', '5'] | |
doubles = [] | |
brute = [] | |
def stringPermutations(string): | |
rez = [] |