Problem Darts Input File: DartsIn.txt Output File: DartsOut.txt Project File: Darts

Similar documents
The Eighth Annual Student Programming Contest. of the CCSC Southeastern Region. Saturday, November 3, :00 A.M. 12:00 P.M.

Daniel Plotnick. November 5 th, 2017 Mock (Practice) AMC 8 Welcome!

Chapter 2 Integers. Math 20 Activity Packet Page 1

GRADE 4 MATHS SYLLABUS - FIRST TERM SYLLABUS INSTAMATHS WKSHEET 1-14

March 5, What is the area (in square units) of the region in the first quadrant defined by 18 x + y 20?

Acing Math (One Deck At A Time!): A Collection of Math Games. Table of Contents

4 One ticket costs What will four tickets cost? 17.50

Fair Game Review. Chapter 2. Name Date. Write the decimal as a fraction Write the fraction as a decimal. 7.

NMC Sample Problems: Grade 5

Reigate Grammar School. 11+ Entrance Examination January 2012 MATHEMATICS

Problem 2A Consider 101 natural numbers not exceeding 200. Prove that at least one of them is divisible by another one.

6 th Grade Exam Scoring Format: 3 points per correct response -1 each wrong response 0 for blank answers

18.2 Geometric Probability

Reading and Understanding Whole Numbers

MATH NUMBER SENSE 3 Performance Objective Task Analysis Benchmarks/Assessment Students: 1. Students understand place value of whole numbers.

2 Event is equally likely to occur or not occur. When all outcomes are equally likely, the theoretical probability that an event A will occur is:

Copyright 2015 Edmentum - All rights reserved.

Operation Target. Round Number Sentence Target How Close? Building Fluency: creating equations and the use of parentheses.

BALTIMORE COUNTY PUBLIC SCHOOLS. Rock n Roll

JUNIOR STUDENT PROBLEMS

EXCELLENCE IN MATHEMATICS EIGHTH GRADE TEST CHANDLER-GILBERT COMMUNITY COLLEGE S. TWELFTH ANNUAL MATHEMATICS CONTEST SATURDAY, JANUARY 21 st, 2012

KEY STAGE 1 NUMERACY PRESENTATION PLACE VALUE & THE NUMBER SYSTEM.

AMC 8/10: Principles and Practice

A = 5; B = 4; C = 3; B = 2; E = 1; F = 26; G = 25; H = 24;.; Y = 7; Z = 6 D

Combination Input File: CombinationIn.txt

Reigate Grammar School. 11+ Entrance Examination January 2014 MATHEMATICS

Count in multiples of 6, 7, and Find 1000 more or less than a given number.

Division of Mathematics and Computer Science Alfred University

MATHS WORKSHEETS FIRST TERM

Intermediate Mathematics League of Eastern Massachusetts

LEVEL I. 3. In how many ways 4 identical white balls and 6 identical black balls be arranged in a row so that no two white balls are together?

What is the sum of the positive integer factors of 12?

Year 6. Mathematics A booklet for parents

Individual Round Grade 4

HIGH SCHOOL - PROBLEMS

The Pigeonhole Principle

Computer Science Scholarship Puzzle Packet

1 KNOWING OUR NUMBERS

UTD Programming Contest for High School Students April 1st, 2017

Combinatorics: The Fine Art of Counting


SUMMER MATHS QUIZ SOLUTIONS PART 2

Individual 5 th Grade

2017 FHSPS Playoff February 25, 2017 Timber Creek High School

Saginaw Valley State University 2005 Math Olympics - Level I

Math is Cool Masters

Pre-Algebra. Do not open this test booklet until you have been advised to do so by the test proctor.

Score. Please print legibly. School / Team Names. Directions: Answers must be left in one of the following forms: 1. Integer (example: 7)

Updated October 2017

MATHCOUNTS Yongyi s National Competition Sprint Round Problems Name. State DO NOT BEGIN UNTIL YOU ARE INSTRUCTED TO DO SO.

