ACM ICPC 2012, qualification round

Size: px
Start display at page:

Download "ACM ICPC 2012, qualification round"

Transcription

1 Task 01 Area file: area.in file: area.out Lawn design company decided to create a lawn design in front of its office to advertise its services. Initially they made a project for a convex quadrilateral form lawn ABCD (see the picture below). After seeing the plan the director of the company said that since it is done for advertising purposes they could afford a bigger lawn. He made each side two times longer and thus obtained a lawn constructed by the points QRST. The point A is right in the middle between D and Q. The point B is right in the middle between A and R. The point C is right in the middle between B and S. The point D is right in the middle between C and T. The accountants were interested in how much the cost of the new lawn would increase. Your task is to calculate the ratio of the area of QRTST and the area of ABCD. Each row has 5 decimal numbers in the interval of 1 to with 10 digits after the decimal separator. These 5 numbers correspond to AB, BC, CD, DA, AC. There are no more than 100 rows. Each row of the output file holds the ratio of the areas of the corresponding line from the input file with the precision of 10 digits after the decimal separator Q B R A T D C S 1/12

2 Task 02 Bean Language file: bean.in file: bean.out Beans (of the Fabaceae family) communicate using their own obscure language. Its universal adoption is facilitated by the fact that it subsumes a wide variety of human languages, an added bonus being that it is undecipherable in rare cases, basically when human listeners have not been paying attention. Beans will pay you a fortune though if you write a program to help them understand human messages! The rule used to translate any text into Bean language is: every maximal substring consisting of only vowels should be duplicated, inserting P before the duplicate occurrence. Thus, for example, FABACEAE becomes FAPABAPACEAEPEAE. Note: the Latin letters A, E, I, O, U, Y should be considered vowels; the others are consonants. The input file consists of one line containing a message to be translated. The message consists only of uppercase Latin letters and spaces. It starts and ends with a letter. It is at least 1 and at most characters long. The output file should contain the message translated into Bean language. PUPA YRA TOIT PUPUPAPA YPYRAPA TOIPOIT 2/12

3 Task 03 Bureaucrats file: bureaucrats.in file: bureaucrats.out A company called QuickApproval managed to rent one of the rooms in town council. Sadly the town suffers from bureaucracy and it is really hard for entrepreneurs to get approvals for their projects. QuickApproval decided to offer a project approval service for the entrepreneurs. The town council has N rooms numbered from 0 to N-1 that are connected with hallways. One room belongs to QuickApproval, one room is exit, but others belong to the bureaucrats of the town council. The bureaucrats of the town council can t stand being bothered with the same project more than once. The task is to find if QuickApproval can travel all the other rooms and exit the building while visiting each room only once (including the room owned by QuickApproval and the exit from building). The first row holds the number of testcases (not more than 20). Test case has the following layout - first row holds the number of rooms N (1<N<16), second row holds the number of room owned by QuickApproval, the third row holds the number or the exit room Y (Y X ). Last is the adjacency matrix of format N*N (N rows and N columns with 0 or 1 in each cell). If the cell on column i and row j has 1 then the rooms i and j are connected with a hallway, otherwise not. The columns and rows are in the range 0 to N-1. The output file should have a single line for each test case containing a single word Yes if the travel is possible and No, if not No Yes 3/12

4 Task 04 Cards file: cards.in file: cards.out Adam found N blank cards in his drawer. He wrote a number on each side of each card and thought of the following puzzle: what is the smallest possible value that can be obtained by reordering and possibly flipping the cards and interpreting the sequence as an expression of the following form? After a while he came up with a solution. Can you write a program to do the same? The first line contains the integer N (2 N 100,000; N is even). Each of the following N lines describes one card by giving the two integers A i and B i ( A i 2000, B i 2000) written on it. The first and only line should contain a single integer, the minimal value of the expression that can be obtained from the cards The minimal sum can be achieved by taking the cards in the following order: 1 st, 2 nd, 3 rd, 5 th, 4 th, and 6 th. Then the expression becomes (-8) (5) + (-3) (7) + (-7) (4) = /12

5 Task 05 Countries file: countries.in file: countries.out Given a list of countries (for instance, Belarus, Estonia, Latvia, Lithuania, and Russia) we need to find the two letter abbreviation for each of them. The name of the country can be perceived as a head that is the first letter of the name and the tail the rest of the name. The first letter of the abbreviation is the first letter of the name (the head). The second letter of the abbreviation can be any letter of the tail e.g. Russia can be abbreviated to Ru, Rs, Ri or Ra. The task is to find the biggest subset of the country names with valid abbreviations taken into account that different countries must have different abbreviations. The input file has no more than 40 test cases. Each test case starts with the length of the country name list N (1 N 100). Then N rows of country names follow that are 2 to 50 characters long. The names consist of upper and lower case Latin letters. The input file ends with 0 that tells that the test cases have ended. For each of the test cases in the input file the output file must contain a row with the number of the maximum countries that can have correct abbreviations. 5 Belarus Estonia Latvia Lithuania Russia 4 ABC ACD ADB ABD 6 AA AAB AABC ACABABABABABD ADE AEBC /12

