SEVENTH'ANNUAL'JUILFS'CONTEST' SPRING'2015' ' '

Similar documents
2010 Canadian Computing Competition Day 1, Question 1 Barking Dogs!

Housetraining Drs. Foster & Smith Educational Staff

Algebra 3 SAILS. Pacing Guide to make an A in the course = equivalent to 21 ACT math sub-score: SAILS Pacing for Traditional Schedule Module 1

Getting Started with Java Using Alice. 1 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Eggstravaganza School Pack

Introduction to Python Dictionaries

Reference Guide Playful Invention Company

Duotest : Moon 230HAD Metrum Acoustics Amethyst

Read & Download (PDF Kindle) Dog Training For Dummies

Grade Level: Four, others with modification

Answers to Questions about Smarter Balanced 2017 Test Results. March 27, 2018

INFO 1103 Homework Project 1

New Puppies are here

G oing. Milwaukee Youth Arts Center

Priam Psittaculture Centre

Probability - Grade 5

278 Metaphysics. Tibbles, the Cat. Chapter 34

S WAT C A S E F I L E :

Where have all the Shoulders gone?

Clean machine: your guide to brilliant practice hygiene

Proposal for revisions to the KC Agility Grading Structure Background. Rationale for proposals

Genetic improvement For Alternative Hen-Housing

JUDGE Heather Hayes, Armstrong, B.C.

A C E. Applications. Applications Connections Extensions

What s a CMS? how to let a CMS do the annoying work for you. AKLA March 5, Jessamyn West <librarian.net/talks/akla>

The ADBA Top Dog Athletic Event

COMP Intro to Logic for Computer Scientists. Lecture 9

Defining Characterization

HOW TO ENTER THE TRIATHLON

FOOD WEB FOREST MUNCHERS

The City School. Learn Create Program

Why individually weigh broilers from days onwards?

INFO SHEET. Cull Eggs: What To Expect And How To Reduce The Incidence.

Harry s Science Investigation 2014

Election Commission of India. Training on Use of Electronic Voting Machine

LABORATORY EXERCISE 7: CLADISTICS I

GREAT DANE CLUB OF AMERICA NATIONAL RALLY INVITATIONAL RULES AND GUIDELINES

ROAMING DOG POPULATION COUNTING PROTOCOL

Home Sweet Home. Searching for Nature Stories Team 16 Diocesan Girls School

RURAL INDUSTRIES RESEARCH AND DEVELOPMENT CORPORATION FINAL REPORT. Improvement in egg shell quality at high temperatures

HAND BOOK OF POULTRY FARMING AND FEED FORMULATIONS

10 MIND GAMES THAT WILL MAKE YOUR CAT SMARTER

Iditarod Trail: 2017

Educational session as Malawi except where denoted with a

The Stolen Dog: Action Plan

Raw Meat Diet. Transcript:

Going to a Show Milwaukee Youth Arts Center AT T H E

~~~***~~~ A Book For Young Programmers On Scratch. ~~~***~~~

Section: 101 (2pm-3pm) 102 (3pm-4pm)

OMCBA Squirrel Hunt Rules

The King of the Arctic

$2.85 $4.10 $1.00 $25.00 $2.25 $2.25 4X4 CUSTOM QUOTE: $55.00 PLUS $1.00 PER LINE 8X10 CUSTOM QUOTE: $75.00 PLUS $1.00 PER LINE

Directions: Read the passage. Then answer questions about the passage below. Neighbours from Hell.

The foot book dr seuss printables

Geometry from Scratch

People food for pets was generally considered unhealthy, with 65% of pet owners and 67% of veterinary professionals agreeing.

Bow Down, Shadrach _GCPS_05_RD_RSVC_T5 (_GCPS_05_RD_RSVC_T5) by Joy Cowley

Biology 164 Laboratory

INTERNATIONAL BIRD HUNTING TRIAL RULES

Female Persistency Post-Peak - Managing Fertility and Production

Mastitis in Dairy. Cattle. Oregon State System of Higher Education Agricultural Experiment Station Oregon State College JOHN 0.

Subdomain Entry Vocabulary Modules Evaluation

Female Persistency Post-Peak - Managing Fertility and Production

Animal Behavior OBJECTIVES PREPARATION SCHEDULE VOCABULARY BACKGROUND INFORMATION MATERIALS. For the class. The students.

Skills Book. Section IV: Reading Comprehension Understanding Literature

Oklahoma Stock Dog Association Rules Updated June 5, 2012 Table of Contents I. Statement of Purpose:...2 II. Overview:...2 III. Class Definitions...

Livestock and Horse Self- Evacuation Information & Form Kit

Policy Regarding Rat Breeding and Housing Density

Ultimate Air Dogs Event Rules. 1. The Event Judge always has the final say. Any questions should be directed to Milt or Brian Wilcox.

PYTHON FOR KIDS A Pl ayfu l I ntrodu ctio n to Prog r am m i ng J a s o n R. B r i g g s

