BALDWIN WALLACE UNIVERSITY 2013 PROGRAMMING CONTEST

Size: px
Start display at page:

Download "BALDWIN WALLACE UNIVERSITY 2013 PROGRAMMING CONTEST"

Transcription

1 BALDWIN WALLACE UNIVERSITY 2013 PROGRAMMING CONTEST DO NOT OPEN UNTIL INSTRUCTED TO DO SO!

2 Mystery Message Marvin the Paranoid Android needs to send an encrypted message to Arthur Den. Marvin is absurdly smart and wants to use a super sophisticated rotation cipher. Unfortunately, the job of writing the program to encode the message is beneath him, so now it s your job. Messages will contain any combination of lower case letters a through z. There will be no spaces, punctuation or special characters. A rotation cipher works by replacing each character in the message with one that is a specified shift (i.e., number of characters) away from it in the alphabet. For example, if the shift is 3, then a is replaced by the character three positions later in the alphabet (i.e., d ). It is possible that the size of the shift would go beyond the end of the alphabet. In these cases, the shift wraps around to the beginning of the alphabet. For example, if the shift were 3 and the character to be replaced were y, y is replaced by b, which is three characters away (one at the end of the alphabet, then two from the start). Details of the input The first line of input will be an integer, n, indicating the number of cases to be tested. Each of the following n lines will contain an integer, s, the shift ( 0 < s < 1,000,000 ), followed by a single space, and then the message that you are to encode. Details of the output Each output line should begin with Case i: where i is the appropriate test case, followed by a single space, then the encrypted string. Sample input 2 3 abc 7 za Sample output Case 1: def Case 2: gh

3 Road Trip Road Trip The Smiths want to take a family trip down to IKEA. They live in Cleveland, OH, and the nearest IKEA is in Pittsburgh, PA, which is 140 miles away. Since gas is expensive, they want to make sure they are using the cheapest way possible to get there. They own 3 different cars: Car A gets 11 miles per gallon; Car B gets 25 miles per gallon; and Car C gets 35 miles per gallon. They also have an Uncle who owns a Prius that gets 49 miles per gallon. The uncle allows them to borrow his Prius, even when he is on the road for work, (since it just sits in some parking lot all day otherwise). However, if they want to borrow his Prius, they must first drive one of their cars from their home to his current location, use the Prius to get from that location to IKEA, drive the Prius back to the uncle, and then use their own car to get home. Your program is to determine what travel option is the most economical. Details of the input The first line of input will contain a single integer n which will represent the number of test cases to test. Each of the following n lines will contain three real numbers, c (the cost of a gallon of gas), f (the uncle s current distance from the family, in miles), and p (the uncle s current distance from IKEA, in miles), separated by a single space. Details of the output For each test case, output should begin with the line Case i: where i is the corresponding case number. That should be followed by a single space, and then the minimum roundtrip cost to get the Smith family from home, to IKEA, and back home again. The minimum cost should be truncated to two decimal places and preceded by a $. Sample input Sample output Case 1: $21.00 Case 2: $32.00

4 Football Frenzy Fred has been invited to a Football Party (American Football that is), but is afraid because he doesn t know very much about the sport. After a quick internet search, he felt a little more comfortable, and was somewhat intrigued by the various ways to score points. He hopes to impress the other partygoers by telling them how many different ways a team can get a certain score. He doesn t care about the order the points are received. As far as he is concerned, a touchdown followed by a field goal is the same as a field goal followed by a touchdown. Thus, for instance, there is only one way to get a score of 3 (a field goal), but two ways to get 7 (a field goal and two safeties, or a touchdown and an extra point). To help him avoid making a fool of himself at the party by miscalculating, you agree to write a program that determines the number of ways to attain a given total score. His research has uncovered the following information on ways to score points in a football game: Field goal: 3 points Safety: Touchdown: 2 points 6 points -- but, with each touchdown, there can be a kick for an extra point, a 2-point conversion, or neither - adding 1, 2, or 0 additional points respectively. A team can score any number of field goals, safeties, and touchdowns. However, extra points and 2- point conversions can only occur following a touchdown, and only one of them can be attempted after each touchdown. Details of the input The first line of input will contain a single integer, n, indicating the number of football scores. Each of the following n lines will contain an integer k (0 < k < 100), a football team score. Details of the output For each test case, output should begin with the line Case i: where i is the corresponding case number. That should be followed by a single space and the number of ways to get the given score. Sample input Sample output Case 1: 1 Case 2: 2 Case 3: 11 Case 4: 4 Case 5: 1

5 Beeblebrox s Picture Frames Zaphod Beeblebrox is so taken with himself that he has decided to display copies of his picture everywhere. To enhance the pictures and draw attention to the fact that he is a star (or at least believes he is), he wants each picture to be framed within a border of asterisks. However, given the number of pictures he d like to display, the chore of producing a border for each is more than he cares to do. Thus, he would like a program to automatically produce a border for each picture. Each of his pictures has equal width and length i.e., is square. The framed picture is to be of the same size as the original, with the border having a thickness of a specified size. That is, the border covers the outside edges of the picture leaving the room in the center (at least one space) to display Zaphod s image. If it is not possible to print a border of the given width within the given size while leaving space for his picture, the program should print BAD DIMENSIONS. Details of the Input The first line of input will be an integer, n, indicating the number of cases to be tested. Each of the following n lines will contain two integers, s and b, separated by a single space, where s indicates the dimension of the finished, bordered picture and b is the width of the border. Dimensions are given in terms of number of characters. Details of the Output For each test case, output should begin with the line Case i: where i is the corresponding case number. If a border is possible for that case, it should be printed, beginning on the next line; if not, BAD DIMENSIONS should be printed on the next line. Sample input Sample output Case 1: **** * * * * **** Case 2: BAD DIMENSIONS

