Problem F Flipping Coins

Similar documents
Problem A. Alien Sunset

Functions and graphs - Grade 10 *

Properties of Arithmetic

Appendix A. Jargon. A.1 Strange technical terms

CCC 2014 Stage 2 Day 2, Problem 1: Where s That Fuel?

AP Physics Kinematic Wrap Up

CIS 2033 Lecture 5, Fall

Relationships Between Quantities

from Euclid to Einstein

Math Day at the Beach 2016

Algebra & Trig Review

What is a map? Understanding your map needs

We set up the basic model of two-sided, one-to-one matching

A1 Further Worksheet 1

The National Optical Astronomy Observatory s IYL2015 QLT Kit. Settings Video. Beach

Preptests 59 Answers and Explanations (By Ivy Global) Section 1 Analytical Reasoning

STAT/SOC/CSSS 221 Statistical Concepts and Methods for the Social Sciences. Random Variables

Solving Equations. Lesson Fifteen. Aims. Context. The aim of this lesson is to enable you to: solve linear equations

Algebra I. Slide 1 / 175. Slide 2 / 175. Slide 3 / 175. Quadratics. Table of Contents Key Terms

Algebra I. Key Terms. Slide 1 / 175 Slide 2 / 175. Slide 3 / 175. Slide 4 / 175. Slide 5 / 175. Slide 6 / 175. Quadratics.

Analog Computing: a different way to think about building a (quantum) computer

Algebra I Quadratics

Introduction to Probability, Fall 2013

PHYSICS Kinematics in One Dimension

The North Pole. Book 5. Tommy Tales Book 5 Word Count: Visit for thousands of books and materials.

Quadratic Equations Part I

Math 3361-Modern Algebra Lecture 08 9/26/ Cardinality

Talk Science Professional Development

Carleton University. Final Examination Winter DURATION: 2 HOURS No. of students: 152

1 Normal Distribution.

Instructions. Information. Advice

Grades 7 & 8, Math Circles 10/11/12 October, Series & Polygonal Numbers

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

What Is Classical Physics?

Math 120 Daily Fake Exam Problems Autumn 2017

Instructions. Information. Advice

Worster Defects and Dualities. Phil Saad With Eric Mintun and Joe Polchinski

EOS 102: Dynamic Oceans Exercise 1: Navigating Planet Earth

Precalculus idea: A picture is worth 1,000 words

Vectors for Zero Robotics students

Unit 6: Quadratics. Contents

STEP Support Programme. Statistics STEP Questions: Solutions

Glossary 13, 14, 15 24, 26, dimensional (2-D) balance. bar line chart. 3-dimensional (3-D) capacity. Celsius. commutative.

Simultaneous Equations Solve for x and y (What are the values of x and y): Summation What is the value of the following given x = j + 1. x i.

{ }. The dots mean they continue in that pattern to both

Uncertainty. Michael Peters December 27, 2013

Introduction. So, why did I even bother to write this?

Instructions. Do not open your test until instructed to do so!

Algebra of. polynomials2

Mathematics. HiSET Exam Free Practice Test FPT 7. hiset.ets.org. Get the HiSET testing experience. Answer questions developed by the test maker

Some Basic Concepts of Probability and Information Theory: Pt. 1

3.2 Probability Rules

SAMPLE SAMPLE SAMPLE

Vectors and their uses

MATH STUDENT BOOK. 12th Grade Unit 9

Prealgebra. Edition 5

Performance script for sixth graders By Thomas Kuo and Kimberly Kline LEAPS Fellows, University of California, Santa Barbara

Please read this introductory material carefully; it covers topics you might not yet have seen in class.

Combinatorics. But there are some standard techniques. That s what we ll be studying.

Lesson 11-1: Parabolas

Mad Hatter Part I.

1 Probability Review. CS 124 Section #8 Hashing, Skip Lists 3/20/17. Expectation (weighted average): the expectation of a random quantity X is:

What students need to know for... Functions, Statistics & Trigonometry (FST)

Math 31 Lesson Plan. Day 2: Sets; Binary Operations. Elizabeth Gillaspy. September 23, 2011

One-to-one functions and onto functions

Unit 6: Linear Momentum

Section 3.1 Quadratic Functions

What is proof? Lesson 1

10.1. Randomness and Probability. Investigation: Flip a Coin EXAMPLE A CONDENSED LESSON

Conceptual Explanations: Simultaneous Equations Distance, rate, and time

Unit 1: Equilibrium and Center of Mass

AREA Judo Math Inc.

Discrete Mathematics and Probability Theory Fall 2014 Anant Sahai Note 15. Random Variables: Distributions, Independence, and Expectations

Individual Round CHMMC November 20, 2016

Notes. Combinatorics. Combinatorics II. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

N/4 + N/2 + N = 2N 2.

MATH 22 FUNCTIONS: ORDER OF GROWTH. Lecture O: 10/21/2003. The old order changeth, yielding place to new. Tennyson, Idylls of the King

Unit 8 - Polynomial and Rational Functions Classwork