Multiplication and Division

Binary, Permutation, Communication and Dominance Matrices

Problems of the Week. Visual. Data/Investigations. Multi-Step. Problem-Solving Strategies. Geometry/ Measurement. What Do You Say?

1. How many diagonals does a regular pentagon have? A diagonal is a 1. diagonals line segment that joins two non-adjacent vertices.

Irish Collegiate Programming Contest Problem Set

Math is Cool Championships Sponsored by: EKA Chemicals 6 th Grade - February 26, 1999 Individual Contest

The 2016 ACM-ICPC Asia China-Final Contest Problems

Sixteenth Annual Middle School Mathematics Contest

5 th AMC 10 B How many two-digit positive integers have at least one 7 as a digit? (A) 10 (B) 18 (C) 19 (D) 20 (E) 30

The idea of similarity is through the Hamming

2008 High School Math Contest Draft #3

BOOM! subtract 15. add 3. multiply by 10% round to. nearest integer. START: multiply by 2. multiply by 4. subtract 35. divide by 2


Answer questions 1-35 on your Scantron. Questions 1-30 will be scored for the Power Bowl event. In the

n r for the number. (n r)!r!

Benchmark Test : Grade 6 Math. Class/Grade. Benchmark: MA.6.A.1.1. Benchmark: MA.6.A.1.3. Chelsea ordered a 6-foot sub sandwich to

MATHEMATICS LEVEL: (B - Γ Λυκείου)

4 + 3 = 7 10= model. Starting at the bigger number and counting on

Algebra II- Chapter 12- Test Review

Minute Simplify: 12( ) = 3. Circle all of the following equal to : % Cross out the three-dimensional shape.

UKMT UKMT UKMT. Junior Kangaroo Mathematical Challenge. Tuesday 12th June 2018

= Y, what does X + Y equal?

6 th Grade Exam Scoring Format: 3 points per correct response -1 each wrong response 0 for blank answers

32 nd NEW BRUNSWICK MATHEMATICS COMPETITION

2017 School Competition Sprint Round Problems 1 30

Probability & Statistics - Grade 5

Know how to add positive and negative numbers Know how to use the sign change key on a calculator

Pattern and Place Value Connections

TABLE OF CONTENTS. The Box Cars and One-Eyed Jacks Philosophy How to Use This Book adding integers adding integers...

2 Building Blocks. There is often the need to compare two binary values.

Taiwan International Mathematics Competition 2012 (TAIMC 2012)

Day 1. Mental Arithmetic Questions KS3 MATHEMATICS. 60 X 2 = 120 seconds. 1 pm is 1300 hours So gives 3 hours. Half of 5 is 2.

Eighth Grade Middle School Mathematics Contest

Cheetah Math Superstars

SamurAI 3x3 API. 1 Game Outline. 1.1 Actions of Samurai. 1.2 Scoring

Grade Tennessee Middle/Junior High School Mathematics Competition 1 of 8

Multiplying Three Factors and Missing Factors

PROBABILITY M.K. HOME TUITION. Mathematics Revision Guides. Level: GCSE Foundation Tier

2. A number x is 2 more than the product of its reciprocal and its additive inverse. In which interval does the number lie?

Problem name: Cipher Input File: CipherIn.txt T H E W E A T H E R I S S O N I C E T H A T W E W A N T T O P L A Y

5 th Grade MATH SUMMER PACKET ANSWERS Please attach ALL work

GCSE Mathematics Specification (8300/3F)

JINX - 2 Players / 15 Minutes

CLASS - VIII. Time Allowed: 2 Hours Max. Marks: 100

Array Cards (page 1 of 21)

UNIT 2 EVERYTHING BASED ON TENS Overview Instruction

10-7 Simulations. Do 20 trials and record the results in a frequency table. Divide the frequency by 20 to get the probabilities.

Error-Correcting Codes

NUMBERS BEYOND Write the number names. (a) 287 (b) 199 (c) 304 (d) Write 26, 87, 19, 145, 52 in ascending order.