6 Alien Chess You ve been taken hostage by aliens. However, they re relatively fair aliens. They have given you a chance to win your freedom by winning what they believe to be how the Earthlings play Chess. However, their version of Chess has a few key differences: 1. Every move must start with your Super Pawn taking a piece. 2. A Super Pawn behaves like the piece it just took. At the start of the game it acts as a pawn. 3. You may perform a combo by, after taking a piece with your Super Pawn, taking another piece with your Super Pawn. 4. You win by capturing the Enemy s Super Pawn. 5. The only piece on the board that belongs to you is your Super Pawn. The remaining pieces belong to your Enemy and include the Enemy s Super Pawn, regular pawns, rooks, bishops, and knights. 6. There can be any number of rooks, pawns, and knights, but only one Super Pawn and one Enemy Super Pawn. A pawn can only capture a piece by moving one space diagonally forward. Thus the pawn P can only take pieces in the spots marked with an X. Forward is always oriented in this direction for you X - X P A rook can capture any piece located directly above, below, or to either side of it as long as no other piece is between the rook and that piece. A bishop can capture any piece on the diagonals from itself as long as no other piece is between the bishop and that piece A knight can capture pieces in any of the 8 squares located by moving two squares horizontally and one square vertically, or two - - X - X squares vertically and one square horizontally. So a knight, marked - X X - - by K, can capture any piece in the spots marked with an X K NOTE: A knight jumps over any other piece between itself and its - X X - - target. In other words, it cannot be blocked. - - X - X

7 You are currently on the last possible move before the aliens get bored of the game and revoke their offer to free you. You are to determine whether or not your next move will free you. Details of the Input The first line is a single integer, n, denoting the number of games to be played. For each game, the board is described by 8 lines of 8 characters each. The only possible characters are: - an empty position S your Super Pawn, which is also your starting position E your enemy s Super Pawn, which is your ending position P a Pawn R a Rook B a Bishop K a Knight There will be one S and one E on each board. There will be one blank line separating one board description from the next. Details of the Output There should be one line of output for each of the n boards. Each output line should begin with Case i: where i is the corresponding case number. That should be followed by a single space, then either Yes if you can win, or No if you cannot win on our next turn. Sample Input E P P P P P P S Sample Output Case 1: Yes Case 2: No Case 3: Yes ----E--- --R---R- --R---R- -P S R--E ---K B S--

8 Prime Time Every non-prime number can be expressed as a product of two or more prime numbers. The process of doing so is called prime factorization. When a number is prime, its only factor is itself. For example, the number 1421 is not prime since it can be written as 7x7x29, whereas 5 is prime since it can only be written as 5. Your job will be to determine the unique prime factors for a given number and print them in descending order. Details of the Input The first line of input will contain a single integer, n, which indicates the number of test cases to consider. Each of the following n lines will contain a single positive integer y (1 < y ) whose prime factors you are to find. Details of the Output For each test case, output should begin with the line Case i: where i is the corresponding case number. That should be followed by a single space, then the given number s unique prime factors in descending order separated by a single space. Sample Input Sample Output Case 1: 2 Case 2: 29 7 Case 3: Case 4: 17

9 Where is My /water? Your boss, a.k.a. Lazy Larry, is always trying to find the simplest way to get every task done. For the past week, he has been complaining about how much effort it takes to move between file folders on his computer. So, he s made it your job to write him a utility program that will determine the least number of mouse clicks he should need to get from his current directory to another directory of interest. You realize that in the simplest case, a graphical representation of the directory structure would be a simple tree like that pictured above. Given two directory paths, e.g. C:/this/is/where/you/start/ and C:/where/is/my/water/, the problem could be solved by finding the longest partial path shared by the files (in this case C:/) and then counting the number of back clicks to that point from the starting folder (5) and forward clicks down to the destination (4) to get the total number required (9). But, Lazy Larry, being who he is, has complicated the problem by putting shortcuts within some directories that, if used, might make getting to the destination directory possible in fewer clicks. For example, if there is a shortcut [C:/this/is/] in the start folder, then it is shorter to take one click into the start folder, follow the shortcut (saving one click), and then proceeding as above for a total of 8 clicks. Details of the input Folder names will be complete paths starting from the root of the C:/ drive. That is, C:/s1/s2/ /sx/ where each of s1, s2,..., sx is the name of a subfolder. A subfolder name is a simple alphanumeric string (i.e., no special characters) followed by a slash (/). The final of these names, sx/, may be replaced by the name of a shortcut to another folder. A shortcut will appear as a complete path enclosed in square brackets. That is, [C:/s1/s2/ /sx/]. Shortcuts may not contain other shortcuts. Input to the program will be as follows: The first line is a single integer, n, which specifies the number of folder paths that follow. Each of the next n lines will contain a single string, p, which specifies a path to a folder or shortcut. The next line is a single integer, m, which specifies the number of test cases that will follow. Each of the next m lines will contain a single string, d, which specifies a starting folder. There will be no input for the destination folder of each case. It is defined to be C:/where/is/my/water/.

