Problem A Moogle. source: moogle.c or moogle.cpp or moogle.java

Size: px
Start display at page:

Download "Problem A Moogle. source: moogle.c or moogle.cpp or moogle.java"

Transcription

1 Problem A Moogle source: moogle.c or moogle.cpp or moogle.java You got the original idea of making map software, called Moogle Maps, for the new cool Maple mphone. It will even be capable of indicating the location of a house address like Main Street 13. However, since the mphone has limited storage capacity, you need to reduce the data amount. You don't want to store the exact location of every single house number. Instead only a subset of the house numbers will be stored exactly, and the others will be linearly interpolated. So you want to select house numbers that will minimise the average interpolation error, given how many house locations you have capacity to store. We view the street as a straight line, and you will always store the rst and the last house location. Given that you've stored the locations x i and x j for the houses with numbers i and j respectively, but no other house in between, the interpolated value for a house with number k with i < k < j is x i + (x j x i ) k i j i. The rst line of input gives a single integer, 1 t 50, the number of test cases. For each test case, there are two lines. The rst contains h 00 and c h, where h is the number of houses in the street and c is the number of house locations that can be stored. The second contains h integers in increasing order giving the location of the h houses. Each location is in the interval [0, ]. For each test case, output the average interpolation error over all the h houses for the optimal selection of c house locations to store. The output should be given with four decimal places

2 Problem B Phone List source: phone.c or phone.cpp or phone.java Given a list of phone numbers, determine if it is consistent in the sense that no number is the prex of another. Let's say the phone catalogue listed these numbers: Emergency 911 Alice Bob In this case, it's not possible to call Bob, because the central would direct your call to the emergency line as soon as you had dialled the rst three digits of Bob's phone number. So this list would not be consistent. The rst line of input gives a single integer, 1 t 40, the number of test cases. Each test case starts with n, the number of phone numbers, on a separate line, 1 n Then follows n lines with one unique phone number on each line. A phone number is a sequence of at most ten digits. For each test case, output YES if the list is consistent, or NO otherwise NO YES

3 Problem C Nested Dolls source: dolls.c or dolls.cpp or dolls.java Dilworth is the world's most prominent collector of Russian nested dolls: he literally has thousands of them! You know, the wooden hollow dolls of dierent sizes of which the smallest doll is contained in the second smallest, and this doll is in turn contained in the next one and so forth. One day he wonders if there is another way of nesting them so he will end up with fewer nested dolls? After all, that would make his collection even more magnicent! He unpacks each nested doll and measures the width and height of each contained doll. A doll with width w 1 and height h 1 will t in another doll of width w and height h if and only if w 1 < w and h 1 < h. Can you help him calculate the smallest number of nested dolls possible to assemble from his massive list of measurements? On the rst line of input is a single positive integer 1 t 0 specifying the number of test cases to follow. Each test case begins with a positive integer 1 m 0000 on a line of itself telling the number of dolls in the test case. Next follow m positive integers w 1, h 1, w, h,..., w m, h m, where w i is the width and h i is the height of doll number i. 1 w i, h i for all i. For each test case there should be one line of output containing the minimum number of nested dolls possible

4 Problem D Fortune at El Dorado source: fortune.c or fortune.cpp or fortune.java In his fabulous trip to El Dorado, Kamran made his fortune. After helping the king solve a dicult math problem, the king granted a piece of royal garden to Kamran. The king wrote a letter to the gardener, so that a rectangular region of the royal garden with a specied area, be given to Kamran. You could guess that the trees in El Dorado are made from Gold! After taking the letter to the royal gardener, Kamran found out that, unfortunately, there is no specic pattern for the location of the trees in the garden. To get the most prot, Kamran talked to the gardener and convinced him that it would not matter much, if Kamran chose the location of his rectangular share, and if he would choose a share smaller than the letter suggests. However, the gardener insisted that Kamran's subgarden should have sides parallel to the garden sides (which is itself a rectangle), and that vertices should have integer coordinates. The area of the piece of land must be positive, so that the king would not suspect anything. Now, given the locations of the trees in the garden and the maximum allowed area of his share, Kamran should nd a rectangular sub-garden with maximum number of trees inside; if a tree is on the border of the sub-garden, he can safely claim it. The only number of the rst line, T, is the number of dierent instances to be solved. T blocks follow, which describe dierent independent problems. The rst line of a block, contains two integers 0 F 1000, the number of trees in the eld, and the specied area A. The following F lines, each describes the location of a tree, by two nonnegative integers x, y (1 x, y 1000). No two trees have the same position. For each block in the input, write a single integer, which is the maximum number of trees that Kamran can obtain

5 Problem E Parking source: parking.c or parking.cpp or parking.java When shopping on Long Street, Michael usually parks his car at some random location, and then walks to the stores he needs. Can you help Michael choose a place to park which minimises the distance he needs to walk on his shopping round? Long Street is a straight line, where all positions are integer. You pay for parking in a specic slot, which is an integer position on Long Street. Michael does not want to pay for more than one parking though. He is very strong, and does not mind carrying all the bags around. The rst line of input gives the number of test cases, 1 t 100. There are two lines for each test case. The rst gives the number of stores Michael wants to visit, 1 n 0, and the second gives their n integer positions on Long Street, 0 x i 99. for each test case a line with the minimal distance Michael must walk given optimal parking

