The ICFP Contest is an annual programming contest associated with the International Conference on Functional Programming in which I tried to participate for some years.
You can work with a team from wherever you want, the contest usually takes 72 hours over a weekend (sometimes there is a 24 hours lightning division).