6 5 Example abbreviations for the test cases above: First test case: Be, Es, La, Li, Ru Second test case: AB (for ABC), AC (for ACD), AD (for ADB or ABD) 6/12

7 Task 06 Mean file: mean.in file: mean.out In sports such as gymnastics or diving, sometimes judges tend to give biased scores depending on their likes or dislikes of an athlete. To remedy the situation, truncated or Winsorized mean is often used instead of the regular mean to compute the final score of an athlete. For example, if seven judges gave the scores 9.3, 9.5, 9.6, 9.8, 9.1, 5.0, 9.3, the mean score 8.8 is the result of one low score of 5.0 that is probably unfair to the contestant. K-truncated mean is computed by discarding K lowest and K highest scores and calculating the average of the remaining ones. For example, 2-truncated mean of the above sequence, rounded to two decimal places, would be K-Winsorized mean, on the other hand, replaces the K lowest and K highest scores with the next closest score. For the above example sequence, 5.0 and 9.1 would be replaced by 9.3 while 9.8 and 9.6 would be replaced by 9.5, giving 9.39 as the 2-Winsorized mean (again, rounded to two decimal places). Write a program to compute truncated and Winsorized means. The first line contains two integers N and K (0 2 K < N 10 6 ). The second line contains the N scores, each in the range from 0 to 100, given with exactly one decimal place. The first line should contain the K-truncated and the second line the K-Winsorized mean of the sequence given in the input file. Both means should be given with exactly two decimal places. Digits 0 4 in the third decimal place should be rounded down and 5 9 up /12

8 Task 07 Puzzle file: puzzle.in file: puzzle.out Consider the word puzzles of the type SEND + MORE MONEY where each letter must correspond to a different decimal digit, and leading zeros are not allowed in the numbers. One possible solution for the example above would be S = 9, E = 5, N = 6, D = 7, M = 1, O = 0, R = 8, Y = 2, giving = Write a program to find the number of solutions for puzzles f this type. The first and only line contains three words separated by single spaces: first addend, second addend and sum. Words consist of uppercase letters of Latin alphabet; no word is longer than 18 letters. The first and only line of output must contain the number of different solutions to the puzzle. A B A 0 A A BC 5 8/12

9 Task 08 Maximal Sum file: smax.in file: smax.out Write a program to find in the given integer sequence the subsequence with the maximal sum. The input may contain several test cases. Each test case is presented on two lines. The first line contains a single integer N (1 N 10 4 ), the number of elements in the sequence. The second line contains N integers A i ( A i 10 4 ), the elements of the sequence. The last line of input contains a zero. This is a terminator value and should not be processed. The output should contain exactly one line for each test case. Each line should contain two integers I and J (1 I J N) such that the sum of elements A I...J is the largest possible. If there are several sub-sequences with the maximal sum, output the shortest one. If there are several sub-sequences with the minimal length, output the leftmost one /12

10 Task 09 Tickets file: tickets.in file: tickets.out Ticket sales company decided to give discounts to every customer that would buy a lucky ticket. Every ticket has a sequence number of N = 2K digits that is padded with zeros up to the length N. A sequence number can consist of only zeroes. A ticket is considered to be lucky if the sum of its first K digits is equal to the sum of its last K digits. The company wants to how many discounts it will have to hand out if it sells all the tickets from number T 1 to number T 2. The first row of the input contains Q - the number of test cases (from 1 to 30). Next Q rows each hold a single test case consisting of 3 numbers. First entry of the row is number N that defines the length of the ticket sequence number (2 N 12), second and third are T 1 and T 2 - two N- digit sequence numbers that define the range of the ticket sequence number (T 1 T 2 ). The output file must have Q lines each holding the number of lucky tickets within the range given in the corresponding test case /12

11 Task 10 Trip file: trip.in file: trip.out There is a country where N cities (numbered from 1 to N) are connected by N-1 bidirectional roads so that it is possible to get from any city to any other via these roads. A traveller starts from the city S and needs to visit the cities C 1, C 2,, C M (in any order). The traveller wants to buy only as much gas as needed so that more money is left over for beer and pizza. Write a program to help him find the length of the shortest route that starts from the city K and visits each of the cities C i at least once (and possibly some others on the way). The first line contains the integers N, S, M (2 N 50,000; 1 S N; 1 M < N). Each of the following N-1 lines describes one road by the three integers A i, B i, D i (1 A i N; 1 B i N; A i B i ; 1 D i 1000) which mean that the road connects the cities A i and B i and the length of the road is D i. The last line contains the M integers C i (1 C i N; C i C j ; C i S). The first and only line should contain a single integer, the length of the shortest route starting in the city S and visiting all the cities C i The shortest route is /12