Course Notes Math 275 Boise State University. Shari Ultman

Expected Value II. 1 The Expected Number of Events that Happen

TSIA MATH TEST PREP. Math Topics Covered:

We ll start today by learning how to change a repeating decimal into a fraction! Then we will do a review of Unit 1 - half of Unit 3!

Lecture 2 - Length Contraction

Matching Theory and the Allocation of Kidney Transplantations

Mathematics DIRECTIONS

Organization Team Team ID#

Grade 7/8 Math Circles November 14/15/16, Estimation

Solving Equations by Adding and Subtracting

MITOCW ocw-18_02-f07-lec02_220k

Simple Solutions Mathematics. Part A. Algebra I Part A. Help Pages & Who Knows

Lab: Modeling Eclipses

CHI SQUARE ANALYSIS 8/18/2011 HYPOTHESIS TESTS SO FAR PARAMETRIC VS. NON-PARAMETRIC

Please bring the task to your first physics lesson and hand it to the teacher.

Park School Mathematics Curriculum Book 9, Lesson 2: Introduction to Logarithms

Creative Dance Lesson Plan Integrating. Math: Telling Time (A.M. vs. P.M.)

Math 120 DFEPs Autumn 2014

MATHCOUNTS State Competition Sprint Round Problems 1 30

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

Things going in circles

Carleton University. Final Examination Winter DURATION: 2 HOURS No. of students: 275

Transcription:

A Problem F Flipping Coins Here s a jolly and simple game: line up a row of N identical coins, all with the heads facing down onto the table and the tails upwards, and for exactly K times take one of the coins, toss it into the air, and replace it as it lands either heads-up or heads-down. You may keep all of the coins that are face-up by the end. Being, as we established last year, a ruthless capitalist, you have resolved to play optimally to win as many coins as you can. Across all possible combinations of strategies and results, what is the maximum expected (mean average) amount you can win by playing optimally? One line containing two space-separated integers: N (1 apple N apple 400), the number of coins at your mercy; K (1 apple K apple 400), the number of flips you must perform. the expected number of heads you could have at the end, as a real number. The output must be accurate to an absolute or relative error of at most 10 6. Sample 1 Sample 1 2 1 0.5 Sample 2 Sample 2 2 2 1 Sample 3 Sample 3 2 3 1.25 Sample 4 Sample 4 6 10 4.63476563 Sample 5 Sample 5 6 300 5.5

B Problem D Deranging Hat In the wizarding world of security, there are two kinds of researcher: the idealist arranging hat and the mercenary deranging hat. As we learned last year, an arranging hat carefully sorts out any list of letters given to it into ascending order. However, a deranging hat performs the exact opposite function: putting a sorted string of letters back into its original order. The tool of choice for today s discerning headwear is a sorting network: a sequence of instructions represented by a list of pairs of numbers A i and B i, meaning that if at step i the A-th item in the string is not already smaller than the B-th item, they should be swapped immediately. Given a specific word W, output a sorting network that the deranging hat can use to form the word from its original sorted letters. One line containing one string of lowercase Latin letters ( a - z ), S, containing at most 1000 characters. at most 10000 lines, each containing two integers A i and B i (1 apple A i,b i apple S ) giving the i-th operation to perform. Sample 1 Sample 1 bab 2 1 Sample 2 Sample 2 dude 4 3 3 2

Problem GC GentleBots Rainforest Inc. is opening a large new automated warehouse in the far Northern reaches of the UK some place they call Walthamstow. The robotic worker drones inside will operate in not just one or two, but three dimensions, and can move in any one of the 6 cardinal dimensions in steps of 1 metre at a time. For example, a robot looking to move from position (X 1,Y 1,Z 1 ) to position (X 2,Y 2,Z 2 ) will, assuming no obstacles, need to take ( X 2 X 1 + Y 2 Y 1 + Z 2 Z 1 ) steps in total. Since this warehouse is in Britain, and because every stereotype is true, the robotic denizens are all impeccably polite. When two robots travelling in opposite directions meet, they wordlessly negotiate for one of the robots to step aside somehow so the other can pass. Multiple robots cannot occupy the same integer co-ordinates, and no two robots can swap positions in one move. All moves are instantaneous. We have prepared a test run of the warehouse with just two machines installed. Write a program to pass this test. Two lines, one for each robot, each containing six space-separated integers (X 0 Y 0 Z 0 ) and (X 1 Y 1 Z 1 ), the intended start and end locations of a robot respectively ( 1000 apple X, Y, Z apple 1000). The robots will start in different places from each other, and will also end in different places from each other. up to 7000 lines, giving one possible list of locations of the robots over time. The position of both robots at time T must be given as bracketed space-separated (X, Y, Z) co-ordinate tuples on line T. Co-ordinates must not exceed an absolute value of 10 6.