APRIL NEWSLETTER. MR. MCKREKOR checking in. What a unpredictable month March turned out to be...or was it in fact predictable?

Shell (cont d) SSE2034: System Software Experiment 3, Fall 2018, Jinkyu Jeong

1. The puppy weighs 15 pounds. What is the puppy s weight in kilograms? A. 15 kg B. 7.5 kg C. 6.8 kg D. 4.6 kg

RESOLVING THE TIBETAN MASTIFF DILEMMA

1.1 Brutus Bites Back

JUMPING By Molly Stone, Dip. A.B; CDBC; CC-SF/SPCA Animal Behavior Specialist, SPCA of Wake County

Behavior Solutions: House-Training

Appendix C: Grade 6 Samples of Student Writing

Public Key Directory: What is the PKD and How to Make Best Use of It

Positive Crate Training Guide

The judges will double check that they have the right dogs at the line and then when both handlers are ready they will tell you to let them go.

Competition Rules. Incredible Diving Dog Incredible Freestyle Flying Disc Incredible Fetch It!

website 2.0! letting a CMS do the annoying work for you. <librarian.net/talks/nelacms>

APLA BOD MEETING MINUTES Dec 16, 2014

The Importance of the Solms for DK breeding By Albrecht Keil, Dipperz Germany

JUNE 2010 tm MARCIA MOTHER TO THE STREETS. Trying to Save? TRY THE ENVELOPE SYSTEM. Your Toddler THE TERRIBLE TWOS. Joys & Challenges OF JOB SHARING

Dasher Web Service USER/DEVELOPER DOCUMENTATION June 2010 Version 1.1

EVALUATION OF EFFECTS OF A STRAIN, STOCKING DENSITY AND AGE ON BILATERAL SYMMETRY OF BROILER CHICKENS

WAYNE AND FIG NEWT-ON

Rubric Expectations. Personal Insights. Authentic Detailed Reference to why they came to the New World

Lecture 1: Turtle Graphics. the turtle and the crane and the swallow observe the time of their coming; Jeremiah 8:7

Wolves By Gail Gibbons. Recommended Reading for grades 3-5

Games! June Seven Mathematical Games. HtRaMTC Paul Zeitz,

I am a Veterinarian. Middle School Math Project

CSCA Top 10 Gala Event Guidelines. The inaugural event will take place at the 2018 CSCA National Specialty.

Another major risk is in cutting their hair at an early age because then your Pom pup will never grow their full adult coat.

LABORATORY EXERCISE 6: CLADISTICS I

A Peek Into the World of Streaming

REGULATIONS FOR FCI INTERNATIONAL DOG DANCING COMPETITIONS

Your web browser (Safari 7) is out of date. For more security, comfort and the best experience on this site: Update your browser Ignore

Transcription:

SEVENTHANNUALJUILFSCONTEST SPRING2015 DepartmentofComputerandInformationScience UniversityofOregon 2015%May%0% contributors:skylerberg,atleebrink,chriswilson

A: RINGS (1 POINTS) How much mass is contained in a system of rings around a planet? A team of astronomers has collected data about the size and average density of rings around various planets. Now they are arguing about whether there is enough mass in all the rings of a single planet to make a decent moon. You know, assuming the rings could be scooped up and formed into a moon-shape. Nobody wants to see astronomers fight, so we should help them resolve their argument peacefully. We have access to the data they collected, but we need to perform some arithmetic to see how much total mass is around each planet whose rings they surveyed. The data is organized by planet, and includes its number of rings, the inner and outer radius of each ring, and the average density of each ring. For simplicity, we can assume that the mass of one ring is its two-dimensional area times its average density. Thus we need to calculate the mass of each ring, and then output the total mass of all a planets rings. They have collected data about several planets, so we will need to do this several times. On a technical note, the astronomers have insisted that we use exactly.14159 as the value of Pi in our calculations. Apparently there is an argument about the significance of the other digits, and we want to remain neutral. Input: The first line of input is the number of planets 1 <= P <= 50. Then, for each planet, the first line is the number of rings 1 <= R <= 20. Then, for each ring, there is one line containing three real numbers separated by spaces: the inner radius of the ring, the outer radius of the ring, and the average density of the ring. Output: For each planet, output the total mass in all of its rings. The astronomers are tired of looking at dots, so we should truncate (floor) each number to an integer value. For example, 12.8 should be output as just 12, with no decimal point. Each number should be on its own line. Sample Input: 1 5 1 5.2 17.1.1 18.9 19.1 0.9 25. 26.8 0.02 2 100.1 100.2 1.62 100.5 100.6 2.11 Sample Output: 50 2610 25