6 Problem F Wavelet Compression source: wavelet.c or wavelet.cpp or wavelet.java The discrete wavelet transform is a popular tool for signal compression. In this problem, your job is to write a program to decompress a one-dimensional signal (a list of integers) that has been compressed by a simple wavelet transform. To understand how this simple wavelet transform works, suppose that we have a list of an even number of integers. We compute the sum and dierence of each pair of consecutive samples, resulting in two lists of sums and dierences each having half the original length. Formally, if the original samples are a(1),..., a(n) the i-th sum s(i) and dierence d(i) are computed as: for i = 1,..., n/ : s(i) = a( i 1) + a( i) d(i) = a( i 1) a( i) This is then rearranged to give the transformed signal by rst listing the sums and then the dierences. For example, if the input signal is: 5,, 3,, 5, 7, 9, 6 Then the sum and dierence signals are: Thus, the transformed signal is: s(i) = 7, 5, 1, 15 d(i) = 3, 1,, 3 7, 5, 1, 15, 3, 1,, 3 The same process is applied recursively to the rst half of the transformed signal, treating s(i) as the input signal, until the length of the input signal is 1. In the example above, the nal transformed signal is: 39, 15,, 3, 3, 1,, 3 It is assumed that the length of the original input is a power of, and the input signal consists of integers between 0 and 55 (inclusive) only. The input consists of a number of cases. Each case is specied on a line, starting with an integer N (1 N 56) indicating the number of samples. The next N integers are the transformed samples. The end of input is indicated by a case in which N = 0. For each test case, output the original samples on a single line, separated by a single space. 6

7

8 Problem G Server Relocation source: server.c or server.cpp or server.java Michael has a powerful computer server that has hundreds of parallel processors and terabytes of main memory and disk space. Many important computations run continuously on this server, and power must be supplied to the server without interruption. Michael's server must be moved to accommodate new servers that have been purchased recently. Fortunately, Michael's server has two redundant power supplies as long as at least one of the two power supplies is connected to an electrical outlet, the server can continue to run. When the server is connected to an electrical outlet, it can be moved to any location which is not further away from the outlet than the length of the cord used to connect to the outlet. Given which outlet Michael's server is plugged into initially and nally, and the locations of outlets in the server room, you should determine the smallest number of times you need to plug a cord into an electrical outlet in order to move the server while keeping the server running at all times. Note that, in the initial and nal conguration, only one cord is connected to the power outlet. The rst line of input is an integer giving the number of cases to follow. For each case, the rst line is of the form where OUT LET S OUT LET_INIT IAL OUT LET_F INAL LENGT H1 LENGT H OUT LET S is the number of outlets in the server room ( OUT LET S 1000). OUT LET_INIT IAL is the index (starting from 1) of the outlet the server is initially connected to. OUT LET_F INAL is the index (starting from 1) of the outlet the server is nally connected to. LENGT H1 and LENGT H are the positive lengths of the two power cords, with at most three digits of precision after the decimal point (0 < LENGT H1, LENGT H 30000). These are followed by OUT LET S lines giving the integer coordinates of the wall outlets, one per line, with the k-th line giving the location of the k-th outlet. All coordinates are specied as two integers (x- and y-coordinates) separated by a space, with absolute values at most You may assume that all coordinates are distinct, and that the initial outlet and the nal outlet are dierent. For each case, print the minimum number of times you need to plug a cord into an electrical outlet in order to move the server to the nal location while keeping the server running at all times. If this is not possible, print Impossible. 8

9 Impossible 8 9

10 Problem H Best SMS to Type source: bestsms.c or bestsms.cpp or bestsms.java Using SMS today is more than a pleasing hobby. As the number of messages one sends through this service grows, the need to type them fast is better felt. Sometimes, one wonders how fast a message can be typed. Changing some words to their synonyms, might help type the whole message faster, if we were able to quickly calculate the time needed for a specic message. In the following, we assume that each message is a string of capital English letters and space character. The letters `A' through `Z' are assigned to keys `' to `9', as in Figure 1. To type a letter, one should press its key 1,, 3, or 4 times, depending on the position of the letter from left to right. Figure 1: Letter assignments. If two consecutive letters of the message are mapped to one key, one should wait for the rst letter to be xed on the screen and then use the key again to type the second one. For instance, to type the letter `X', one should press `9' twice. If the next letter of the message is not on the same key, one can continue to type the rest of the message. Otherwise, one has to wait for some time, so that the typed `X' is xed, and then the next letter (`W', `X', `Y', or `Z') can be typed. To type whitespace, we use the key `1'. As there is no letter mapped to the key `1', the whitespace needs no time to be xed. You are given the time needed to press any key, and the time one should wait for a letter to be xed. Your program should nd the minimum time needed to type a nonempty string, given the above rules. The input le contains multiple test cases. The rst line of the input, contains t, the number of test cases that follow. Each of the following t blocks, describes a test case. The rst line of each block contains p and w (1 p, w 1000), which show the amount of time in milliseconds for pressing a letter and waiting for it to be xed, respectively. The second line contains a non-empty string of length at most 1000, consisting of spaces or capital English letters. There is no leading or trailing spaces in a line. 10

11 For each test case, output one line showing the time needed to type the message in milliseconds ABBAS SALAM 7 11

12 Problem I Vacation Rentals source: vacation.c or vacation.cpp or vacation.java The Fifth Season Resort consists of a number of condominiums which are frequently occupied by their owners. At other times, however, they are available as vacation rentals. Since the resort has no more than 6 condominiums, they are identied by upper case letters. One day the resort manager's telephone rings. She receives a reservation request for a vacation rental with an arrival date of December and a departure date of December 9. She looks at the table of reservations, but doesn't nd a condominium that would be available for the entire period. Most of the existing reservations were made by the owners of the respective condominiums (who want to stay in their own units), so it is not desirable to move an existing reservation from one unit to another. As she continues to scrutinize the table of reservations, however, she has an idea and says: I can put you up in unit B for the rst three nights, and transfer you to unit F for the rest of your stay. Will that work? The person agrees and the reservation is made. Notice that reservations are done by nights, so that a one night reservation implies that the guest departs one day after the arrival. The goal of this problem is to satisfy such reservation requests (without changing existing reservations), with a minimum number of transfers (from one unit to another) during the requested period. The input consists of a number of cases. The rst line of each case contains two positive integers M and N. M is the number of consecutive days for which the resort's manager has a reservation table, and N is the number of units (condominiums) in the resort. The units are labeled by upper case letters starting at `A'. There are at most 100 days and at least 3 rooms in the reservation table. The days are numbered 1,,..., M for simplicity. The reservation table is given in the next M lines. Each line (row) of the table refers to a particular day (in the order 1,, 3, etc.), and each column of the table to a particular unit of the resort (in the order `A', `B', `C', etc.). An entry of 'X' means that the corresponding unit is reserved for that day, while an 'O' means that the unit is available. The reservation table is followed by one line of input, the reservation request, consisting of two integers: the arrival date and the departure date. The arrival date is in the range 1..M. The departure date is greater than the arrival date and less than or equal to M + 1. The end of input is indicated by M = N = 0. For each test case, rst print the case number followed by a colon and a blank line. If the reservation request can be met, the output will show a reservation schedule with a minimum number of transfers (from one unit to another) during the stay at the resort. Each line of the schedule corresponds to a consecutive stay in the same unit, and should be printed in the following way: <unit>: <start date>-<end date> where <unit> is the unit, <start date> is the date on which the guests moves into the unit, and <end date> is the date on which the guests moves out of the unit. The lines in the schedule should be ordered in ascending order by the start date. 1