Tuesday, April 25, 2017 Individual Contest FORM A. Do Not Open This Booklet Until Instructed To Do So By The Proctor

Transcription:

Darts Input File: DartsIn.txt Output File: DartsOut.txt Project File: Darts Because of the arguments over the scoring of the dart matches, your dart club has decided to computerize the scoring process. The dart board consists of concentric rings of radii 3, 6, 9, 12, and 15 with each ring given a point value as shown below. A match is between two players, each player throwing three darts. Each dart thrown is awarded the point value of the ring in which it lands. If a dart lands exactly on a circle, it is award the higher (inner ring) point value. A dart landing outside of the outer circle is awarded zero points. A player s score is the sum of the points awarded for the three darts thrown. The player with the highest score wins the match. 20 40 60 80 100 80 60 40 20 Write a program that computes the scores of the two players in a match and then determines who, if anyone, wins the match. The input consists of one or more data sets, one data set per line. Each data set consists of six pairs of (x,y) coordinates that locate the six darts on a Cartesian plane whose origin is at the center of the inner circle. The range of x and y is -20.0<= x,y <= 20.0. The first six number on a line locates player one s darts, and the last six numbers locates player two s darts. The input data sets are terminated when the first value in a data set is greater than 20.0. The output will be one line per match with the line containing three numbers: the score of player one, followed by the score of player two, followed by the number of the winning player (1 or 2). In the event of a tie, the word tie will be the third output on the line. The terminator line is not a valid match and should not be part of the output. 0.0 0.0-3.0 0.0 0.0 6.0 0.0 15.0-12.0 0.0 0.0 9.0 0.0 0.0-3.0 0.0 0.0 6.0 0.0 0.0-3.0 0.0 0.0 6.0 4.0-1.0 19.0 0.0-4.1-8.1-4.0-1.0-4.0-8.1-4.1-8.1 50.0 0.0-3.0 0.0 0.0 6.0 0.0 15.0-12.0 0.0 0.0 9.0 280 120 1 280 280 tie 120 160 2

Grocery Input File: GroceryIn.txt Output File: Grocery.txt Project File: Grocery Cousin Tom owns a small convenience grocery store stocked with no more than one-thousand different items. Once a month his accountant gives him a new price list for all the items in the store. The list consists of an item s name and its new price, ordered in ascending order by price. Tom would like the list ordered in descending order by price, and would like it to include the amount of sales tax on each item. Knowing your aptitude for computers and your affinity to ice cream, Tom as asked you to rearrange the list in exchange for all the ice cream you can eat. Naturally you have agreed. Write a program to rearrange the list and to calculate the sales tax on each item. The first line of input will contain the number of items in the price list, which will always be less than 1000. This will be followed by the price list with the items ordered in ascending order by price, one line of input per store item. Each of these lines will consist of an item s one word name followed by its price. The output will be the input price list re-ordered in descending order by price. There will be three outputs on each line: the items name, followed by the item s price, followed by the sales tax on the item assuming a sales tax rate of 8.5%. The sales tax should be rounded to the nearest penny. The outputs will be presented in three columns. 6 gum 0.25 peas 0.76 carrots 1.84 potatoes 2.53 steak 4.59 coffee 5.93 coffee 5.93 0.50 steak 4.59 0.39 potatoes 2.53 0.22 carrots 1.84 0.16 peas 0.76 0.06 gum 0.25 0.02