B. COUNT THE CATS IN THE HATS (12 POINTS) The Cat in the Hat has made a terrible mess of things! He was trying to help the Sneetches clean out a peculiar machine when he raised his hat, which had under it Little Cat A. He asked Little Cat A to help, and after two minutes, the Little Cat raised his hat, revealing another Little Cat, with more Little Cats in its hat! Each Little Cat releases another Little Cat after two minutes and then releases another Little Cat every minute thereafter. Little Cat A is always considered to have been released at in minute 1. So in minute 1, there is 1 Little Cat. In minute 2, there is still 1 Little Cat. In minute, Little Cat A releases Little Cat B and there are 2 Little Cats. In minute 4, Little Cat A releases Little Cat C and there are Little Cats. In minute 5, Little Cat A releases Little Cat D, Little Cat B releases Little Cat E, and there are 5 Little Cats. And so on and so forth. During certain minutes the Cat in the Hat manages to catch a Little Cat and stuff it back into his hat. If the Cat in the Hat catches a Little Cat during minute 5, then there would be 4 rather than 5 Little Cats out and about at that minute. You may assume that the Cat in the Hat always catches a newly released Little Cat. Thus in the next minute there would be 7 Little Cats. == input == The first line of input will contain a single integer, T, followed by T test cases. Each test case will consist of a normal start with a line contain two space separated integers, 1 <= M <= 0 and 1 <= N <= M. M represents the number of minutes that pass and N represents the number of Little Cats that the Cat in the Hat catches and puts back in his hat. The next line will contain N space separated integers representing each minute that Cat in the Hat catches a Little Cat. == output == For each test case print the number of Little Cats out and about after N minutes have passed. The output will be greater than or equal to 0 and less than 2^1. Sample Input 6 1 5 10 6 9 1 1 1 Sample Output 7 28 0

C: DO THE RANKINGS AGREE? (12 POINTS) Your team has been retained by the director of a competition who supervises a panel of judges. The competition asks the judges to assign integer scores to competitors the higher the score, the better. Although the event has standards for what score values mean, each judge is likely to interpret those standards differently. A score of 100, say, may mean different things to different judges. The directors main objective is to determine which competitors should receive prizes for the top positions. Although absolute scores may differ from judge to judge, the director realizes that relative rankings provide the needed information if two judges rank the same competitors first, second, third,... then they agree on who should receive the prizes. Your team is to write a program to assist the director by comparing the scores of pairs of judges. The program is to read two lists of integer scores in competitor order and determine the highest ranking place (first place being highest) at which the judges disagree. The first line of input will be a number C, the number of competitor pairs. What follows will be a series of C score list pairs. Each pair begins with a single integer giving the number of competitors N, 1 < N < 1,000. The next N integers are the scores from the first judge in competitor order. These are followed by the second judges scores N more integers, also in competitor order. Scores are in the range 0 to 100,000 inclusive. Judges are not allowed to give ties, so each judge s scores will be unique. Values are separated from each other by one or more spaces. For each score pair, print a line with the integer representing the highest-ranking place at which the judges do not agree. If the judges agree on every place, print a line containing only the word agree. Use the format below: Case, one space, the case number, a colon and one space, and the answer for that case with no trailing spaces. Sample Input 2 4 8 6 2 15 7 17 8 80 60 40 20 10 0 50 70 160 100 120 80 20 60 90 15 Sample Output Case 1: agree Case 2:

D: FISHY MATH (10 POINTS) The cat sees fish. The cat must do math on the fish since the cat is not allowed to eat them. But in Fish World the numbers come before the thing to do with the number, such as 5 *. This says apply the * to the and the 5, which evaluates to 15. This is called postfish notation. A postfish expression will involve numbers and the operators + (plus), * (times), and (minus) separated by spaces. Any operator is to be applied to the previous two values that have been seen or computed. For example, 5 * is 15, 5 * 2 + is 17, and 5 2 * + means +(5*2) = 1. The first line of input will be an integer C, the number of expressions. This will be followed by C postfish expressions. For each expression, your program will need to print the single integer it evaluates to. Each expression will properly evaluate to a number: there are no errors like missing operators or missing or out of order numbers. Sample input: 5 4 + - 100 2 - + 1 2 4 + * + Sample output: 6 101 15

E: SIMPLE STRING COMPRESSION (6 POINTS) When you live in a shell, you have to keep all your strings of characters short. To do this, you have devised a very basic string compression method. The idea is that when there is a series of a character being repeated several times, we will write that character just once, followed by the number of repetitions. For example, aaaabb would become a4b2, which is a little bit shorter. aaaaaaaaaaaa becomes a12, which is a lot shorter. On the other hand, abcd becomes a1b1c1d1, which is longer. Our method is not perfect, but we need a program for it anyway. The first line of input will be an integer C, the number of strings to compress. This will be followed by C strings, each on a separate line. The strings consist of lower case characters [a-z], with no punctuation or spaces. All have length at least 1. Your output should consist of the compressions of each of the input strings, each on its own line. Sample input: aaaaaabbbbbc aabcdeeeeeeeee abcdefghij Sample output: a6b5c1 a2b1c1d1e9 a1b1c1d1e1f1g1h1i1j1