12 Task 11 XOR file: xor.in file: xor.out It is quite well known that the only encryption method that has been proven to be information theoretically secure is the one-time pad. In this method, a K-bit key is required to encrypt a K-bit plaintext, and the ciphertext is the bitwise XOR between the key and the plaintext. However, even the one-time pad can be broken when it's used carelessly and this is exactly what you're asked to do in this task. A crook has used the one-time pad to encrypt a short message sent to several accomplices. The police believes they managed to capture all the ciphertexts and also all the keys, but they do not have the plaintext and they do not know which ciphertext was produced with which key. Write a program to help them recover the plaintext. The first line contains N (1 N 1000), the number of keys/ciphertexts. Each of the following N lines contains a key. Each of the N lines after that contains a ciphertext. Both the keys and ciphertexts are given in hexadecimal, using only uppercase for the letters A Z. You can assume they all have the same even length that does not exceed 280 characters. The output should contain all possible plaintexts, one per line, in lexicographic order, or the word ERROR on the first and only line if the input data is inconsistent. The plaintexts should be given in hexadecimal, keeping the leading zeroes (if any), in uppercase AAAAAA FFFFFF BFBDB EAE8E D Indeed, encrypting the plaintext 40424D with the key gives the ciphertext , encrypting with the key AAAAAA gives the ciphertext EAE8E7, and encrypting with the key FFFFFF gives the ciphertext BFBDB2. 12/12

The 2016 ACM ICPC Vietnam National Programming Contest. The problem set consists of 11 problems: ICPC score distribution. Magical palindromic number

The 2016 ACM ICPC Vietnam National Programming Contest. The problem set consists of 11 problems: ICPC score distribution. Magical palindromic number The problem set consists of 11 problems: Problem A Problem B Problem C Problem D Problem E Problem F Problem G Problem H Problem I Problem J Problem K ICPC score distribution Magical palindromic number

More information

Problem A - Complete the sequence

Problem A - Complete the sequence Problem A - Complete the sequence You probably know those quizzes in Sunday magazines: given the sequence 1, 2, 3,,, what is the next number? Sometimes it is very easy to answer, sometimes it could be

More information

UNC Charlotte 2010 Comprehensive

UNC Charlotte 2010 Comprehensive 00 Comprehensive March 8, 00. A cubic equation x 4x x + a = 0 has three roots, x, x, x. If x = x + x, what is a? (A) 4 (B) 8 (C) 0 (D) (E) 6. For which value of a is the polynomial P (x) = x 000 +ax+9

More information

B. Composing Of String

B. Composing Of String Stepan has a set of n strings. Also, he has a favorite string s. B. Composing Of String time limit per test: 2 seconds memory limit per test: 256 megabytes : standard : standard Stepan wants to do the

More information

第六屆 ACM ICPC 全國私立大專校院程式競賽. National Contest for Private Universities, Taiwan 2016 競賽題目

第六屆 ACM ICPC 全國私立大專校院程式競賽. National Contest for Private Universities, Taiwan 2016 競賽題目 第六屆 ACM ICPC 全國私立大專校院程式競賽 National Contest for Private Universities, Taiwan 016 競賽題目 Problem 1: Maximum Subsequence Sum Problem (Time Limit: 3 seconds) Given a sequence containing both negative and positive

More information

D-Optimal Designs. Chapter 888. Introduction. D-Optimal Design Overview

D-Optimal Designs. Chapter 888. Introduction. D-Optimal Design Overview Chapter 888 Introduction This procedure generates D-optimal designs for multi-factor experiments with both quantitative and qualitative factors. The factors can have a mixed number of levels. For example,

More information

LOOK AT THE EXTEMES! Răzvan Gelca Texas Tech University

LOOK AT THE EXTEMES! Răzvan Gelca Texas Tech University LOOK AT THE EXTEMES! Răzvan Gelca Texas Tech University Problem 1: In some country all roads between cities are oneway so that once you leave a city you cannot return to it anymore. Prove that there exists

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

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

XV Open Cup named after E.V. Pankratiev Stage 6, Grand Prix of Japan, Sunday, February 1, 2015

XV Open Cup named after E.V. Pankratiev Stage 6, Grand Prix of Japan, Sunday, February 1, 2015 Problem A. Manhattan file: file: 1 second In Manhattan, there are streets x = i and y = i for each integer i. It is known that both Snuke s house and Smeke s house are on streets, and the Euclidean distance

More information

ACM-ICPC Indonesia National Contest Problem A. The Best Team. Time Limit: 2s

ACM-ICPC Indonesia National Contest Problem A. The Best Team. Time Limit: 2s Problem A The Best Team Time Limit: 2s ACM-ICPC 2010 is drawing near and your university want to select three out of N students to form the best team. The university however, has a limited budget, so they

More information

1. Alicia tosses 3 fair coins. What is the probability that she gets at 1. least 1 head? Express your answer as a common fraction.