13 Tie breaking rule. There may be several schedules with a minimum number of transfers. In these cases, choose the schedule which uses the lowest unit label in the rst day (so unit `A' is given preference to unit `B'). If there is still a tie, choose the schedule with the lowest unit number in the second day, and so on. If the reservation request cannot be met, print the line: Not available instead of the schedule. Separate the output of consecutive cases by a blank line XXXXXXX XOXXXXO XOXXXXO XOXXXOX OXXOXOX XOXOXOX OXXOXOX OXXXXOX XXXXXXX XXXXXXX Case 1: B: -5 F:

Central Europe Regional Contest 2016

Central Europe Regional Contest 2016 University of Zagreb Faculty of Electrical Engineering and Computing November 1820, 2016 A: Appearance Analysis.......... 1 B: Bipartite Blanket............. 2 C: Convex Contour............. D: Dancing

More information

Organizing and Summarizing Data

Organizing and Summarizing Data 1 Organizing and Summarizing Data Key Definitions Frequency Distribution: This lists each category of data and how often they occur. : The percent of observations within the one of the categories. This

More information

CROATIAN OPEN COMPETITION IN INFORMATICS. 5 th ROUND

CROATIAN OPEN COMPETITION IN INFORMATICS. 5 th ROUND CROATIAN OPEN COMPETITION IN INFORMATICS 5 th ROUND COCI 2009/200 Task SOK 5th round, 6. March 200. second / 32 MB / 30 points Mirko and Slavko bought a few litters of orange, apple and pineapple juice.

More information

Math 112 Fall 2014 Midterm 1 Review Problems Page 1. (E) None of these

Math 112 Fall 2014 Midterm 1 Review Problems Page 1. (E) None of these Math Fall Midterm Review Problems Page. Solve the equation. The answer is: x x 7 Less than Between and Between and Between and 7 (E) More than 7. Solve for x : x x 8. The solution is a number: less than

More information

2013 Four-by-Four Competition Thursday, January 31st, Round Four-by-Four Competition Thursday, January 31st, 2013.

2013 Four-by-Four Competition Thursday, January 31st, Round Four-by-Four Competition Thursday, January 31st, 2013. Round 1 Round 1 1. What is the sum of the terms of an infinite geometric sequence with first term 2016 and common ratio? 2. In how many distinguishable ways can five extra copies of your sided house key

More information

Pacific Northwest Region Programming Contest Division 2

Pacific Northwest Region Programming Contest Division 2 Pacific Northwest Region Programming Contest Division 2 November 3rd, 2018 2018 Pacific Northwest Region Programming Contest 2 Reminders For all problems, read the input data from standard input and write

More information

DOWNLOAD PDF MICROSOFT EXCEL ALL FORMULAS LIST WITH EXAMPLES

DOWNLOAD PDF MICROSOFT EXCEL ALL FORMULAS LIST WITH EXAMPLES Chapter 1 : Examples of commonly used formulas - Office Support A collection of useful Excel formulas for sums and counts, dates and times, text manipularion, conditional formatting, percentages, Excel

More information

Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex

Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex Basic Topics: Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex Review ribbon terminology such as tabs, groups and commands Navigate a worksheet, workbook, and multiple workbooks Prepare

More information

PLU February 2018 Programming Contest. Novice Division

PLU February 2018 Programming Contest. Novice Division I. General Notes PLU February 2018 Programming Contest Novice Division 1. Do the problems in any order you like. They do not have to be done in order from 1 to 12. 2. Problems will have either no input

More information

Unit 2: Decimals. Thousands Hundreds Tens Ones Tenths Hundredths Thousandths Ten thousandths

Unit 2: Decimals. Thousands Hundreds Tens Ones Tenths Hundredths Thousandths Ten thousandths Unit 2: Decimals Decimals are a part of a whole (just like fractions) PLACE VALUE Thousands Hundreds Tens Ones Tenths Hundredths Thousandths Ten thousandths 1000 100 10 1 1 10 1 100 1 1000 1 10000 1000

More information

7 Next choice is 4, not 3...

7 Next choice is 4, not 3... Math 0 opics for rst exam Chapter 1: Street Networks Operations research Goal: determine how to carry out a sequence of tasks most eciently Ecient: least cost, least time, least distance,... Example: reading

More information

2010 ACM ICPC Southeast USA Regional Programming Contest. 6 November, 2010 PROBLEMS

2010 ACM ICPC Southeast USA Regional Programming Contest. 6 November, 2010 PROBLEMS 21 ACM ICPC Southeast USA Regional Programming Contest 6 November, 21 PROBLEMS A: Balloons... 1 B: Bit Counting... 2 C: Data Recovery... 3 D: Equal Angles... 5 E: Maximum Square... 6 F: Palindrometer...

More information

Transcriber(s): Aboelnaga, Eman Verifier(s): Yedman, Madeline Date Transcribed: Fall 2010 Page: 1 of 9

Transcriber(s): Aboelnaga, Eman Verifier(s): Yedman, Madeline Date Transcribed: Fall 2010 Page: 1 of 9 Page: 1 of 9 0:00 1 R1 The color s not going to show a little bit, but okay. Okay. So, um, a plus b quantity cubed, you said, means Stephanie a plus b times a plus b times a plus b /R1 3 R1 Okay, so you

More information

CS 170 Algorithms Spring 2009 David Wagner MT2

CS 170 Algorithms Spring 2009 David Wagner MT2 CS 170 Algorithms Spring 2009 David Wagner MT2 PRINT your name:, (last) SIGN your name: (first) PRINT your Unix account login: Your TA s name: Discussion section time: Name of the person sitting to your

More information

(Refer Slide Time: 06:01)

(Refer Slide Time: 06:01) Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 28 Applications of DFS Today we are going to be talking about

More information

Bulgarian Math Olympiads with a Challenge Twist

Bulgarian Math Olympiads with a Challenge Twist Bulgarian Math Olympiads with a Challenge Twist by Zvezdelina Stankova Berkeley Math Circle Beginners Group September 0, 03 Tasks throughout this session. Harder versions of problems from last time appear

More information

For more information, see the Math Notes box in Lesson of the Core Connections, Course 1 text.

For more information, see the Math Notes box in Lesson of the Core Connections, Course 1 text. Number TYPES OF NUMBERS When two or more integers are multiplied together, each number is a factor of the product. Nonnegative integers that have eactly two factors, namely, one and itself, are called

More information

A. Petr and a calendar

A. Petr and a calendar 1-29 Spring 2017 #2 A. Petr and a calendar time limit per test: 2 seconds : standard : standard Petr wants to make a calendar for current month. For this purpose he draws a table in which columns correspond

More information

WHOLE NUMBER AND DECIMAL OPERATIONS

WHOLE NUMBER AND DECIMAL OPERATIONS WHOLE NUMBER AND DECIMAL OPERATIONS Whole Number Place Value : 5,854,902 = Ten thousands thousands millions Hundred thousands Ten thousands Adding & Subtracting Decimals : Line up the decimals vertically.

More information

Excel 2010 Functions. 4/18/2011 Archdiocese of Chicago Mike Riley

Excel 2010 Functions. 4/18/2011 Archdiocese of Chicago Mike Riley Excel 2010 Functions 4/18/2011 Archdiocese of Chicago Mike Riley i VIDEO TUTORIALS AVAILABLE Almost 100,000 video tutorials are available from VTC. The available tutorials include Windows 7, GroupWise

More information

NOWCODER.COM 牛客网 - 中国最大 IT 笔试 / 面试题库 一. 编程题

NOWCODER.COM 牛客网 - 中国最大 IT 笔试 / 面试题库 一. 编程题 牛客网暑期 ACM 多校训练营 ( 第三场 ) 一. 编程题. Eddy was a contestant participating in ACM ICPC contests. ACM is short for Algorithm, Coding, Math. Since in the ACM contest, the most important knowledge is about algorithm,

More information

Problem A: Optimal Array Multiplication Sequence

Problem A: Optimal Array Multiplication Sequence Problem A: Optimal Array Multiplication Sequence Source: Input: Output: array.{c cc cpp} stdin stdout Given two arrays A and B, we can determine the array C = A B using the standard definition of matrix

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

MITOCW watch?v=4dj1oguwtem

MITOCW watch?v=4dj1oguwtem MITOCW watch?v=4dj1oguwtem PROFESSOR: So it's time to examine uncountable sets. And that's what we're going to do in this segment. So Cantor's question was, are all sets the same size? And he gives a definitive

More information

Greedy Algorithms CHAPTER 16

Greedy Algorithms CHAPTER 16 CHAPTER 16 Greedy Algorithms In dynamic programming, the optimal solution is described in a recursive manner, and then is computed ``bottom up''. Dynamic programming is a powerful technique, but it often

More information

Bits and Bytes. Here is a sort of glossary of computer buzzwords you will encounter in computer use:

Bits and Bytes. Here is a sort of glossary of computer buzzwords you will encounter in computer use: Bits and Bytes Here is a sort of glossary of computer buzzwords you will encounter in computer use: Bit Computer processors can only tell if a wire is on or off. Luckily, they can look at lots of wires

More information

Concur Travel User Guide

Concur Travel User Guide Concur Travel User Guide 1 Table of Contents What is Concur?... 3 Concur Modules... 3 Logging on to Concur... 5 Exploring the Home Page... 6 Updating Your Travel Profile... 7 Personal Information... 7

More information

Problem A - EPIC. Line Width of Letters (# characters) EEEEEEEEEE EEEEEEEEEE EE EE EEEEEEEEEE EEEEEEEEEE EE EE EEEEEEEEEE EEEEEEEEEE

Problem A - EPIC. Line Width of Letters (# characters) EEEEEEEEEE EEEEEEEEEE EE EE EEEEEEEEEE EEEEEEEEEE EE EE EEEEEEEEEE EEEEEEEEEE Problem A - EPIC Professor Plum likes the idea of visiting EPIC for MICS 4. He wants you to write a program to generate ASC art printing EPIC vertically for a sign to tape to the back of the van on the

More information

UCF Practice Local Contest Aug 23, 2014

UCF Practice Local Contest Aug 23, 2014 UCF Practice Local Contest Aug 3, 014 How Sweet It Is! filename: sweet (Difficulty Level: Easy) Dr. Orooji's twins, Mack and Zack, love video games. We will assume that all games are $50. M/Z save all

More information

16 Greedy Algorithms

16 Greedy Algorithms 16 Greedy Algorithms Optimization algorithms typically go through a sequence of steps, with a set of choices at each For many optimization problems, using dynamic programming to determine the best choices

More information

Kharagpur Site Online Problems 2013

Kharagpur Site Online Problems 2013 Kharagpur Site Online Problems 013 Problem #1: List Editing At the ACME University, as part of the Graduate course work, each student is required to undergo project work. The authorities always make an

More information

What's New. Version 9.2 release. Campground Master Contents 1. Contents. A couple quick reminders:

What's New. Version 9.2 release. Campground Master Contents 1. Contents. A couple quick reminders: Campground Master Contents 1 Contents A couple quick reminders: Make Backups! It's so sad when we hear from someone whose computer has crashed and they have no backup of their data to restore from. It's

More information

Millionaire. Input. Output. Problem limit seconds

Millionaire. Input. Output. Problem limit seconds Millionaire Congratulations! You were selected to take part in the TV game show Who Wants to Be a Millionaire! Like most people, you are somewhat risk-averse, so you might rather take $250,000 than a 50%

More information

ACM Pacific NW Region Programming Contest 13 November 2004 Problem A: Mersenne Composite Numbers

ACM Pacific NW Region Programming Contest 13 November 2004 Problem A: Mersenne Composite Numbers Problem A: Mersenne Composite Numbers One of the world-wide cooperative computing tasks is the Grand Internet Mersenne Prime Search GIMPS striving to find ever-larger prime numbers by examining a particular

More information

This exam is worth 24 points, or 24% of your total course grade. The exam contains six

This exam is worth 24 points, or 24% of your total course grade. The exam contains six CS 60B Final December 14, 1992 Your name login c60b{ Discussion section number TA's name This exam is worth 24 points, or 24% of your total course grade. The exam contains six questions. This booklet contains

More information

A theme park charges $12 entry to visitors. Find the money taken if 1296 people visit the park.

A theme park charges $12 entry to visitors. Find the money taken if 1296 people visit the park. Write an Equation An equation is a term used to describe a collection of numbers and variables related through mathematical operators. An algebraic equation will contain letters that relate to real quantities

More information

Computer Science 236 Fall Nov. 11, 2010

Computer Science 236 Fall Nov. 11, 2010 Computer Science 26 Fall Nov 11, 2010 St George Campus University of Toronto Assignment Due Date: 2nd December, 2010 1 (10 marks) Assume that you are given a file of arbitrary length that contains student

More information

Scheduler User Guide. Version 6

Scheduler User Guide. Version 6 Scheduler User Guide Version 6 Scheduler Program and User Guide 2003 Emergency Medicine Informatics, LLC. All rights reserved. 2 Introduction...7 The Scheduling Process...7 Shift Description...8 On Call

More information

Notes to Accompany Debugging Lecture. Jamie Blustein

Notes to Accompany Debugging Lecture. Jamie Blustein Notes to Accompany Debugging Lecture Jamie Blustein 28 April 2002 Introduction This lecture was originally written for Turbo Pascal, then updated for the rst ANSI C standard, then object-free C++. It does

More information

Simplifying Expressions

Simplifying Expressions Unit 1 Beaumont Middle School 8th Grade, 2017-2018 Math8; Intro to Algebra Name: Simplifying Expressions I can identify expressions and write variable expressions. I can solve problems using order of operations.

More information

0001 Understand the structure of numeration systems and multiple representations of numbers. Example: Factor 30 into prime factors.

0001 Understand the structure of numeration systems and multiple representations of numbers. Example: Factor 30 into prime factors. NUMBER SENSE AND OPERATIONS 0001 Understand the structure of numeration systems and multiple representations of numbers. Prime numbers are numbers that can only be factored into 1 and the number itself.

More information

CPSC W1: Midterm #1 (Group Version) Thu

CPSC W1: Midterm #1 (Group Version) Thu CPSC 320 2016W1: Midterm #1 (Group Version) 2016-10-20 Thu 1 2 1 O'd to a Pair of Runtimes [10 marks] Consider the following pairs of functions (representing algorithm runtimes), expressed in terms of

More information

Finite Element Analysis Prof. Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology, Madras. Lecture - 36

Finite Element Analysis Prof. Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology, Madras. Lecture - 36 Finite Element Analysis Prof. Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology, Madras Lecture - 36 In last class, we have derived element equations for two d elasticity problems

More information

CHAPTER 1: INTEGERS. Image from CHAPTER 1 CONTENTS

CHAPTER 1: INTEGERS. Image from  CHAPTER 1 CONTENTS CHAPTER 1: INTEGERS Image from www.misterteacher.com CHAPTER 1 CONTENTS 1.1 Introduction to Integers 1. Absolute Value 1. Addition of Integers 1.4 Subtraction of Integers 1.5 Multiplication and Division

More information

CPSC W1: Midterm #1

CPSC W1: Midterm #1 CPSC 320 2016W1: Midterm #1 2016-10-20 Thu 1 O'd to a Pair of Runtimes [10 marks] Consider the following pairs of functions (representing algorithm runtimes), expressed in terms of the positive variables

More information

CS 245 Midterm Exam Solution Winter 2015

CS 245 Midterm Exam Solution Winter 2015 CS 245 Midterm Exam Solution Winter 2015 This exam is open book and notes. You can use a calculator and your laptop to access course notes and videos (but not to communicate with other people). You have

More information

1. You have a complete bipartite graph where each part contains exactly n nodes, numbered from 0 to n - 1 inclusive.

1. You have a complete bipartite graph where each part contains exactly n nodes, numbered from 0 to n - 1 inclusive. 牛客网暑期 ACM 多校训练营 ( 第七场 ) 一. 编程题 1. You have a complete bipartite graph where each part contains exactly n nodes, numbered from 0 to n - 1 inclusive. The weight of the edge connecting two vertices with numbers

More information

Editing and Formatting Worksheets

Editing and Formatting Worksheets LESSON 2 Editing and Formatting Worksheets 2.1 After completing this lesson, you will be able to: Format numeric data. Adjust the size of rows and columns. Align cell contents. Create and apply conditional

More information

Southeastern European Regional Programming Contest Bucharest, Romania October 18, Problem A Banks

Southeastern European Regional Programming Contest Bucharest, Romania October 18, Problem A Banks Problem A Banks Input File: A.in Program Source File: A.c, A.cpp, A.java On Wall Street from Wonderland, we have n banks, with 10000 > n > 0. Each bank has exactly two neighbours, the left (L) and right

More information

Graph Quadratic Functions Using Properties *

Graph Quadratic Functions Using Properties * OpenStax-CNX module: m63466 1 Graph Quadratic Functions Using Properties * OpenStax This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution License 4.0 By the end of this

More information

Figure 4.1: The evolution of a rooted tree.

Figure 4.1: The evolution of a rooted tree. 106 CHAPTER 4. INDUCTION, RECURSION AND RECURRENCES 4.6 Rooted Trees 4.6.1 The idea of a rooted tree We talked about how a tree diagram helps us visualize merge sort or other divide and conquer algorithms.

More information

WebQuest. Question-File Quick-Start Instructions

WebQuest. Question-File Quick-Start Instructions Contents WebQuest Question-File Quick-Start Instructions 1 Introduction 1 2 Where to Start 2 2.1 Questionnaire on Paper............................. 2 2.2 Questionnaire in Electronic Format (Word, PDF,

More information

Math 100 Exam 1 Review Name. MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Math 100 Exam 1 Review Name. MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Math 00 Exam Review Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Answer the question as instructed. ) Which of the following statements is

More information

MITOCW watch?v=kz7jjltq9r4

MITOCW watch?v=kz7jjltq9r4 MITOCW watch?v=kz7jjltq9r4 PROFESSOR: We're going to look at the most fundamental of all mathematical data types, namely sets, and let's begin with the definitions. So informally, a set is a collection

More information

If m = f(m), m is said to be perfect; if m < f(m), m is said to be abundant; if m > f(m), m is said to be deficient.

If m = f(m), m is said to be perfect; if m < f(m), m is said to be abundant; if m > f(m), m is said to be deficient. Problem 1: Abundant Numbers For any natural number (i.e., nonnegative integer) m, let f(m) be the sum of the positive divisors of m, not including m itself. As examples, f(28) = 1 + 2 + 4 + 7 + 14 = 28,

More information

Car Parking. Task Description IOI 2000 Beijing PROBLEM

Car Parking. Task Description IOI 2000 Beijing PROBLEM CAR Car Parking PROBLEM A parking center by the Great Wall has a long row of parking places. One end of the row is considered left and the other end is considered right. The row is full of cars. Each car

More information

2016 靜宜大學全國程式競賽題目. Problem1:Largest Square. Description

2016 靜宜大學全國程式競賽題目. Problem1:Largest Square. Description Problem1:Largest Square 2016 靜宜大學全國程式競賽題目 Given a rectangular grid of characters you have to find out the length of a side of the largest square such that all the characters of the square are same and

More information

Twelfth Annual Ohio Wesleyan University Programming Contest April 7, 2018 Rules: 1. There are six questions to be completed in four hours. 2.

Twelfth Annual Ohio Wesleyan University Programming Contest April 7, 2018 Rules: 1. There are six questions to be completed in four hours. 2. Twelfth Annual Ohio Wesleyan University Programming Contest April 7, 2018 Rules: 1. There are six questions to be completed in four hours. 2. All questions require you to read the test data from standard

More information

A Problem Set 8: Geometry Spring 2018

A Problem Set 8: Geometry Spring 2018 A Problem Set 8: Geometry 15-295 Spring 2018 G - Grachten Damn! I did not only oversleep (and today is the contest day!) but I also got stuck somewhere in Delft on my way from the hotel to the contest

More information

V Advanced Data Structures

V Advanced Data Structures V Advanced Data Structures B-Trees Fibonacci Heaps 18 B-Trees B-trees are similar to RBTs, but they are better at minimizing disk I/O operations Many database systems use B-trees, or variants of them,

More information

Problem A. Character Encoding

Problem A. Character Encoding Problem A. Character Encoding second In computer science, a character is a letter, a digit, a punctuation mark or some other similar symbol. Since computers can only process numbers, number codes are used

More information

Integrated Math 1 Module 3 Honors Sequences and Series Ready, Set, Go! Homework

Integrated Math 1 Module 3 Honors Sequences and Series Ready, Set, Go! Homework 1 Integrated Math 1 Module 3 Honors Sequences and Series Ready, Set, Go! Homework Adapted from The Mathematics Vision Project: Scott Hendrickson, Joleigh Honey, Barbara Kuehl, Travis Lemon, Janet Sutorius

More information

Problem Solving Strategies set of advanced problems

Problem Solving Strategies set of advanced problems Problem Solving Strategies set of advanced problems Maria Keet University of Cape Town, South Africa ICPC Training Session, April 12, 2015 Task: categorise the following set of more and less advanced problems

More information

SECTION 5.1. Sequences

SECTION 5.1. Sequences SECTION 5.1 Sequences Sequences Problem: count number of ancestors one has 2 parents, 4 grandparents, 8 greatgrandparents,, written in a row as 2, 4, 8, 16, 32, 64, 128, To look for pattern of the numbers,

More information

PowerPoint Introduction. Video: Slide Basics. Understanding slides and slide layouts. Slide Basics

PowerPoint Introduction. Video: Slide Basics. Understanding slides and slide layouts. Slide Basics PowerPoint 2013 Slide Basics Introduction PowerPoint presentations are made up of a series of slides. Slides contain the information you will present to your audience. This might include text, pictures,

More information

Excel Basics: Working with Spreadsheets

Excel Basics: Working with Spreadsheets Excel Basics: Working with Spreadsheets E 890 / 1 Unravel the Mysteries of Cells, Rows, Ranges, Formulas and More Spreadsheets are all about numbers: they help us keep track of figures and make calculations.

More information

AtCoder World Tour Finals 2019

AtCoder World Tour Finals 2019 AtCoder World Tour Finals 201 writer: rng 58 February 21st, 2018 A: Magic Suppose that the magician moved the treasure in the order y 1 y 2 y K+1. Here y i y i+1 for each i because it doesn t make sense

More information

Equations and Functions, Variables and Expressions

Equations and Functions, Variables and Expressions Equations and Functions, Variables and Expressions Equations and functions are ubiquitous components of mathematical language. Success in mathematics beyond basic arithmetic depends on having a solid working

More information

MAT 142 College Mathematics. Module ST. Statistics. Terri Miller revised July 14, 2015

MAT 142 College Mathematics. Module ST. Statistics. Terri Miller revised July 14, 2015 MAT 142 College Mathematics Statistics Module ST Terri Miller revised July 14, 2015 2 Statistics Data Organization and Visualization Basic Terms. A population is the set of all objects under study, a sample

More information

RouteOp. Step 1: Make sure requirements are met.

RouteOp. Step 1: Make sure requirements are met. RouteOp If you are just getting started please note that the features are not enabled until your first call. You will receive a welcome email to get the ball rolling and will be hearing from your implementation

More information

6.25 x Type the given number into the calculator. 2. Click Mode, and select SCI. Then hit enter twice

6.25 x Type the given number into the calculator. 2. Click Mode, and select SCI. Then hit enter twice Name Date: Lesson 1-4: Scientific Notation Learning Goals: #1: How do we convert in and out of scientific notation? Scientific Notation Scientific Notation is a way of writing numbers that accommodates

More information

Prepare a stem-and-leaf graph for the following data. In your final display, you should arrange the leaves for each stem in increasing order.

Prepare a stem-and-leaf graph for the following data. In your final display, you should arrange the leaves for each stem in increasing order. Chapter 2 2.1 Descriptive Statistics A stem-and-leaf graph, also called a stemplot, allows for a nice overview of quantitative data without losing information on individual observations. It can be a good

More information

3.1 Constructions with sets

3.1 Constructions with sets 3 Interlude on sets Sets and functions are ubiquitous in mathematics. You might have the impression that they are most strongly connected with the pure end of the subject, but this is an illusion: think

More information

Advanced Reporting Tool

Advanced Reporting Tool Advanced Reporting Tool The Advanced Reporting tool is designed to allow users to quickly and easily create new reports or modify existing reports for use in the Rewards system. The tool utilizes the Active

More information

Unit 2 Fine-tuning Spreadsheets, Functions (AutoSum)

Unit 2 Fine-tuning Spreadsheets, Functions (AutoSum) Unit 2 Fine-tuning Spreadsheets, Functions (AutoSum) Select a Row or a Column Place your pointer over the Column Header (gray cell at the top of a column that contains a letter identifying the column)

More information

Data Mining. Part 2. Data Understanding and Preparation. 2.4 Data Transformation. Spring Instructor: Dr. Masoud Yaghini. Data Transformation

Data Mining. Part 2. Data Understanding and Preparation. 2.4 Data Transformation. Spring Instructor: Dr. Masoud Yaghini. Data Transformation Data Mining Part 2. Data Understanding and Preparation 2.4 Spring 2010 Instructor: Dr. Masoud Yaghini Outline Introduction Normalization Attribute Construction Aggregation Attribute Subset Selection Discretization

More information

6.001 Notes: Section 4.1

6.001 Notes: Section 4.1 6.001 Notes: Section 4.1 Slide 4.1.1 In this lecture, we are going to take a careful look at the kinds of procedures we can build. We will first go back to look very carefully at the substitution model,

More information

Chapter 3: Functions

Chapter 3: Functions Chapter 3: Functions Index: A: Introduction to Functions 1 Page 2 B: Introduction to Functions 2 (U3 L1) Page 8 C: Function Notation (U3 L2) Page 13 D: Graphs of Functions (U3 L3) Page 18 E: Graphical

More information

Decimals should be spoken digit by digit eg 0.34 is Zero (or nought) point three four (NOT thirty four).

Decimals should be spoken digit by digit eg 0.34 is Zero (or nought) point three four (NOT thirty four). Numeracy Essentials Section 1 Number Skills Reading and writing numbers All numbers should be written correctly. Most pupils are able to read, write and say numbers up to a thousand, but often have difficulty

More information

V Advanced Data Structures

V Advanced Data Structures V Advanced Data Structures B-Trees Fibonacci Heaps 18 B-Trees B-trees are similar to RBTs, but they are better at minimizing disk I/O operations Many database systems use B-trees, or variants of them,

More information

1. One-third of 105 is the same as seven-sixths of what number? 1.

1. One-third of 105 is the same as seven-sixths of what number? 1. Blitz, Page. One-third of 05 is the same as seven-sixths of what number?. 2. A rectangle has length 6 and width 2. What is the radius of the 2. units circle that passes through the four vertices of the

More information

MIT Programming Contest Team Contest 1 Problems 2008

MIT Programming Contest Team Contest 1 Problems 2008 MIT Programming Contest Team Contest 1 Problems 2008 October 5, 2008 1 Edit distance Given a string, an edit script is a set of instructions to turn it into another string. There are four kinds of instructions

More information

Competitive Programming Network - 2nd Activity March 11th, Alphabet.c, Alphabet.cpp, Alphabet.java, Alphabet.py Standard Standard

Competitive Programming Network - 2nd Activity March 11th, Alphabet.c, Alphabet.cpp, Alphabet.java, Alphabet.py Standard Standard Problem A. Alphabet Source file name: : : Alphabet.c, Alphabet.cpp, Alphabet.java, Alphabet.py A string of lowercase letters is called alphabetical if deleting zero or more of its letters can result in

More information

Problem A: Collatz Conjecture

Problem A: Collatz Conjecture Problem A: Collatz Conjecture The Collatz conjecture which is also known as the 3n + conjecture is a very well known and old conjecture in mathematics. The conjecture is as follows. Take any natural number

More information

PLU February 2018 Programming Contest. Advanced Division

PLU February 2018 Programming Contest. Advanced Division I. General Notes PLU February 018 Programming Contest Advanced Division 1. Do the problems in any order you like. They do not have to be done in order from 1 to 1.. Problems will have either no input or

More information

Better, more accurate motion. Easier to Program and Run. Advanced Communications 6-09

Better, more accurate motion. Easier to Program and Run. Advanced Communications 6-09 Better, more accurate motion Easier to Program and Run Advanced Communications 6-09 A dvancing computer technology is driving the development of a new generation of CNC controls. Thermwood, the only major

More information

Chapter 6 Classes and Objects

Chapter 6 Classes and Objects Chapter 6 Classes and Objects Hello! Today we will focus on creating classes and objects. Now that our practice problems will tend to generate multiple files, I strongly suggest you create a folder for

More information

Unit 6 Quadratic Functions

Unit 6 Quadratic Functions Unit 6 Quadratic Functions 12.1 & 12.2 Introduction to Quadratic Functions What is A Quadratic Function? How do I tell if a Function is Quadratic? From a Graph The shape of a quadratic function is called

More information

Multi-edges, loops, and two or more pieces are all allowed. Example 4 (Not Graphs). None of the following are graphs.

Multi-edges, loops, and two or more pieces are all allowed. Example 4 (Not Graphs). None of the following are graphs. MA 111, Topic 4: Graph Theory Our last topic in this course is called Graph Theory. This is the mathematics of connections, associations, and relationships. Definition 1. A Graph is a set of points called

More information

Millburn Academy. Numeracy Across Learning. Name. Department

Millburn Academy. Numeracy Across Learning. Name. Department Millburn Academy Numeracy Across Learning Name Department Introduction Aim of this Booklet This booklet has been produced as the first step towards teaching numeracy across the curriculum in a consistent

More information

Text. Text metrics. There are some important metrics that we must consider when working with text. Figure 4-1 shows the basics.

Text. Text metrics. There are some important metrics that we must consider when working with text. Figure 4-1 shows the basics. Text Drawing text has some special properties and thus is treated in a separate chapter. We first need to talk about the sizing of text. Then we discuss fonts and how text is actually drawn. There is then

More information

The Rectangular Coordinate Systems and Graphs

The Rectangular Coordinate Systems and Graphs OpenStax-CNX module: m51252 1 The Rectangular Coordinate Systems and Graphs OpenStax College This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution License 4.0 In this

More information

20 th South African Regional International Collegiate Programming Contest

20 th South African Regional International Collegiate Programming Contest 20 th South African Regional International Collegiate Programming Contest Problem Description 20 October 2018 Problem A Green Balloon Huff and Puff You have discovered a piece of text encoded by an ancient

More information

Vocabulary: Bits and Pieces III

Vocabulary: Bits and Pieces III Vocabulary: Bits and Pieces III Concept Example Meaning of decimal There are two ways to think of a decimal: As a number whose value is signaled by place value, or as a representation of a fraction.. 43

More information

2013 Consortium for Computing Sciences in Colleges Programming Contest Saturday, November 16th Furman University Greenville, SC

2013 Consortium for Computing Sciences in Colleges Programming Contest Saturday, November 16th Furman University Greenville, SC 2013 Consortium for Computing Sciences in Colleges Programming Contest Saturday, November 16th Furman University Greenville, SC There are eight (8) problems in this packet. Each team member should have

More information

Identify the following 3-D Geometric Shapes

Identify the following 3-D Geometric Shapes 5.1 Intro January 3, 2011 4:55 PM Identify the following 3-D Geometric Shapes Important Terms Chapter 5 Page 1 - - - - - Face: Any flat area on a prism Curved Area: The curved part of a cylinder or cone

More information

CS3L Summer 2011 Exam 2 Time: up to 170 minutes (you may leave when finished; or, you must stop promptly at noon)

CS3L Summer 2011 Exam 2 Time: up to 170 minutes (you may leave when finished; or, you must stop promptly at noon) CS3L Summer 2011 Exam 2 Time: up to 170 minutes (you may leave when finished; or, you must stop promptly at noon) Name: Login: cs3- First names of the people to your left and right, if any: Left: Right:

More information

Greedy Homework Problems

Greedy Homework Problems CS 1510 Greedy Homework Problems 1. (2 points) Consider the following problem: INPUT: A set S = {(x i, y i ) 1 i n} of intervals over the real line. OUTPUT: A maximum cardinality subset S of S such that

More information

CIS4/681 { Articial Intelligence 2 > (insert-sort '( )) ( ) 2 More Complicated Recursion So far everything we have dened requires

CIS4/681 { Articial Intelligence 2 > (insert-sort '( )) ( ) 2 More Complicated Recursion So far everything we have dened requires 1 A couple of Functions 1 Let's take another example of a simple lisp function { one that does insertion sort. Let us assume that this sort function takes as input a list of numbers and sorts them in ascending

More information

COMP3121/3821/9101/ s1 Assignment 1

COMP3121/3821/9101/ s1 Assignment 1 Sample solutions to assignment 1 1. (a) Describe an O(n log n) algorithm (in the sense of the worst case performance) that, given an array S of n integers and another integer x, determines whether or not

More information