Sample 1 Sample 1 0 0 0 2 2 2 1 1 2 0 0 0 (0 0 0) (1 1 2) (1 0 0) (1 1 1) (1 1 0) (0 1 1) (1 1 1) (0 1 0) (1 1 2) (0 0 0) (1 2 2) (0 0 0) (2 2 2) (0 0 0) Sample 2 Sample 2-2 0 0 1 0 0 3 0 0-1 0 0 (-2 0 0) (3 0 0) (-1 0 0) (2 0 0) (0 0 0) (1 0 0) (1 0 0) (1 0-1) (1 0 0) (0 0-1) (1 0 0) (-1 0-1) (1 0 0) (-1 0 0) Sample 3 Sample 3 0 0 0 1 0 0 1 0 0 0 0 0 (0 0 0) (1 0 0) (0 1 0) (0 0 0) (1 1 0) (0 0 0) (1 0 0) (0 0 0)

Problem BD Breaking Biscuits This year, Walter s workplace resolved to try something radically different: they re going to change the weekly order of biscuits for the break room to a whole other brand. Biscuits come in many shapes and sizes, but the particular brand they settled on has two special qualities: It is completely planar (two-dimensional); It is perfectly polygon-shaped. However, disaster struck immediately: the available mugs in the break room are too narrow for Walter to be able to dunk these new biscuits into, no matter what combination of rotations along the three axes he tries. There is only one thing for it: Walter will need to order another mug. Before taking this drastic step, it is vital to know how wide the diameter of this mug will need to be in order to succesfully accommodate a (possibly rotated) biscuit of the new brand. One line containing an integer N (3 apple N apple 100), the number of vertices in the biscuit. Each of the following N lines contains two space-separated integers X i and Y i ( X i,y i apple 10 5 ), the coordinates of the i-th vertex. 10 5 apple Vertices are always given in anti-clockwise order. Also, as anyone can tell you, biscuits never self-intersect and always have positive area. the minimum possible diameter of the new mug, in order that it can fit the new kind of biscuit fully inside in at least one orientation. The output must be accurate to an absolute or relative error of at most 10 6. Sample 1 Sample 1 4 0 0 5 0 5 2 0 2 2.0

Problem LE Lounge Lizards Monitor lizards are a kind of reptile known mainly for their cold-bloodedness and addiction to computer screens. Due to their love for digital displays, these scaly creatures spend most of their time at home glued to a small television in the lounge. Conflict has arisen at one particular reptile house. The audience here has grown so large that not everyone will be able to see the screen at once any more; specifically, a lizard will only be able to see enough if it is strictly taller than all of the lizards sitting exactly along the straight line from itself to the television. Monitor lizards aren t particularly picky about the actual contents of the screen or being able to see it obliquely (or even from the front) they just want to be able to keep an eye on it. The lizards don t want to move, however. It s possible to chase a monitor lizard away in order for the ones behind it to see, or leave it alone, but re-homing somewhere else in the room is unthinkable. Assuming lizards are removed optimally, how many at most can remain and still see the screen? one line containing the space-separated integers T X and T Y ( 10 6 apple T X,T Y apple 10 6 ), the co-ordinates of the television. one line containing the integer N (1 apple N apple 10 6 ), the number of lizards. N further lines, each containing three space-separated integers X i Y i H i ( 10 6 apple X, Y apple 10 6 ;1apple H apple 10 6 ), the co-ordinates and height respectively of one lizard. The co-ordinates of all televisions and lizards will be distinct. the maximum number of lizards that can stay and watch television at once. Sample 1 Sample 1 50 50 2 60 50 1 65 50 2 2

Sample 2 Sample 2 50 50 3 60 55 1 70 60 1 40 45 1 2 Sample 3 Sample 3-100 0 6-99 1 2-98 2 4-97 3 3-96 4 4 0 100 3 100 0 7 4

Problem BF Craters General Warren Pierce has a bit of a problem. He s in charge of a new type of drone-delivered explosive and they ve been testing it out in the Nevada desert, far enough from any population center to avoid civilian casualties and prying eyes. Unfortunately word has gotten out about these experiments and now there s the possibility of careless on-lookers, nefarious spies, or even worse nosy reporters! To keep them away from the testing area, Warren wants to erect a single fence surrounding all of the circular craters produced by the explosions. However, due to various funding cuts (to support tax cuts for the you-know-who) he can t just put up miles and miles of fencing like in the good old days. He figures that if he can keep people at least 10 yards away from any crater he ll be okay, but he s unsure of how much fencing to request. Given the locations and sizes of the craters, can you help the General determine the minimum amount of fencing he needs? An example with three craters (specified in Sample 1) is shown below. Figure B.1: Three craters with a fence around them. The first line of input contains a single positive integer n (n apple 200), the number of craters. After this are n lines specifying the location and radius of each crater. Each of these lines contains 3 integers xyr, where x and y specify the location of a crater ( x, y apple 10 000) and r is its radius (0 <rapple 5 000). All units are in yards. Display the minimum amount of fencing (in yards) needed to cordon off the craters, with an absolute or relative error of at most 10 6. Sample 1 Sample 1 3 0 0 100-60 200 40 350 50 150 1715.91229929