1. Alicia tosses 3 fair coins. What is the probability that she gets at 1. least 1 head? Express your answer as a common fraction. Blitz, Page 1 1. Alicia tosses 3 fair coins. What is the probability that she gets at 1. least 1 head? Express your answer as a common fraction. 2. It took Anita 2.25 hours to walk 12.5 km. At this rate,

More information

Jeffrey D. Ullman Stanford University

Jeffrey D. Ullman Stanford University Jeffrey D. Ullman Stanford University A large set of items, e.g., things sold in a supermarket. A large set of baskets, each of which is a small set of the items, e.g., the things one customer buys on

More information

Downloaded from

Downloaded from Exercise 12.1 Question 1: A traffic signal board, indicating SCHOOL AHEAD, is an equilateral triangle with side a. Find the area of the signal board, using Heron s formula. If its perimeter is 180 cm,

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

Harvard-MIT Mathematics Tournament February 19, 2005

Harvard-MIT Mathematics Tournament February 19, 2005 Harvard-MIT Mathematics Tournament February 19, 2005 Guts Round... 1. [5] Find the largest positive integer n such that 1 + 2 + 3 + + n 2 is divisible by 1 + 2 + 3 + + n. 2. [5] Let x, y, and z be positive

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

Get Free notes at Module-I One s Complement: Complement all the bits.i.e. makes all 1s as 0s and all 0s as 1s Two s Complement: One s complement+1 SIGNED BINARY NUMBERS Positive integers (including zero)

More information

Chapter 1: Number and Operations

Chapter 1: Number and Operations Chapter 1: Number and Operations 1.1 Order of operations When simplifying algebraic expressions we use the following order: 1. Perform operations within a parenthesis. 2. Evaluate exponents. 3. Multiply

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

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

Central Europe Regional Contest

Central Europe Regional Contest 0 Central Europe Regional Contest University of Zagreb Faculty of Electrical Engineering and Computing November 9, 0 A: Assignment Algorithm......... B: Buffalo Barricades............ C: Cumulative Code............

More information

2016 ACM ICPC Southeast USA Regional Programming Contest. Division 1

2016 ACM ICPC Southeast USA Regional Programming Contest. Division 1 206 ACM ICPC Southeast USA Regional Programming Contest Division Alphabet... Base Sums... 2 Buggy Robot... 3 Enclosure... 5 Illumination... 6 InTents... 7 Islands... 9 Paint... 0 Periodic Strings... Water...

More information

Class IX Chapter 12 Heron's Formula Maths

Class IX Chapter 12 Heron's Formula Maths Class IX Chapter 12 Heron's Formula Maths 1: Exercise 12.1 Question A traffic signal board, indicating SCHOOL AHEAD, is an equilateral triangle with side a. Find the area of the signal board, using Heron

More information

2 a. 3 (60 cm) cm cm 4

2 a. 3 (60 cm) cm cm 4 Class IX - NCERT Maths Exercise (1.1) Question 1: A traffic signal board, indicating SCHOOL AHEAD, is an equilateral triangle with side a. Find the area of the signal board, using Heron s formula. If its

More information

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM 1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM 1.1 Introduction Given that digital logic and memory devices are based on two electrical states (on and off), it is natural to use a number

More information

4 KARNAUGH MAP MINIMIZATION

4 KARNAUGH MAP MINIMIZATION 4 KARNAUGH MAP MINIMIZATION A Karnaugh map provides a systematic method for simplifying Boolean expressions and, if properly used, will produce the simplest SOP or POS expression possible, known as the

More information

Math A Regents Exam 0807 Page 1

Math A Regents Exam 0807 Page 1 Math A Regents Exam 0807 Page 1 1. 080701a, P.I. G.G.5 Given the true statements: "t is a multiple of 3" and "t is even." What could be a value of t? [A] 4 [B] 9 [C] 8 [D] 15. 08070a, P.I. 7.S.6 The accompanying

More information

Market baskets Frequent itemsets FP growth. Data mining. Frequent itemset Association&decision rule mining. University of Szeged.

Market baskets Frequent itemsets FP growth. Data mining. Frequent itemset Association&decision rule mining. University of Szeged. Frequent itemset Association&decision rule mining University of Szeged What frequent itemsets could be used for? Features/observations frequently co-occurring in some database can gain us useful insights

More information

UNC Charlotte 2010 Comprehensive

UNC Charlotte 2010 Comprehensive 00 Comprehensive with solutions March 8, 00. A cubic equation x 4x x + a = 0 has three roots, x, x, x. If x = x + x, what is a? (A) 4 (B) 8 (C) 0 (D) (E) 6 Solution: C. Because the coefficient of x is

More information

Problem A. Find a Number

Problem A. Find a Number Problem A. Find a Number You are given two positive integers d and s. Find minimal positive integer n which is divisible by d and has sum of digits equal to s. The first line contains two positive integers

More information

UNIT 9 - RIGHT TRIANGLES AND TRIG FUNCTIONS