10 Details of the output For each test case, output should begin with the line Case i: where i is the corresponding case number. That should be followed by a single space and the minimum number of clicks for that case. Sample input 11 C:/ C:/where/ C:/where /is/ C:/where/is/my/ C:/where/is/my/water/ C:/this/ C:/this/is/ C:/this/is/where/ C:/this/is/where/you/ C:/this/is/where/you/start/ C:/this/is/where/you/start/[C:/this/is/] 2 C:/this/ C:/where/is/my/water/ Sample output Case 1: 5 Case 2: 0

YourTurnMyTurn.com: chess rules. Jan Willem Schoonhoven Copyright 2018 YourTurnMyTurn.com

YourTurnMyTurn.com: chess rules. Jan Willem Schoonhoven Copyright 2018 YourTurnMyTurn.com YourTurnMyTurn.com: chess rules Jan Willem Schoonhoven Copyright 2018 YourTurnMyTurn.com Inhoud Chess rules...1 The object of chess...1 The board...1 Moves...1 Captures...1 Movement of the different pieces...2

More information

If a pawn is still on its original square, it can move two squares or one square ahead. Pawn Movement

If a pawn is still on its original square, it can move two squares or one square ahead. Pawn Movement Chess Basics Pawn Review If a pawn is still on its original square, it can move two squares or one square ahead. Pawn Movement If any piece is in the square in front of the pawn, then it can t move forward

More information

Westminster College 2012 High School Programming Contest. October 8, 2012

Westminster College 2012 High School Programming Contest. October 8, 2012 Westminster College 01 High School Programming Contest October, 01 Rules: 1. There are six questions to be completed in two and 1/ hours.. All questions require you to read the test data from standard

More information

A1 Problem Statement Unit Pricing

A1 Problem Statement Unit Pricing A1 Problem Statement Unit Pricing Given up to 10 items (weight in ounces and cost in dollars) determine which one by order (e.g. third) is the cheapest item in terms of cost per ounce. Also output the

More information

Problem A. Ancient Keyboard

Problem A. Ancient Keyboard 3th ACM International Collegiate Programming Contest, 5 6 Asia Region, Tehran Site Sharif University of Technology 1 Dec. 5 Sponsored by Problem A. Ancient Keyboard file: Program file: A.IN A.cpp/A.c/A.dpr/A.java

More information

Movement of the pieces

Movement of the pieces Movement of the pieces Rook The rook moves in a straight line, horizontally or vertically. The rook may not jump over other pieces, that is: all squares between the square where the rook starts its move

More information

Structured Programming Using Procedural Languages INSS Spring 2018

Structured Programming Using Procedural Languages INSS Spring 2018 Structured Programming Using Procedural Languages INSS 225.101 - Spring 2018 Project #3 (Individual) For your third project, you are going to write a program like what you did for Project 2. You are going

More information

Irish Collegiate Programming Contest Problem Set

Irish Collegiate Programming Contest Problem Set Irish Collegiate Programming Contest 2011 Problem Set University College Cork ACM Student Chapter March 26, 2011 Contents Instructions 2 Rules........................................... 2 Testing and Scoring....................................

More information

The Basic Rules of Chess

The Basic Rules of Chess Introduction The Basic Rules of Chess One of the questions parents of young children frequently ask Chess coaches is: How old does my child have to be to learn chess? I have personally taught over 500

More information

Chess Puzzle Mate in N-Moves Solver with Branch and Bound Algorithm

Chess Puzzle Mate in N-Moves Solver with Branch and Bound Algorithm Chess Puzzle Mate in N-Moves Solver with Branch and Bound Algorithm Ryan Ignatius Hadiwijaya / 13511070 Program Studi Teknik Informatika Sekolah Teknik Elektro dan Informatika Institut Teknologi Bandung,

More information

Welcome to the Brain Games Chess Help File.

Welcome to the Brain Games Chess Help File. HELP FILE Welcome to the Brain Games Chess Help File. Chess a competitive strategy game dating back to the 15 th century helps to developer strategic thinking skills, memorization, and visualization of

More information

a b c d e f g h i j k l m n

a b c d e f g h i j k l m n Shoebox, page 1 In his book Chess Variants & Games, A. V. Murali suggests playing chess on the exterior surface of a cube. This playing surface has intriguing properties: We can think of it as three interlocked

More information

Carnegie Mellon University. Invitational Programming Competition. Eight Problems

Carnegie Mellon University. Invitational Programming Competition. Eight Problems Carnegie Mellon University Invitational Programming Competition Eight Problems March, 007 You can program in C, C++, or Java; note that the judges will re-compile your programs before testing. Your programs

More information

Chess Handbook: Course One

Chess Handbook: Course One Chess Handbook: Course One 2012 Vision Academy All Rights Reserved No Reproduction Without Permission WELCOME! Welcome to The Vision Academy! We are pleased to help you learn Chess, one of the world s

More information

All games have an opening. Most games have a middle game. Some games have an ending.

All games have an opening. Most games have a middle game. Some games have an ending. Chess Openings INTRODUCTION A game of chess has three parts. 1. The OPENING: the start of the game when you decide where to put your pieces 2. The MIDDLE GAME: what happens once you ve got your pieces

More information

Intermediate Mathematics League of Eastern Massachusetts

Intermediate Mathematics League of Eastern Massachusetts Meet #5 March 2006 Intermediate Mathematics League of Eastern Massachusetts Meet #5 March 2006 Category 1 Mystery You may use a calculator today. 1. The combined cost of a movie ticket and popcorn is $8.00.

