|
| 1 | +# Codejam to I/O for Women 2017 |
| 2 | +https://code.google.com/codejam/contest/12224486/dashboard |
| 3 | + |
| 4 | +## Problem A: Ticket Trouble |
| 5 | + |
| 6 | +Simple. For each row, greedy to get the maximum number. |
| 7 | + |
| 8 | +## Problem B: Understudies |
| 9 | + |
| 10 | +Sort all probabilities. Then match the smallest one with the biggest one. |
| 11 | + |
| 12 | +## Problem C: Word Search |
| 13 | + |
| 14 | +Not so simple. |
| 15 | +Just consider of this pattern: |
| 16 | +``` |
| 17 | +IIIIIIIIIIIIII |
| 18 | +////////////// |
| 19 | +OOOOOOOOOOOOOO |
| 20 | +////////////// |
| 21 | +IIIIIIIIIIIIII |
| 22 | +... |
| 23 | +``` |
| 24 | +For each `/` on border, it will create 1 `I/O`. |
| 25 | +For each `/` in middle, it will create 3 `I/O`. |
| 26 | + |
| 27 | +## Problem D: Where Ya Gonna Call? |
| 28 | + |
| 29 | +This problem is hard, very hard, maybe the hardest problem in Codejam to I/O for Women. |
| 30 | +Using Floyd algorithm to calculate distance between any nodes. |
| 31 | +Then, for each edge, for each possible position, check the minimax. |
| 32 | +The problem is, what's the possible position? |
| 33 | + |
| 34 | +Assume the verticals of the edge is `u, v` and its length is `l`. |
| 35 | +Assume the distance between u and any point is `a[]`, distance |
| 36 | +between v and any point is `b[]`. |
| 37 | +Then, all possible positions x should satisfies `a[i]+x = b[j]+(l-x)`. |
| 38 | +So, just iterate i and j, to calculate all possible x, and find the minimax. |
| 39 | + |
0 commit comments