UNIT 9 - RIGHT TRIANGLES AND TRIG FUNCTIONS UNIT 9 - RIGHT TRIANGLES AND TRIG FUNCTIONS Converse of the Pythagorean Theorem Objectives: SWBAT use the converse of the Pythagorean Theorem to solve problems. SWBAT use side lengths to classify triangles

More information

CHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey

CHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey CHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey 2. Introduction Logic gates are connected together to produce a specified output for certain specified combinations of input

More information

Quarterfinal Central region of Russia. Rybinsk, October

Quarterfinal Central region of Russia. Rybinsk, October Quarterfinal Central region of Russia Rybinsk, October 14-15-2009 Problems A. Numeric sequence (16 Mb, 1 sec)... 2 B. Triangle (16 Mb, 1 sec)... 3 C. Tower of Hanoi (16 Mb, 1 sec)... 4 D. Lucky tickets

More information

Finite Math - J-term Homework. Section Inverse of a Square Matrix

Finite Math - J-term Homework. Section Inverse of a Square Matrix Section.5-77, 78, 79, 80 Finite Math - J-term 017 Lecture Notes - 1/19/017 Homework Section.6-9, 1, 1, 15, 17, 18, 1, 6, 9, 3, 37, 39, 1,, 5, 6, 55 Section 5.1-9, 11, 1, 13, 1, 17, 9, 30 Section.5 - Inverse

More information

Notes for Lecture 24

Notes for Lecture 24 U.C. Berkeley CS170: Intro to CS Theory Handout N24 Professor Luca Trevisan December 4, 2001 Notes for Lecture 24 1 Some NP-complete Numerical Problems 1.1 Subset Sum The Subset Sum problem is defined

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

LEVEL 6. Level 6. Page (iv)

LEVEL 6. Level 6. Page (iv) LEVEL 6 Number Page N9... Fractions, Decimals and Percentages... 69 N20... Improper Fractions and Mixed Numbers... 70 N2... Prime Numbers, HCF and LCM... 7 Calculating C22... Percentage of an Amount...

More information

Section 1.2 Fractions

Section 1.2 Fractions Objectives Section 1.2 Fractions Factor and prime factor natural numbers Recognize special fraction forms Multiply and divide fractions Build equivalent fractions Simplify fractions Add and subtract fractions

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

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

Math 3A Meadows or Malls? Review

Math 3A Meadows or Malls? Review Math 3A Meadows or Malls? Review Name Linear Programming w/o Graphing (2 variables) 1. A manufacturer makes digital watches and analogue (non-digital) watches. It cost $15 to make digital watch and $20

More information

Subject : Mathematics Level B1 Class VII Lesson: 1 (Integers)

Subject : Mathematics Level B1 Class VII Lesson: 1 (Integers) Subject : Mathematics Level B1 Class VII Lesson: 1 (Integers) Skill/Competency /Concept Computational Skill Properties of Addition and subtraction of integers Multiplication and division Operation on integer.

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

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014 Problem 1 (4 parts, 21 points) Encoders and Pass Gates Part A (8 points) Suppose the circuit below has the following input priority: I 1 > I 3 > I 0 > I 2. Complete the truth table by filling in the input

More information

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1 IT 1204 Section 2.0 Data Representation and Arithmetic 2009, University of Colombo School of Computing 1 What is Analog and Digital The interpretation of an analog signal would correspond to a signal whose

More information

Dynamic Programming Homework Problems

Dynamic Programming Homework Problems CS 1510 Dynamic Programming Homework Problems 1. Consider the recurrence relation T(0) = T(1) = 2 and for n > 1 n 1 T(n) = T(i)T(i 1) i=1 We consider the problem of computing T(n) from n. (a) Show that

More information

DKT 122/3 DIGITAL SYSTEM 1

DKT 122/3 DIGITAL SYSTEM 1 Company LOGO DKT 122/3 DIGITAL SYSTEM 1 BOOLEAN ALGEBRA (PART 2) Boolean Algebra Contents Boolean Operations & Expression Laws & Rules of Boolean algebra DeMorgan s Theorems Boolean analysis of logic circuits

More information

2016 Fall Startup Event Thursday, September 29th, 2016

2016 Fall Startup Event Thursday, September 29th, 2016 This test consists of 100 problems to be solved in 30 minutes. All answers must be exact, complete, and in simplest form. To ensure consistent grading, if you get a decimal, mixed number, or ratio as any

More information

Data Analysis and Solver Plugins for KSpread USER S MANUAL. Tomasz Maliszewski

Data Analysis and Solver Plugins for KSpread USER S MANUAL. Tomasz Maliszewski Data Analysis and Solver Plugins for KSpread USER S MANUAL Tomasz Maliszewski tmaliszewski@wp.pl Table of Content CHAPTER 1: INTRODUCTION... 3 1.1. ABOUT DATA ANALYSIS PLUGIN... 3 1.3. ABOUT SOLVER PLUGIN...

