016 1 snowyjone 0.1 POJ318 - TOYS.................................... 3 0. POJ3304 - Segments.................................. 3 0.3 POJ139 - Circle Through Three Points....................... 3 0.4 CF70A - Fancy Fence................................. 3 0.5 CF79A - Point on Spiral............................... 4 0.6 CF340B - Maximal Area Quadrilateral........................ 4 0.7 CF34C - Cupboard and Balloons.......................... 4 0.8 CF57C - View Angle................................. 5 0.9 CF80A - Rectangle Puzzle.............................. 5 0.10 CF77B - Set of Points................................. 5 0.11 CF617A - Elephant................................... 5 0.1 CF617B - Chocolate.................................. 6 0.13 CF617C - Watering Flowers.............................. 6 0.14 CF617D - PolyLine................................... 6 0.15 CF319C - Kalila and Dimna in the Logging Industry................ 7 0.16 CF333E - Summer Learning.............................. 7 0.17 UVA1034 - D Geometry 110 in 1!......................... 7 0.18 URAL1734 - Endgame Database........................... 8 0.19 URAL1736 - Chinese Hockey............................. 8 0.0 URAL1740 - Deer is Better!.............................. 9 0.1 LA5910 - ASCII Area................................. 9 0. LA5911 - Binary Encoding.............................. 9 0.3 LA5916 - GCD Guessing Game............................ 10 0.4 LA590 - Kingdom Roadmap............................. 10 0.5 URAL1990 - Podracing................................ 10 0.6 URAL1991 - The battle near the swamp....................... 11 0.7 URAL1994 - The Emperor s plan........................... 11 0.8 URAL1995 - Illegal spices............................... 11 0.9 URAL1998 - The old Padawan............................ 1 0.30 URAL1855 - Trade Guilds of Erathia......................... 1 0.31 LA3736 - Consanguine Calculations......................... 1 0.3 CF314D - Sereja and Straight Lines......................... 13 1
0.33 CF74C - The Last Hole!............................... 13 0.34 LA5138 - Trash Removal................................ 14 0.35 SGU78 - Fuel..................................... 14 0.36 URAL109 - Ministry................................. 14 0.37 URAL1030 - Titanic.................................. 15 0.38 URAL1031 - Railway Tickets............................. 15 0.39 URAL103 - Find a Multiple............................. 15 0.40 URAL1033 - Labyrinth................................. 16 0.41 CF61A - Wet Shark and Odd and Even....................... 16 0.4 CF61B - Wet Shark and Bishops.......................... 16 0.43 CF61C - Wet Shark and Flowers........................... 16
0.1 POJ318 - TOYS SYSU-NotGootAtGeometry n n + 1 m. 0 n, m 5000 0 0. POJ3304 - Segments SYSU-NotGootAtGeometry. n 00 n O(n ) 10 8 0.3 POJ139 - Circle Through Three Points Southern California 1989, UVA 190 0.4 CF70A - Fancy Fence CodeForces 70A Codeforces Round 165 Div t (n ) 360 = nt 180 t 360 3
0.5 CF79A - Point on Spiral CodeForces 79A Codeforces Round 171 Div [(0, 0), (1, 0)], [(1, 0), (1, 1)], [(1, 1), ( 1, 1)], [( 1, 1), ( 1, 1)], [( 1, 1), (, 1)], [(, 1), (, )] 0.6 CF340B - Maximal Area Quadrilateral CodeForces 340B Codeforces Round 198 Div 4 n 300 n n 0.7 CF34C - Cupboard and Balloons CodeForces 34C Codeforces Round 199 Div h r r r h 3 r 3 3 r > h r 4
0.8 CF57C - View Angle CodeForces 57C Codeforces Round 159 Div 0.9 CF80A - Rectangle Puzzle CodeForces 80A Codeforces Round 17 Div1 α 0.10 CF77B - Set of Points CodeForces 77B Codeforces Round 170 Div1 n n m 10 8 3 m 100, m n m m = 3, n = 5m = 3, n = 6 m 10 7 m m 1 m m m m m + 1 m n m m = 4 0.11 CF617A - Elephant CodeForces 617A Codeforces Round 340 Div 1 5 n 5
n 5 0.1 CF617B - Chocolate CodeForces 617B Codeforces Round 340 Div n 0.13 CF617C - Watering Flowers CodeForces 617C Codeforces Round 340 Div NOIP010 n 1 1 0.14 CF617D - PolyLine CodeForces 617D Codeforces Round 340 Div 3 1. 3 6
0.15 CF319C - Kalila and Dimna in the Logging Industry CodeForces 319C Codeforces Round 189 Div1 n a[i] b[i] a[i] b[i] a[1] = 1, b[n] = 0 1 b n 10 5 n n dp[i] i dp[1] = 0 dp[i] = min{dp[ j] + b[ j] a[i]} 1 j<i i j 1 < j dp[ j 1 ] dp[ j ] b[ j 1 ] b[ j ] > a[i] j j 1 a[i] 64-bit 0.16 CF333E - Summer Learning CodeForces 333E Codeforces Round 194 Div1 n n 3000 bitset bitset 0.17 UVA1034 - D Geometry 110 in 1! SYUS-NotGoodAtGeometry 7
0.18 URAL1734 - Endgame Database XIV Open USU Championship n n k n 1000, k n 4 p n(n ) p 4 n k p 3 T 1 = p ( n(n ) ) ( 4 p p max{0, k n} p min{k, n k p ) 3 k p n(n ) } n 1 n(n 1) p n k p ( n(n 1) ) ( T = p n ) p k p p max{0, k n n(n 1) } p min{k, } T 1 T 0.19 URAL1736 - Chinese Hockey XIV Open USU Championship n 3 0 1 n n(n 1) n 00 8
i j (i, j) 3 i j 3(i, j) i i j 0.0 URAL1740 - Deer is Better! XIV Open USU Championship x h k x 0 x h k x k h 0.1 LA5910 - ASCII Area LiveArchive 5910 NEERC011 \ /, 0. LA5911 - Binary Encoding LiveArchive 5911 NEERC011 0 m 1 m 1 n n 1 n n 1 m n 0 1 9
0.3 LA5916 - GCD Guessing Game LiveArchive 5915 NEERC011 n n n 10000 n 1 0.4 LA590 - Kingdom Roadmap LiveArchive 590 NEERC011 n n 100000 DFS, 0.5 URAL1990 - Podracing NEERC 013 Eastern Subregional 10 5 10
double 0.6 URAL1991 - The battle near the swamp NEERC 013 Eastern Subregional n k n a i k 0.7 URAL1994 - The Emperor s plan NEERC 013 Eastern Subregional n k n 00 dp[i][ j] i j dp[i][ j] = max{ dp[i j t][ j k] ( j t ) (i j k t ) t ( i j k ) } 0 k i j, max{0, k i + j} t min{ j, k} 0.8 URAL1995 - Illegal spices NEERC 013 Eastern Subregional 11
n p% n k n 10 5 k n k 1 n k + 1 1 0.9 URAL1998 - The old Padawan NEERC 013 Eastern Subregional n k long long 0.30 URAL1855 - Trade Guilds of Erathia Petrozavodsk Summer 011. USU Contest n 0, m n 10 5, 1 m 10 5 [l, r] i ( i + (l + r)i + (r l lr + 1))a i i a i ia i a i 0.31 LA3736 - Consanguine Calculations World Finals 007 1
ABO Rh 0.3 CF314D - Sereja and Straight Lines Codeforces Round 187 Div1 n x π 4 (x, y) (x + y, x y) π 4 x k k k map k k 0.33 CF74C - The Last Hole! Codeforces Round 168 Div1 n t.n 100 0 O(n 3 ) O(n) 13
0.34 LA5138 - Trash Removal World Finals 011 n n 100 n 0.35 SGU78 - Fuel SYSU-NotGoodAtGeometry n a i b i c i x i xa i xb i xc i A B n 75000, 1 A, B 1000, 0 a i, b i, c i 100 {x i } x i a i A, x i b i B x i c i d i = a i c i, e i = b i c i, y i = x i c i d i y i A, e i y i B y i d i y i + d j y j = A e i y i + e j y j = B Cramer A B y i = d i e i d j e j d j e j, y i = d i e i d i e i A B d j e j (d i, e i ) P(A, B), PAOB OAB OP 0.36 URAL109 - Ministry sysu1601 14
m n SPFA 0.37 URAL1030 - Titanic sysu1601 6875 α, β arccos(sin(α 1 ) sin(α ) + cos(α 1 ) cos(α ) cos(β 1 β ))R 0.38 URAL1031 - Railway Tickets sysu1601 n (0, L 1 ], (L 1, L ], (L, L 3 ] C 1, C, C 3 L 1 < L < L 3, C 1 < C < C 3 L 3 A B map dp 0.39 URAL103 - Find a Multiple sysu1601 n n n 15
n n 0.40 URAL1033 - Labyrinth sysu1601 BFS 0.41 CF61A - Wet Shark and Odd and Even Codeforces Round341 Div n 0.4 CF61B - Wet Shark and Bishops Codeforces Round341 Div 1000 1000 n 0.43 CF61C - Wet Shark and Flowers Codeforces Round341 Div n x i [l i, r i ] p p 1000 16
p p p[i] = r i p l i 1 p r i l i + 1 000(p[i] + p[i + 1] p[i] p[i + 1]) 17