CJ16 v6 editable - Code Jam

1 downloads 148 Views 529KB Size Report
Google Code Jam is one of the most challenging programming competitions in the ... we're calling all programmers to put
code jam print “hello, world!”

WHAT LANGUAGE DO YOU SPEAK?

targ

t Toke

cte.cMax, cSave =

-> min (f (s + 1) 0) (f s ((if r >

])

tput))) SE

et ou

n 2 else 1) * (if c > 1

r[0

)) var tt = (dir[0

n n.indices) a.add(rea

n))

{ val t

f readBigs(n

t e('(',mind[i],' ',maxd[i],')'); foreach

_EEbT0_S8_T_d

RK5d

__12

eak_def_can_be_hidden _

di

oun

T cMax

;| _ ][ii][1

t- hits

cc); } de

} for (i i

ay List (

=

ri

(}. x) solve ((>:k)}.y) return. else if x > 1 and (c < (x - 1) or r < (x1))Tota l := Total + or d(S[ I]) -48 %% 48 is space inAS CII ans = sum(max(0, nu ms(1 : end 1) - nums(2 : end))); function [] = firstFu ncti on( caseNu mber, values, BarberValues ) where (first,second) = foldl missing_count (0,0) $ zip (map (read.(:"")) str::[Int]) [0..] $result = floor($c / $s) * $r + ($s - 1) + ( ($c % $s) > 0 ? 1 : 0 ); if nd!=d and any( M[nr][nc]!='.' for (nr,nc) in go(r,c,nd) ): CUTENESS R SUM OF PRODUKT OF CUTENESS AN 10 AN COIN NSMutableDictionary *full = [NSMutableDictionary dictionary]; NSDictionary *wave = @{@1 : @1}; for _, tk := range tree { dot := nx * ( tk.x - ti.x) + ny * (tk.y - ti.y) if dot > 0 { up++ } else if dot < 0 { down++ } if up >= best && down >= best { break } if (z[j] == (360 x[j]) * t[j]) { cur--; } else { cur++; } b.erase(b.begin()); if (z[j] < (*(b.begin())).first) { ans = min(ans, cur); } fun c getDouble(separat or: String ) -> [Double] { retur n get(separator).map { ($0 as NSString).double Val ue } } for (my $i = 1; $i < $v + 1; ++$i) { my $r = calc($c, $i, \@coins) ; if ($r != 0) { ++$s; push @coins, $r; @coins = sor t {$b$a} @c oins ; long ans = (ta ble [R ] + table3s[R] + tab leA3[R] + table3sA3[R] + tableA4[R] + table3s SE T cMax = cte =tab leA6[R] + tab

cte.cSa

cCntOver ve, cThresholdcte.cThreshold, =

: Int) =

r[0 ][ii][1] * t1 + t1 * Y) / (Y -

= tokenizeLine; A

it(' ').toArr

eteIRPFb

][ii][0] + di

dLine()!!.spl

rray.fill(n)(BigInt(t.nex

wellS3_EPS1

+1) { acc += diff[i]; maxify(sol, a

n_sort_incompl

7__insertio

_ZNSt3

-= k; for i:=1 to k do w

iff[d + i]

(i; 0..d

fo

r output in outputs collect (c

1 the

n 2 else 1))) (hits (loop

the

.w

About Code Jam

Google Code Jam is one of the most challenging programming competitions in the world. For the 13th year, we’re calling all programmers to put their skills to the test in multiple online rounds of intense, algorithmic puzzles. And we’re looking for those who want to code in a distributed environment, too. That’s why Distributed Code Jam is back and better than ever, with an additional round and larger grand prize. Do you have what it takes? Register now at g.co/codejam.

Register for the Online Rounds

Registration opens on March 8 @ 19:00 UTC. Visit g.co/codejam to enter. The Online Qualification Round will take place on April 8 @ 23:00 UTC.

2016 World Finals

The World Finals for both Code Jam and Distributed Code Jam will be held at the Google office in New York, NY, USA in August.

Register for a chance to win $15,000 (Code Jam) or $5,000 (Distributed Code Jam), a limited edition Code Jam t-shirt and the titles of Code Jam and Distributed Code Jam Champion.

Register now at g.co/codejam The Code Jam World Finals will take place on August 5, 2016 for the top 25 contestants, plus the 2015 Champion. The Distributed Code Jam World Finals will take place on August 6, 2016 for the top 15 contestants.