More information

Spring 2017 #5 A. Two Buttons

Spring 2017 #5 A. Two Buttons 15-295 Spring 2017 #5 A. Two Buttons time limit per test: 2 seconds : standard : standard Vasya has found a strange device. On the front panel of a device there are: a red button, a blue button and a display

More information

6. Algorithm Design Techniques

6. Algorithm Design Techniques 6. Algorithm Design Techniques 6. Algorithm Design Techniques 6.1 Greedy algorithms 6.2 Divide and conquer 6.3 Dynamic Programming 6.4 Randomized Algorithms 6.5 Backtracking Algorithms Malek Mouhoub, CS340

More information

2017 Four-by-Four Competition Thursday, February 2nd, Round Four-by-Four Competition Thursday, February 2nd, 2017.

2017 Four-by-Four Competition Thursday, February 2nd, Round Four-by-Four Competition Thursday, February 2nd, 2017. Round 1 Round 1 1. How many real roots does 3v 2 4v 5 = 0 have? 2. What is the largest possible area, in square meters, of a triangle with vertices on a circle with a radius of 4 m? 3. In a right triangle

More information

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around 1 Finite Math A Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around Academic Standards Covered in this Chapter: *************************************************************************************

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

(Practice Worksheet) MATHEMATICS

(Practice Worksheet) MATHEMATICS BIRLA PUBLIC SCHOOL, DOHA- QATAR (Practice Worksheet) MATHEMATICS CLASS 8 CHAPTER 1- RATIONAL NUMBERS I. Fill in the blanks: 1. If a is reciprocal of b, then reciprocal of b is. 2. The product of a rational

More information

2015 Mathworks Math Contest. Mathworks Math Contest For Middle School Students November 10, 2015

2015 Mathworks Math Contest. Mathworks Math Contest For Middle School Students November 10, 2015 Mathworks Math Contest For Middle School Students November 10, 2015 PROCTORING TEACHER COVER SHEET l Please complete the following fields and return this cover sheet with ALL student exams l Only one Teacher

More information

Slide Set 5. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Slide Set 5. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary Slide Set 5 for ENEL 353 Fall 207 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Fall Term, 207 SN s ENEL 353 Fall 207 Slide Set 5 slide

More information

Cryptography Worksheet

Cryptography Worksheet Cryptography Worksheet People have always been interested in writing secret messages. In ancient times, people had to write secret messages to keep messengers and interceptors from reading their private

More information

ACM International Collegiate Programming Contest 2013

ACM International Collegiate Programming Contest 2013 International Collegiate acm Programming Contest 013 event sponsor ACM International Collegiate Programming Contest 013 Latin American Regional Contests November 8th-9th, 013 Contest Session This problem

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

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 3 January 13, 2012 CPSC 467b, Lecture 3 1/36 Perfect secrecy Caesar cipher Loss of perfection Classical ciphers One-time pad Affine

More information

Objectives/Outcomes. Introduction: If we have a set "collection" of fruits : Banana, Apple and Grapes.

Objectives/Outcomes. Introduction: If we have a set collection of fruits : Banana, Apple and Grapes. 1 September 26 September One: Sets Introduction to Sets Define a set Introduction: If we have a set "collection" of fruits : Banana, Apple Grapes. 4 F={,, } Banana is member "an element" of the set F.

More information

GAP CLOSING. Integers. Intermediate / Senior Facilitator s Guide

GAP CLOSING. Integers. Intermediate / Senior Facilitator s Guide GAP CLOSING Integers Intermediate / Senior Facilitator s Guide Topic 3 Integers Diagnostic...5 Administer the diagnostic...5 Using diagnostic results to personalize interventions solutions...5 Using Intervention

More information

CS246: Mining Massive Datasets Jure Leskovec, Stanford University

CS246: Mining Massive Datasets Jure Leskovec, Stanford University CS246: Mining Massive Datasets Jure Leskovec, Stanford University http://cs246.stanford.edu 1/8/2014 Jure Leskovec, Stanford CS246: Mining Massive Datasets, http://cs246.stanford.edu 2 Supermarket shelf

More information

Shingling Minhashing Locality-Sensitive Hashing. Jeffrey D. Ullman Stanford University

Shingling Minhashing Locality-Sensitive Hashing. Jeffrey D. Ullman Stanford University Shingling Minhashing Locality-Sensitive Hashing Jeffrey D. Ullman Stanford University 2 Wednesday, January 13 Computer Forum Career Fair 11am - 4pm Lawn between the Gates and Packard Buildings Policy for

More information

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017 ECE 550D Fundamentals of Computer Systems and Engineering Fall 2017 Combinational Logic Prof. John Board Duke University Slides are derived from work by Profs. Tyler Bletsch and Andrew Hilton (Duke) Last

More information

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around 1 Finite Math A Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around Academic Standards Covered in this Chapter: *************************************************************************************

More information

NMC Sample Problems: Grade 8

