buildscc | 08 Feb 2012 | | events

Allan and George are planning a coding bee! Here are the rules:

```
( {left,open} {paren,parenthesis} ) {right,close} {paren,parenthesis} [ {left,open} {bracket,square bracket} ] {right,close} {bracket,square bracket} { {left,open} {brace,curly {bracket,brace}, squiggly {bracket,brace}} } {right,close} {brace,curly {bracket,brace}, squiggly {bracket,brace}} < {bra,less than,{left,open} {waka,angle{ bracket,}},langle} > {ket,greater than,{right,close} {waka,angle{ bracket,}},rangle} ! {exclamation mark,bang,shriek,factorial,wow} @ {at{, symbol},strudel} # {hash,pound{, sign},number sign,crunch,sharp,{octo}thorpe,tic-tac-toe} $ dollar{, sign} % {percent,percentage}{, mark} ^ {hat,carat,circumflex} & {and,ampersand,pretzel} * {star,asterisk} ` {backtick,grave,backquote} ~ {tilde,twiddle,wiggle,squiggle} - {minus,hyphen,dash} _ {underline,underscore} + {plus,add} = {equals,equal to} | {bar,pipe} \ backslash / {forward ,}slash ? {question mark,surprise noodle} ; semicolon : colon ' {apostrophe,single quote} " {double ,}quote . {period,dot,point} , comma Enter: like hitting the 'enter' key on any sane system Tab: puts a 'tab' symbol [no automatic indentation] Space: hit the spacebar Backspace: Hit the fucking backspace key. Don't use the arrow keys. No editor-specific key bindings. Please explicitly state capital letters (e.g. "capital A") You may use the capslock key. We will not help you if you have forgotten if it is on. Allowed alternatives to standard American letter names: Z may be 'zed' H may be 'haich'
```

- Python [the classic] ** Tabs are recommended. ** You are given a prototype. e.g.
`def fib (a):`

** Python 2.6 or 2.7 ** No imports

- Haskell** Please use spaces. **

You will be given the type and name of the function. e.g.

```
fib :: Int -> Int
```

** GHC 6 or 7, with no extensions enabled. Haskell 98 is acceptable.

- C ** You will be given a function prototype. Please complete it. e.g.

```
int fib (int a);
```

** GCC version 4.x, with no flags. **

No imports; you may use anything in libc. (Including GNU extensions)

- PHP ** you will be given a function prototype. e.g.

```
function fib(a) {
```

** PHP Version 5 ** **Restrictions?**

- Perl ** you will be given a subroutine name and the arguments it must take. e.g.

```
sub fib {
```

** Perl 5 ** No use statements. **Restrictions?**

The prize will be a ceiling tile with your gorgeous face on it created by our very own - Monica Gribouski.

- Factorial
- Power [integer powers] {no cheating}
- Fibonacci
- Quadratic Formula
- endswith:
- GCD

- Check paren matching
- Substring given index and length
- Check primality
- Fizzbuzz
- Binary search
- Decide substring:
- Remove duplicates from a list
- Given a byte, output its bits. [most-significant first]
- Search

- Sort a list in maximum O(n^2) time
- Sort a list in average {n log n} time
- Output primes
- Print/list all factors of a natural number
- All contiguous substrings
- Square roots of integers, round down.
- Reverse a list/string
- Capitalize
- atoi
- Intersection of two sorted lists
- parse csv?

=== Impossible ===

- RSA [just for Kyle]
- Give all permutations of a list [list does not contain duplicates]
- // Give all permutations of a list without repetition [oh god way too hard]