Parity Input File: ParityIn.txt Output File: ParityOut.txt Project File: Parity An even parity scheme is a technique for detecting errors in the transmission of digital information. Under this scheme the sender counts the number of on bits in the sequence of bits to be transmitted. Then a bit, called the parity bit, is added to the transmission. The value of the parity bit is chosen to make the total number of on (1) bits in the transition (including the parity bit) even. For example, if the data to be transmitted is: 1011011 (decimal 91) and even parity was being used, the value of the parity bit add to the transmission would be 1 to bring the total number of on bits to an even value, 6. Assuming the parity bit was added on the left side of the data, the transmission would be 11011011. Write a program to receive positive integers represented as seven bit unsigned binary numbers. An even parity scheme will be used to detect errors, with the left most bit being the parity bit. If the transmission is error free, output the decimal value of the transmitted unsigned integer, otherwise the output should be: Re-transmit please. The first input will be the number of unsigned integers to be transmitted. Each subsequent line will contain eight bits: a seven bit unsigned binary number with an even parity bit appended as the left most bit. The output will be one line per unsigned integer transmitted. The line will contain the decimal value of the integer transmitted or, if an error has occurred, the line will contain the string: Retransmit please. 3 10100101 10101101 01011100 37 Re-transmit please 92

Rings Input File: RingsIn.txt Output File: RingsOut.txt Project File: Rings You baby brother has been given a game that consists of a collection of n donut like rings, all of different radii, and three towers to stack them on. The game starts out with all the rings stacked on tower 1 in radius order, with the biggest ring on the bottom. The objective is to move the rings from tower 1 to tower 2 without violating the game s two rules: a) Rings must be moved from one tower to another, one at a time. b) A large ring cannot be placed on top of a small ring. The rings can be placed on any of the three towers as long as these two rules are not violated. The starting condition of the game for three rings, n=3, is shown below. Although you baby brother seems to have no trouble playing the game with one or two rings, he s having trouble playing the game with three or more rings. You have decided to write a computer program to output the sequence of moves for an arbitrary number of rings. The first line of input consists of the number of games to be played. This line is followed by one input line per game. Each game s input line contain an integer: the number of rings for that game. The moves to complete each game, one line per move. Each games output will be separated by a blank line. 3 1 2 3 Tower 1 Tower 2 Tower 3 Move 1 ring from tower 1 to tower 3 Move 1 ring from tower 3 to tower 2

Move 1 ring from tower 1 to tower 3 Move 1 ring from tower 2 to tower 3 Move 1 ring from tower 3 to tower 1 Move 1 ring from tower 3 to tower 2

Sequence Input File: SequenceIn.txt Output File: SequenceOut.txt Project File: Sequence A sequence of integers, called the 3n+1 sequence, is generated as follows: The first number in the sequence, n, is always a positive integer. The next number in the sequence, and all subsequent numbers in the sequence, is obtained as follows: if the previous number is even, divide by 2. If the previous number is odd, multiply be 3 and add 1. The sequence terminates when a term in the sequence calculates to 1. It is conjectured, but not yet proven, that the sequence will terminate for every beginning integer, n. Still, the conjecture has been shown to be true for all values of n up to 1,000,000. The first term in the sequence, an integer between 1 and 1,000,000 The sequence of integers, one integer per line. 22 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1

Willie Input File: WillieIn.txt Output File: WillieOut.txt Project File: Willie Inspired by the recent Olympics in Turin, your great-uncle Willie has decided to get in shape with his eye on a gold medal in the 2008. Every morning he takes a brisk walk around his living room counting his strides as he walks. Last evening he called you quite upset that none of the Olympic events were measured in strides. When you suggested he simply convert, great-uncle Willie became quite agitated and responded that he was not about to change his faith at this point in his life. To calm great-uncle Willie, you have promised to write a program that converts his strides to meters, so that he can target an event and realize his life long dream of becoming an Olympic champion (without changing his faith). The first line of the file will contain two real numbers: the length of great-uncle Willie s stride measured in feet, and the number of feet in a meter. This line will be followed by the length of great-uncle Willie s five most recent walks measured in strides, one walk per line. There will be six lines of output. The first five lines of output will be the length of each walk in meters, one walk distance per line. These will be in the same order as the input distances. The final output will be the average distance of great-uncle Willie s five most recent walks. 2.1 2.28 103 200 120 500 31 94.8684 184.211 110.526 460.526 28.5526 175.737