NMC Sample Problems: Grade 8 NM Sample Problems: Grade 8. right triangle has lengths of and 8 in sides. What is the length of hypotenuse (the longest side)? (b) 0 5. n isosceles triangle has the base length of 6 and each side of length.

More information

The Basics of Network Structure

The Basics of Network Structure The Basics of Network Structure James M. Cook University of Maine at Augusta james.m.cook@maine.edu Keywords Betweenness; Centrality; Closeness; Degree; Density; Diameter; Distance; Clique; Connected Component;

More information

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

NOWCODER.COM 牛客网 - 中国最大 IT 笔试 / 面试题库 一. 编程题 牛客网暑期 ACM 多校训练营 ( 第八场 ) 一. 编程题 1. Niuniu has N directed segments. Each segment has one color. He wants to make a powerful sword by connecting the segments. He can choose at most K segments. He isn t allowed

More information

High dim. data. Graph data. Infinite data. Machine learning. Apps. Locality sensitive hashing. Filtering data streams.

High dim. data. Graph data. Infinite data. Machine learning. Apps. Locality sensitive hashing. Filtering data streams. http://www.mmds.org High dim. data Graph data Infinite data Machine learning Apps Locality sensitive hashing PageRank, SimRank Filtering data streams SVM Recommen der systems Clustering Network Analysis

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

GAP CLOSING. Grade 9. Facilitator s Guide

GAP CLOSING. Grade 9. Facilitator s Guide GAP CLOSING Grade 9 Facilitator s Guide Topic 3 Integers Diagnostic...5 Administer the diagnostic...5 Using diagnostic results to personalize interventions solutions... 5 Using Intervention Materials...8

More information

Chapter 2: Number Systems

Chapter 2: Number Systems Chapter 2: Number Systems Logic circuits are used to generate and transmit 1s and 0s to compute and convey information. This two-valued number system is called binary. As presented earlier, there are many

More information

University of Manitoba Open Programming Contest September 22, General Instructions:

University of Manitoba Open Programming Contest September 22, General Instructions: University of Manitoba Open Programming Contest September 22, 2012 General Instructions: 1. Submit solutions using the PC^2 software. 2. The questions are not listed in order of difficulty. Some questions

More information

XVIII Open Cup named after E.V. Pankratiev Stage 10, Grand Prix of Korea, Sunday, February 4, 2018

XVIII Open Cup named after E.V. Pankratiev Stage 10, Grand Prix of Korea, Sunday, February 4, 2018 Problem A. Donut file: XVIII Open Cup named after E.V. Pankratiev 3 seconds 1024 mebibytes In this problem, we will use Chebyshev distance on a Cartesian plane. The Chebyshev distance between two points

More information

A Bullseye. Problem. Output. For each dataset, print a line of the form: SCORE: N to M, PLAYER P WINS. Or: SCORE: N to M, TIE.