More information

Monday, February 2, Is assigned today. Answers due by noon on Monday, February 9, 2015.

Monday, February 2, Is assigned today. Answers due by noon on Monday, February 9, 2015. Monday, February 2, 2015 Topics for today Homework #1 Encoding checkers and chess positions Constructing variable-length codes Huffman codes Homework #1 Is assigned today. Answers due by noon on Monday,

More information

Google DeepMind s AlphaGo vs. world Go champion Lee Sedol

Google DeepMind s AlphaGo vs. world Go champion Lee Sedol Google DeepMind s AlphaGo vs. world Go champion Lee Sedol Review of Nature paper: Mastering the game of Go with Deep Neural Networks & Tree Search Tapani Raiko Thanks to Antti Tarvainen for some slides

More information

Wednesday, February 1, 2017

Wednesday, February 1, 2017 Wednesday, February 1, 2017 Topics for today Encoding game positions Constructing variable-length codes Huffman codes Encoding Game positions Some programs that play two-player games (e.g., tic-tac-toe,

More information

Chapter 1: Positional Play

Chapter 1: Positional Play Chapter 1: Positional Play Positional play is the Bogey-man of many chess players, who feel that it is beyond their understanding. However, this subject isn t really hard to grasp if you break it down.

More information

Unit. The double attack. Types of double attack. With which pieces? Notes and observations

Unit. The double attack. Types of double attack. With which pieces? Notes and observations Unit The double attack Types of double attack With which pieces? Notes and observations Think Colour in the drawing with the colours of your choice. These types of drawings are called mandalas. They are

More information

After learning the Rules, What should beginners learn next?

After learning the Rules, What should beginners learn next? After learning the Rules, What should beginners learn next? Chess Puzzling Presentation Nancy Randolph Capital Conference June 21, 2016 Name Introduction to Chess Test 1. How many squares does a chess

More information

Problem C The Stern-Brocot Number System Input: standard input Output: standard output

Problem C The Stern-Brocot Number System Input: standard input Output: standard output Problem C The Stern-Brocot Number System Input: standard input Output: standard output The Stern-Brocot tree is a beautiful way for constructing the set of all nonnegative fractions m / n where m and n

More information

THROUGH THE LOOKING GLASS CHESS

THROUGH THE LOOKING GLASS CHESS THROUGH THE LOOKING GLASS CHESS Camille Arnett Granger, Indiana Through the Looking Glass Project Explanation For this project I wanted to do a variation on the traditional game of chess that reflects

More information

Suggested by Joshua L. Mask. Written by Ken Mask, MD. Illustrated by Simmie Williams

Suggested by Joshua L. Mask. Written by Ken Mask, MD. Illustrated by Simmie Williams Suggested by Joshua L. Mask Written by Ken Mask, MD Illustrated by Simmie Williams This is a very important book for kids from an impressively creative young thinker. Wynton Marsalis Suggested by: Joshua

More information

Universidad Católica del Maule

Universidad Católica del Maule Universidad Católica del Maule Departamento de Computación e Informática Primer Campeonato Interno Programación ACM Octubre 2006 Problem A: Financial Management Problem A: Financial Management Larry graduated

More information

OCTAGON 5 IN 1 GAME SET

OCTAGON 5 IN 1 GAME SET OCTAGON 5 IN 1 GAME SET CHESS, CHECKERS, BACKGAMMON, DOMINOES AND POKER DICE Replacement Parts Order direct at or call our Customer Service department at (800) 225-7593 8 am to 4:30 pm Central Standard

More information

GCPC

GCPC GCPC 2013 15.06.2013 The Problem Set No A B C D E F G H I J K Title Boggle Booking Chess Kastenlauf No Trees But Flowers Peg Solitaire Ringworld The King of the North Ticket Draw Timing Triangles Good

More information

A Simple Pawn End Game

A Simple Pawn End Game A Simple Pawn End Game This shows how to promote a knight-pawn when the defending king is in the corner near the queening square The introduction is for beginners; the rest may be useful to intermediate

More information

UCF Local Contest August 31, 2013

UCF Local Contest August 31, 2013 Circles Inside a Square filename: circle You have 8 circles of equal size and you want to pack them inside a square. You want to minimize the size of the square. The following figure illustrates the minimum

More information

arxiv: v2 [cs.ai] 15 Jul 2016

arxiv: v2 [cs.ai] 15 Jul 2016 SIMPLIFIED BOARDGAMES JAKUB KOWALSKI, JAKUB SUTOWICZ, AND MAREK SZYKUŁA arxiv:1606.02645v2 [cs.ai] 15 Jul 2016 Abstract. We formalize Simplified Boardgames language, which describes a subclass of arbitrary

More information

Seventeenth Annual University of Oregon Eugene Luks Programming Competition

Seventeenth Annual University of Oregon Eugene Luks Programming Competition Seventeenth Annual University of Oregon Eugene Luks Programming Competition Saturday, April 13, 2013 Problem Contributors Jim Allen David Atkins Gene Luks Chris Wilson Food and prizes provided by Pipeworks

More information

Philadelphia Classic 2013 Hosted by the Dining Philosophers University of Pennsylvania

Philadelphia Classic 2013 Hosted by the Dining Philosophers University of Pennsylvania Philadelphia Classic 2013 Hosted by the Dining Philosophers University of Pennsylvania Basic rules: 4 hours, 9 problems, 1 computer per team You can only use the internet for accessing the Javadocs, and

More information

CSC Curriculum Term One Lesson Plans

CSC Curriculum Term One Lesson Plans CSC Curriculum Term One Lesson Plans Core Lesson 1: The Pawn Move Learning Objectives To learn about the chess board, and how pawns move and capture. To play a game in which you win by getting a pawn to

More information

BAPC The Problem Set

BAPC The Problem Set BAPC 2012 The 2012 Benelux Algorithm Programming Contest The Problem Set A B C D E F G H I J Another Dice Game Black Out Chess Competition Digit Sum Encoded Message Fire Good Coalition Hot Dogs in Manhattan

More information

The 2013 British Informatics Olympiad

The 2013 British Informatics Olympiad Sponsored by Time allowed: 3 hours The 2013 British Informatics Olympiad Instructions You should write a program for part (a) of each question, and produce written answers to the remaining parts. Programs

More information

Surreal Numbers and Games. February 2010

Surreal Numbers and Games. February 2010 Surreal Numbers and Games February 2010 1 Last week we began looking at doing arithmetic with impartial games using their Sprague-Grundy values. Today we ll look at an alternative way to represent games

More information

A few chessboards pieces: 2 for each student, to play the role of knights.

A few chessboards pieces: 2 for each student, to play the role of knights. Parity Party Returns, Starting mod 2 games Resources A few sets of dominoes only for the break time! A few chessboards pieces: 2 for each student, to play the role of knights. Small coins, 16 per group

More information

PHOTOSHOP PUZZLE EFFECT

PHOTOSHOP PUZZLE EFFECT PHOTOSHOP PUZZLE EFFECT In this Photoshop tutorial, we re going to look at how to easily create a puzzle effect, allowing us to turn any photo into a jigsaw puzzle! Or at least, we ll be creating the illusion

More information

2014 ACM ICPC Southeast USA Regional Programming Contest. 15 November, Division 1

2014 ACM ICPC Southeast USA Regional Programming Contest. 15 November, Division 1 2014 ACM ICPC Southeast USA Regional Programming Contest 15 November, 2014 Division 1 A: Alchemy... 1 B: Stained Carpet... 3 C: Containment... 4 D: Gold Leaf... 5 E: Hill Number... 7 F: Knights... 8 G:

More information

2 Textual Input Language. 1.1 Notation. Project #2 2

2 Textual Input Language. 1.1 Notation. Project #2 2 CS61B, Fall 2015 Project #2: Lines of Action P. N. Hilfinger Due: Tuesday, 17 November 2015 at 2400 1 Background and Rules Lines of Action is a board game invented by Claude Soucie. It is played on a checkerboard

More information

GameSalad Basics. by J. Matthew Griffis

GameSalad Basics. by J. Matthew Griffis GameSalad Basics by J. Matthew Griffis [Click here to jump to Tips and Tricks!] General usage and terminology When we first open GameSalad we see something like this: Templates: GameSalad includes templates

More information

DELUXE 3 IN 1 GAME SET

DELUXE 3 IN 1 GAME SET Chess, Checkers and Backgammon August 2012 UPC Code 7-19265-51276-9 HOW TO PLAY CHESS Chess Includes: 16 Dark Chess Pieces 16 Light Chess Pieces Board Start Up Chess is a game played by two players. One

More information

CS61B, Fall 2014 Project #2: Jumping Cubes(version 3) P. N. Hilfinger

CS61B, Fall 2014 Project #2: Jumping Cubes(version 3) P. N. Hilfinger CSB, Fall 0 Project #: Jumping Cubes(version ) P. N. Hilfinger Due: Tuesday, 8 November 0 Background The KJumpingCube game is a simple two-person board game. It is a pure strategy game, involving no element

More information

Caltech Harvey Mudd Mathematics Competition February 20, 2010

Caltech Harvey Mudd Mathematics Competition February 20, 2010 Mixer Round Solutions Caltech Harvey Mudd Mathematics Competition February 0, 00. (Ying-Ying Tran) Compute x such that 009 00 x (mod 0) and 0 x < 0. Solution: We can chec that 0 is prime. By Fermat s Little

More information

In this chapter, I give you a review of basic math, and I do mean basic. I bet you know a lot

In this chapter, I give you a review of basic math, and I do mean basic. I bet you know a lot Chapter 1 We ve Got Your Numbers In This Chapter Understanding how place value turns digits into numbers Rounding numbers to the nearest ten, hundred, or thousand Calculating with the Big Four operations

More information

Figure 1: The Game of Fifteen

Figure 1: The Game of Fifteen 1 FIFTEEN One player has five pennies, the other five dimes. Players alternately cover a number from 1 to 9. You win by covering three numbers somewhere whose sum is 15 (see Figure 1). 1 2 3 4 5 7 8 9

More information

Adversarial Search. CMPSCI 383 September 29, 2011

Adversarial Search. CMPSCI 383 September 29, 2011 Adversarial Search CMPSCI 383 September 29, 2011 1 Why are games interesting to AI? Simple to represent and reason about Must consider the moves of an adversary Time constraints Russell & Norvig say: Games,

More information

THE BACKGROUND ERASER TOOL

THE BACKGROUND ERASER TOOL THE BACKGROUND ERASER TOOL In this Photoshop tutorial, we look at the Background Eraser Tool and how we can use it to easily remove background areas of an image. The Background Eraser is especially useful

More information

The 2012 ACM-ICPC Asia Regional Contest Chengdu Site

The 2012 ACM-ICPC Asia Regional Contest Chengdu Site The 2012 ACM-ICPC Asia Regional Contest Chengdu Site sponsored by IBM & Huawei hosted by Chengdu Neusoft University Chengdu, China November 11, 2012 This problem set should contain eleven (11) problems

More information

Chess Rules- The Ultimate Guide for Beginners

Chess Rules- The Ultimate Guide for Beginners Chess Rules- The Ultimate Guide for Beginners By GM Igor Smirnov A PUBLICATION OF ABOUT THE AUTHOR Grandmaster Igor Smirnov Igor Smirnov is a chess Grandmaster, coach, and holder of a Master s degree in

More information

Problem A Budget Travel

Problem A Budget Travel Problem A Budget Travel An American travel agency is sometimes asked to estimate the minimum cost of traveling from one city to another by automobile. The travel agency maintains lists of many of the gasoline

More information

The game of Paco Ŝako

The game of Paco Ŝako The game of Paco Ŝako Created to be an expression of peace, friendship and collaboration, Paco Ŝako is a new and dynamic chess game, with a mindful touch, and a mind-blowing gameplay. Two players sitting

More information

2013 ACM ICPC Southeast USA Regional Programming Contest. 2 November, Division 1

2013 ACM ICPC Southeast USA Regional Programming Contest. 2 November, Division 1 213 ACM ICPC Southeast USA Regional Programming Contest 2 November, 213 Division 1 A: Beautiful Mountains... 1 B: Nested Palindromes... 3 C: Ping!... 5 D: Electric Car Rally... 6 E: Skyscrapers... 8 F:

More information

More Actions: A Galaxy of Possibilities

More Actions: A Galaxy of Possibilities CHAPTER 3 More Actions: A Galaxy of Possibilities We hope you enjoyed making Evil Clutches and that it gave you a sense of how easy Game Maker is to use. However, you can achieve so much with a bit more

More information

C SC 483 Chess and AI: Computation and Cognition. Lecture 3 September 10th

C SC 483 Chess and AI: Computation and Cognition. Lecture 3 September 10th C SC 483 Chess and AI: Computation and Cognition Lecture 3 September th Programming Project A series of tasks There are lots of resources and open source code available for chess Please don t simply copy

More information

Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning

Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CSCE 315 Programming Studio Fall 2017 Project 2, Lecture 2 Adapted from slides of Yoonsuck Choe, John Keyser Two-Person Perfect Information Deterministic

More information

CPSC 217 Assignment 3

CPSC 217 Assignment 3 CPSC 217 Assignment 3 Due: Friday November 24, 2017 at 11:55pm Weight: 7% Sample Solution Length: Less than 100 lines, including blank lines and some comments (not including the provided code) Individual

More information

2004 Denison Spring Programming Contest 1

2004 Denison Spring Programming Contest 1 24 Denison Spring Programming Contest 1 Problem : 4 Square It s been known for over 2 years that every positive integer can be written in the form x 2 + y 2 + z 2 + w 2, for x,y,z,w non-negative integers.

More information

Official Problem Set 2017 ACM/ICPC. The 2017 ACM-ICPC Asia Kabul Regional Contest

Official Problem Set 2017 ACM/ICPC. The 2017 ACM-ICPC Asia Kabul Regional Contest Official Problem Set 207 ACM/ICPC The 207 ACM-ICPC Asia Kabul Regional Contest A. Sum of Numbers Razaia and Alireza are school students. They have a homework to add two integer numbers. Your task is to

More information

Chess and Python revisited

Chess and Python revisited Chess and Python revisited slide 1 there exists a PyGame project http://www.pygame.org/ project-chessboard-282-.html which draws a chess board and allows users to make FIDE legal moves (by clicking on

More information

CSE 573 Problem Set 1. Answers on 10/17/08

CSE 573 Problem Set 1. Answers on 10/17/08 CSE 573 Problem Set. Answers on 0/7/08 Please work on this problem set individually. (Subsequent problem sets may allow group discussion. If any problem doesn t contain enough information for you to answer

More information

FOR THE CROWN Sample Play

FOR THE CROWN Sample Play FOR THE CROWN Sample Play v1.0 1 Turn 1 Yellow player FOR THE CROWN Sample Play To begin the game, Yellow player Draws 2 Peons and 3 Guards into his Hand. Order Phase: For his first Order Phase, he cannot

More information

Basic SHOGI Rules. By Djuro Emedji. The author of Shogi program GShogi available at

Basic SHOGI Rules. By Djuro Emedji. The author of Shogi program GShogi available at Basic SHOGI Rules By Djuro Emedji The author of Shogi program GShogi available at www.shogimaster.com Copyright Notice: 2007 Djuro Emedji This text is copyrighted by the author and can not be reproduced

More information

Royal Battles. A Tactical Game using playing cards and chess pieces. by Jeff Moore

Royal Battles. A Tactical Game using playing cards and chess pieces. by Jeff Moore Royal Battles A Tactical Game using playing cards and chess pieces by Jeff Moore Royal Battles is Copyright (C) 2006, 2007 by Jeff Moore all rights reserved. Images on the cover are taken from an antique

More information

PRIME FACTORISATION Lesson 1: Factor Strings

PRIME FACTORISATION Lesson 1: Factor Strings PRIME FACTORISATION Lesson 1: Factor Strings Australian Curriculum: Mathematics Year 7 ACMNA149: Investigate index notation and represent whole numbers as products of powers of prime numbers. Applying

More information

MA 111, Topic 2: Cryptography

MA 111, Topic 2: Cryptography MA 111, Topic 2: Cryptography Our next topic is something called Cryptography, the mathematics of making and breaking Codes! In the most general sense, Cryptography is the mathematical ideas behind changing

More information

The Pieces Lesson. In your chess set there are six different types of piece.

The Pieces Lesson. In your chess set there are six different types of piece. In your chess set there are six different types of piece. In this lesson you'll learn their names and where they go at the start of the game. If you happen to have a chess set there it will help you to

More information

Welcome to Family Dominoes!

Welcome to Family Dominoes! Welcome to Family Dominoes!!Family Dominoes from Play Someone gets the whole family playing everybody s favorite game! We designed it especially for the ipad to be fun, realistic, and easy to play. It

More information

1 Running the Program

1 Running the Program GNUbik Copyright c 1998,2003 John Darrington 2004 John Darrington, Dale Mellor Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission

More information

Essential Chess Basics (Updated Version) provided by Chessolutions.com

Essential Chess Basics (Updated Version) provided by Chessolutions.com Essential Chess Basics (Updated Version) provided by Chessolutions.com 1. Moving Pieces In a game of chess white has the first move and black moves second. Afterwards the players take turns moving. They

More information

The Grandmaster s Positional Understanding Lesson 1: Positional Understanding

The Grandmaster s Positional Understanding Lesson 1: Positional Understanding The Grandmaster s Positional Understanding Lesson 1: Positional Understanding Hi there! I am very glad to talk to you again. It s me Igor Smirnov, International Grandmaster and chess coach, and I m back

More information

Twenty-fourth Annual UNC Math Contest Final Round Solutions Jan 2016 [(3!)!] 4

Twenty-fourth Annual UNC Math Contest Final Round Solutions Jan 2016 [(3!)!] 4 Twenty-fourth Annual UNC Math Contest Final Round Solutions Jan 206 Rules: Three hours; no electronic devices. The positive integers are, 2, 3, 4,.... Pythagorean Triplet The sum of the lengths of the

More information

Keeping secrets secret

Keeping secrets secret Keeping s One of the most important concerns with using modern technology is how to keep your s. For instance, you wouldn t want anyone to intercept your emails and read them or to listen to your mobile

More information

GEO/EVS 425/525 Unit 2 Composing a Map in Final Form

GEO/EVS 425/525 Unit 2 Composing a Map in Final Form GEO/EVS 425/525 Unit 2 Composing a Map in Final Form The Map Composer is the main mechanism by which the final drafts of images are sent to the printer. Its use requires that images be readable within

More information

Problem A Rearranging a Sequence

Problem A Rearranging a Sequence Problem A Rearranging a Sequence Input: Standard Input Time Limit: seconds You are given an ordered sequence of integers, (,,,...,n). Then, a number of requests will be given. Each request specifies an

More information

More Challenges These challenges should only be attempted after difficulty challenges have been successfully completed in all the required objectives.

More Challenges These challenges should only be attempted after difficulty challenges have been successfully completed in all the required objectives. More Challenges These challenges should only be attempted after difficulty challenges have been successfully completed in all the required objectives. Word extractor challenge Requires knowledge of objectives

More information

UNC Charlotte 2012 Comprehensive

UNC Charlotte 2012 Comprehensive March 5, 2012 1. In the English alphabet of capital letters, there are 15 stick letters which contain no curved lines, and 11 round letters which contain at least some curved segment. How many different

More information

Problem A To and Fro (Problem appeared in the 2004/2005 Regional Competition in North America East Central.)

Problem A To and Fro (Problem appeared in the 2004/2005 Regional Competition in North America East Central.) Problem A To and Fro (Problem appeared in the 2004/2005 Regional Competition in North America East Central.) Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number

More information

6th Grade Fraction & Decimal Computation

6th Grade Fraction & Decimal Computation Slide 1 / 215 Slide 2 / 215 6th Grade Fraction & Decimal Computation 2015-10-20 www.njctl.org Slide 3 / 215 Fraction and Decimal Computation Fraction Division Long Division Review Adding Decimals Subtracting

More information

Printing: You may print to the printer at any time during the test.

Printing: You may print to the printer at any time during the test. UW Madison's 2006 ACM-ICPC Individual Placement Test October 1, 12:00-5:00pm, 1350 CS Overview: This test consists of seven problems, which will be referred to by the following names (respective of order):

More information

OPENING IDEA 3: THE KNIGHT AND BISHOP ATTACK

OPENING IDEA 3: THE KNIGHT AND BISHOP ATTACK OPENING IDEA 3: THE KNIGHT AND BISHOP ATTACK If you play your knight to f3 and your bishop to c4 at the start of the game you ll often have the chance to go for a quick attack on f7 by moving your knight

More information

6th Grade. Slide 1 / 216. Slide 2 / 216. Slide 3 / 216. Fraction & Decimal Computation. Fraction and Decimal Computation

6th Grade. Slide 1 / 216. Slide 2 / 216. Slide 3 / 216. Fraction & Decimal Computation. Fraction and Decimal Computation Slide / 6 Slide / 6 6th Grade Fraction & Decimal Computation 05-09-4 www.njctl.org Fraction and Decimal Computation Slide 3 / 6 Fraction Division Long Division Review Adding Decimals Subtracting Decimals

More information

ProCo 2017 Advanced Division Round 1

ProCo 2017 Advanced Division Round 1 ProCo 2017 Advanced Division Round 1 Problem A. Traveling file: 256 megabytes Moana wants to travel from Motunui to Lalotai. To do this she has to cross a narrow channel filled with rocks. The channel

More information

June 2018 ACBL Bulletin Notes Jeff Kroll Sam Khayatt

June 2018 ACBL Bulletin Notes Jeff Kroll Sam Khayatt June 2018 ACBL Bulletin Notes Jeff Kroll Sam Khayatt Page 33, Jones Column 2 explains Reverse Drury in full. Rebidding your major shows you opened light. Rebid 2D with an average opener; jump to 4S with

More information

CS 480: GAME AI DECISION MAKING AND SCRIPTING

CS 480: GAME AI DECISION MAKING AND SCRIPTING CS 480: GAME AI DECISION MAKING AND SCRIPTING 4/24/2012 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2012/cs480/intro.html Reminders Check BBVista site for the course

More information

2005 East Central Regional Contest 1

2005 East Central Regional Contest 1 2005 East Central Regional Contest 1 Problem A: ACM (ACronym Maker) The sadists who design problems for ACM programming contests often like to include the abbreviation ACM somewhere in their problem descriptions.

More information

Oddities Problem ID: oddities

Oddities Problem ID: oddities Oddities Problem ID: oddities Some numbers are just, well, odd. For example, the number 3 is odd, because it is not a multiple of two. Numbers that are a multiple of two are not odd, they are even. More

More information

2D Platform. Table of Contents

2D Platform. Table of Contents 2D Platform Table of Contents 1. Making the Main Character 2. Making the Main Character Move 3. Making a Platform 4. Making a Room 5. Making the Main Character Jump 6. Making a Chaser 7. Setting Lives

More information

Rules of the game. chess checkers tic-tac-toe...

Rules of the game. chess checkers tic-tac-toe... Course 9 Games Rules of the game Two players: MAX and MIN Both have as goal to win the game Only one can win or else it will be a draw In the initial modeling there is no chance (but it can be simulated)

More information

CSE 100: RED-BLACK TREES

CSE 100: RED-BLACK TREES 1 CSE 100: RED-BLACK TREES 2 Red-Black Trees 1 70 10 20 60 8 6 80 90 40 1. Nodes are either red or black 2. Root is always black 3. If a node is red, all it s children must be black 4. For every node X,

More information

Meet #3 January Intermediate Mathematics League of Eastern Massachusetts

Meet #3 January Intermediate Mathematics League of Eastern Massachusetts Meet #3 January 2008 Intermediate Mathematics League of Eastern Massachusetts Meet #3 January 2008 Category 1 Mystery 1. Mike was reading a book when the phone rang. He didn't have a bookmark, so he just

More information

Buzz Contest Rules and Keywords

Buzz Contest Rules and Keywords Buzz Contest Rules and Keywords 1 Introduction Contestants take turns in rotation. The group of contestants is counting out loud, starting with 1, each person saying the next number when it comes his turn.

More information

Error-Correcting Codes

Error-Correcting Codes Error-Correcting Codes Information is stored and exchanged in the form of streams of characters from some alphabet. An alphabet is a finite set of symbols, such as the lower-case Roman alphabet {a,b,c,,z}.

More information

CSE 21 Practice Final Exam Winter 2016

CSE 21 Practice Final Exam Winter 2016 CSE 21 Practice Final Exam Winter 2016 1. Sorting and Searching. Give the number of comparisons that will be performed by each sorting algorithm if the input list of length n happens to be of the form

More information

Problem Set Trinity University ACM High School Programming Competition April 5th, 2008

Problem Set Trinity University ACM High School Programming Competition April 5th, 2008 Problem Set Trinity University ACM High School Programming Competition April 5 th, 008 Problem 0 - The Evil Doctor Plays Chess An evil doctor has kidnapped all the queens in all the nearby kingdoms. Since

More information

4th Pui Ching Invitational Mathematics Competition. Final Event (Secondary 1)

4th Pui Ching Invitational Mathematics Competition. Final Event (Secondary 1) 4th Pui Ching Invitational Mathematics Competition Final Event (Secondary 1) 2 Time allowed: 2 hours Instructions to Contestants: 1. 100 This paper is divided into Section A and Section B. The total score

More information

Tutorial: A scrolling shooter

Tutorial: A scrolling shooter Tutorial: A scrolling shooter Copyright 2003-2004, Mark Overmars Last changed: September 2, 2004 Uses: version 6.0, advanced mode Level: Beginner Scrolling shooters are a very popular type of arcade action

More information

G54GAM Lab Session 1

G54GAM Lab Session 1 G54GAM Lab Session 1 The aim of this session is to introduce the basic functionality of Game Maker and to create a very simple platform game (think Mario / Donkey Kong etc). This document will walk you

More information

Ask a Scientist Pi Day Puzzle Party Ask a Scientist Pi Day Puzzle Party Ask a Scientist Pi Day Puzzle Party 3.

Ask a Scientist Pi Day Puzzle Party Ask a Scientist Pi Day Puzzle Party Ask a Scientist Pi Day Puzzle Party 3. 1. CHOCOLATE BARS Consider a chocolate bar that s a 3x6 grid of yummy squares. One of the squares in the corner of the bar has an X on it. With this chocolate bar, two people can play a game called Eat

More information