A Bullseye. Problem. Output. For each dataset, print a line of the form: SCORE: N to M, PLAYER P WINS. Or: SCORE: N to M, TIE. A Bullseye A simple dartboard consists of a flat, circular piece of cork with concentric rings drawn on it. Darts are thrown at the board by players in an attempt to hit the center of the dartboard (the

More information

We will be releasing HW1 today It is due in 2 weeks (1/25 at 23:59pm) The homework is long

We will be releasing HW1 today It is due in 2 weeks (1/25 at 23:59pm) The homework is long 1/21/18 Jure Leskovec, Stanford CS246: Mining Massive Datasets, http://cs246.stanford.edu 1 We will be releasing HW1 today It is due in 2 weeks (1/25 at 23:59pm) The homework is long Requires proving theorems

More information

Algebra 8 Final Exam Review Packet

Algebra 8 Final Exam Review Packet Algebra 8 Final Exam Review Packet Name: Period: Date: The final will be 20 multiple-choice questions. You will have one class period to complete it. You may use a non-graphing calculator. What you need

More information

14 Graph Theory. Exercise Set 14-1

14 Graph Theory. Exercise Set 14-1 14 Graph Theory Exercise Set 14-1 1. A graph in this chapter consists of vertices and edges. In previous chapters the term was used as a visual picture of a set of ordered pairs defined by a relation or

More information

LSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

LSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology LSN 4 Boolean Algebra & Logic Simplification Department of Engineering Technology LSN 4 Key Terms Variable: a symbol used to represent a logic quantity Compliment: the inverse of a variable Literal: a

More information

MATHEMATICS (SYLLABUS D) 4024/02

MATHEMATICS (SYLLABUS D) 4024/02 CAMBRIDGE INTERNATIONAL EXAMINATIONS General Certificate of Education Ordinary Level MATHEMATICS (SYLLABUS D) 4024/02 Paper 2 Additional Materials: Answer Booklet/Paper Electronic calculator Geometrical

More information

Specifying logic functions

Specifying logic functions CSE4: Components and Design Techniques for Digital Systems Specifying logic functions Instructor: Mohsen Imani Slides from: Prof.Tajana Simunic and Dr.Pietro Mercati We have seen various concepts: Last

More information

2009 Fall Startup Event Thursday, September 24th, 2009

2009 Fall Startup Event Thursday, September 24th, 2009 009 Fall Startup Event This test consists of 00 problems to be solved in 0 minutes. All answers must be exact, complete, and in simplest form. To ensure consistent grading, if you get a decimal, mixed

More information

Problem A. Ascent Sequences

Problem A. Ascent Sequences Problem A. Ascent Sequences file: file: Consider a sequence a 1, a 2,..., a n of non-negative integers. An ascent in the sequence is a pair of adjacent elements such that the element with greater index

More information

Lecture 3. Brute Force

Lecture 3. Brute Force Lecture 3 Brute Force 1 Lecture Contents 1. Selection Sort and Bubble Sort 2. Sequential Search and Brute-Force String Matching 3. Closest-Pair and Convex-Hull Problems by Brute Force 4. Exhaustive Search

More information

Unit 2A: Systems of Equations and Inequalities

Unit 2A: Systems of Equations and Inequalities Unit A: Systems of Equations and Inequalities In this unit, you will learn how to do the following: Learning Target #1: Creating and Solving Systems of Equations Identify the solution to a system from

More information

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014 Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate

More information

5-Minute Check Solve.

5-Minute Check Solve. 5-Minute Check (over Chapter 9) Use with Lesson 10-1 Solve. 1. There are 12 balls in a hat and 3 are red. What is the probability of drawing a red ball? 2. Use the Fundamental Counting Principle to find

More information

Number Systems CHAPTER Positional Number Systems

Number Systems CHAPTER Positional Number Systems CHAPTER 2 Number Systems Inside computers, information is encoded as patterns of bits because it is easy to construct electronic circuits that exhibit the two alternative states, 0 and 1. The meaning of

More information

EFFICIENT ATTACKS ON HOMOPHONIC SUBSTITUTION CIPHERS

EFFICIENT ATTACKS ON HOMOPHONIC SUBSTITUTION CIPHERS EFFICIENT ATTACKS ON HOMOPHONIC SUBSTITUTION CIPHERS A Project Report Presented to The faculty of the Department of Computer Science San Jose State University In Partial Fulfillment of the Requirements

More information

ACT Diagnostic Review #1

ACT Diagnostic Review #1 Name Date Score ACT Diagnostic Review #1 1. Gabe biked a total of kilometers over the course of his morning and afternoon bike rides. If he biked a distance of in the afternoon? kilometers in the morning,

More information

Pacific Northwest Region Programming Contest Division 1

Pacific Northwest Region Programming Contest Division 1 Pacific Northwest Region Programming Contest Division 1 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

Statistics: Interpreting Data and Making Predictions. Visual Displays of Data 1/31

Statistics: Interpreting Data and Making Predictions. Visual Displays of Data 1/31 Statistics: Interpreting Data and Making Predictions Visual Displays of Data 1/31 Last Time Last time we discussed central tendency; that is, notions of the middle of data. More specifically we discussed

More information

UAB MATH TALENT SEARCH

UAB MATH TALENT SEARCH NAME: GRADE: SCHOOL CODE: 2008-2009 UAB MATH TALENT SEARCH This is a two hour contest. Answers are to be written in the spaces provided on the test sheet. There will be no credit if the answer is incorrect.

More information

2. Line up the digits from 1 to 9 so that any two digit number made of two adjacent digits is divisible by either 7 or 13.

2. Line up the digits from 1 to 9 so that any two digit number made of two adjacent digits is divisible by either 7 or 13. Graphs Graphs. Part 1 In some situations it is convenient to use graphs. Objects are represented by dots while connections between them are represented by lines or arrows. In the language of graphs, dots

More information

Roberto Clemente Middle School

Roberto Clemente Middle School Roberto Clemente Middle School For Students Entering Investigations into Mathematics Name: Rename Fractions, Percents, and Decimals To convert fractions into decimals, we start with a fraction, such as,

More information

CS107, Lecture 3 Bits and Bytes; Bitwise Operators

CS107, Lecture 3 Bits and Bytes; Bitwise Operators CS107, Lecture 3 Bits and Bytes; Bitwise Operators reading: Bryant & O Hallaron, Ch. 2.1 This document is copyright (C) Stanford Computer Science and Nick Troccoli, licensed under Creative Commons Attribution

More information

GEOMETRY BASIC GEOMETRICAL IDEAS. 3) A point has no dimensions (length, breadth or thickness).

GEOMETRY BASIC GEOMETRICAL IDEAS. 3) A point has no dimensions (length, breadth or thickness). CLASS 6 - GEOMETRY BASIC GEOMETRICAL IDEAS Geo means Earth and metron means Measurement. POINT 1) The most basic shape in geometry is the Point. 2) A point determines a location. 3) A point has no dimensions

More information