Problem ID: coolestskiroute

Similar documents
German Collegiate Programming Contest 2018 June 16th. Problems

Game Mechanics Minesweeper is a game in which the player must correctly deduce the positions of

The 2016 ACM-ICPC Asia China-Final Contest Problems

game design - shem phillips illustration - mihajlo dimitrievski graphic design & layouts - shem phillips copyright 2016 garphill games

Buzz Contest Rules and Keywords

Two Parity Puzzles Related to Generalized Space-Filling Peano Curve Constructions and Some Beautiful Silk Scarves

ACM ICPC World Finals Warmup 2 At UVa Online Judge. 7 th May 2011 You get 14 Pages 10 Problems & 300 Minutes

How hard are computer games? Graham Cormode, DIMACS

MAT points Impact on Course Grade: approximately 10%

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

Introduction. Contents

Game Setup. Player Boards: Give a player board and 5 player tokens for each player.

Analyzing Games: Solutions

An Idea for a Project A Universe for the Evolution of Consciousness

Game Overview 2 Setting 3 Story 3 Main Objective 3. Game Components 3. Rules 4 Game Setup 4 Turn Sequence 5 General Rules 9 End Game Conditions 9

Scenarios will NOT be announced beforehand. Any scenario from the Clash of Kings 2018 book as well as CUSTOM SCENARIOS is fair game.

Mobile Legends Bang Bang Diamonds Hacks and Strategy $97 Underground Diamonds Hacks

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

Dungeon Cards. The Catacombs by Jamie Woodhead

Kenken For Teachers. Tom Davis January 8, Abstract

THE RULES 1 Copyright Summon Entertainment 2016

Combinatorics: The Fine Art of Counting

Probability and Randomness. Day 1

Sentinel tactics: skirmishes

Of Dungeons Deep! Table of Contents. (1) Components (2) Setup (3) Goal. (4) Game Play (5) The Dungeon (6) Ending & Scoring

Comprehensive Rules Document v1.1

Sequential Dynamical System Game of Life

Monte Carlo based battleship agent

Matt s Bike Lock D + D + D = F B / H = K H + H = B D H = CK G + B + E = F + A + C A H = KE J + A = CC J / D = K F D = KG D / J = H / B

PITCHED BATTLE WARHAMMER CHAMPIONSHIP SCENARIO

2003 Hasbro. All rights reserved. Distributed in the United Kingdom by Hasbro UK Ltd., Caswell Way, Newport, Gwent NP9 0YH. Distributed in the U.S.A.

Background: Components:

Expected Value, continued

Sec 5.1 The Basics of Counting

I.M.O. Winter Training Camp 2008: Invariants and Monovariants

WARHAMMER LEGENDARY BATTLES

Lightseekers Trading Card Game Rules

Southeastern European Regional Programming Contest Bucharest, Romania Vinnytsya, Ukraine October 21, Problem A Concerts

Q i e v e 1 N,Q 5000

Notes about the Kickstarter Print and Play: Components List (Core Game)

OFFICIAL RULEBOOK Version 7.2

ProCo 2017 Advanced Division Round 1

CS 32 Puzzles, Games & Algorithms Fall 2013

Math 4610, Problems to be Worked in Class

QUICKSTART. Game Modes. Combat Roles. Customizing and Learning. Assembling your Team. PvP - Competitive: PvE - Cooperative:

A Few House Rules for Arkham Horror by Richard Launius

Mythic Battles: Pantheon. Beta Rules. v2.5

PIRATE S CAVE THE SEARCH FOR GOLD The Cave A Cooperative Variant INTRODUCTION COOPERATIVE GAMEPLAY RULES

PROFILE. Jonathan Sherer 9/30/15 1

ACM Collegiate Programming Contest 2016 (Hong Kong)

Strike force kitty unblocked

Philadelphia Classic 2013 Hosted by the Dining Philosophers University of Pennsylvania

COMP3211 Project. Artificial Intelligence for Tron game. Group 7. Chiu Ka Wa ( ) Chun Wai Wong ( ) Ku Chun Kit ( )

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

Table of Contents. Table of Contents 1

Unhappy with the poor health of his cows, Farmer John enrolls them in an assortment of different physical fitness activities.

Joshua Nuernberger DESMA 157A Eddo Stern Fall Marathon Running Game The Road Based on the Novel by Cormac McCarthy

Loot Roll. Rules and Instructions

South African Computer Olympiad Web Training, 2009 IOI Squad March Contest. Overview. Michiel Baird. Problem bnumbers hotdates connect wifitow

Puzzles and problems for Years 1 and 2

Combinatorics: The Fine Art of Counting

Combinatorics: The Fine Art of Counting

Made by Bla Map War 2 Manual Version 6 ( ) Page 1. Map War 2 Manual

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

Math 106 Lecture 3 Probability - Basic Terms Combinatorics and Probability - 1 Odds, Payoffs Rolling a die (virtually)

Games and the Mathematical Process, Week 2

Lightseekers Trading Card Game Rules

HEY! DON T READ THESE RULES!

AA-Revised LowLuck. 1. What is Low Luck? 2. Why Low Luck? 3. How does Low Luck work?

TASK NOP CIJEVI ROBOTI RELJEF. standard output

zogar s gaze Objective

Author s tone, attitude, and purpose

Chapter 4 Number Theory

GLOSSARY USING THIS REFERENCE THE GOLDEN RULES ACTION CARDS ACTIVATING SYSTEMS

1. The sides of a cube are increased by 100%. By how many percent 1. percent does the volume of the cube increase?

Underleague Game Rules

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

English as a Second Language Podcast ESL Podcast 295 Playing Video Games

OFFICIAL RULEBOOK Version 8.0

Input. Output. Examples. Note. Input file: Output file: standard input standard output

Basic Probability Concepts

One Man: Thrag! Rev Eight Foot Llama A solitaire game for the piecepack 02/15/2002

Kingdom Card Almanac. Ancient Techniques. Berzerker. Bait and Switch. Bard. Blackmail

TASK PATRIK POLICIJA SABOR

a b c d e f g h 1 a b c d e f g h C A B B A C C X X C C X X C C A B B A C Diagram 1-2 Square names

OFFICIAL RULEBOOK Version 10

Solving Counting Problems

Preparing the Warband for Battle

CIDM 2315 Final Project: Hunt the Wumpus

THE ART OF SEEING // PHOTZY.COM

Table of Contents. TABLE OF CONTENTS 1-2 INTRODUCTION 3 The Tomb of Annihilation 3. GAME OVERVIEW 3 Exception Based Game 3

Mind Ninja The Game of Boundless Forms

CONTENTS. 1. Number of Players. 2. General. 3. Ending the Game. FF-TCG Comprehensive Rules ver.1.0 Last Update: 22/11/2017

NAMELESS (BROKEN CITY BOOK 1) BY JESSICA SORENSEN

Solutions of problems for grade R5

Background. After the Virus

Hunger Games. Disney Princess Edition. A GM- LESS story game for the hour RPG contest. By Scott Slomiany

Components: Game Map. Unit Chart. Weather Effects. Terrain effects are listed in the rules. Turn Track

In a little known land some time ago, there were heroic adventurers, mighty rulers, fearsome monsters, and powerful magicians. Nobody knows how to

Jamie Mulholland, Simon Fraser University

Transcription:

Problem ID: coolestskiroute John loves winter. Every skiing season he goes heli-skiing with his friends. To do so, they rent a helicopter that flies them directly to any mountain in the Alps. From there they follow the picturesque slopes through the untouched snow. Of course they want to ski on only the best snow, in the best weather they can get. For this they use a combined condition measure and for any given day, they rate all the available slopes. Can you help them find the most awesome route? one line with two integers n (2 n 1000) and m (1 m 5000), where n is the number of (1-indexed) connecting points between slopes and m is the number of slopes. m lines, each with three integers s, t, c (1 s, t n, 1 c 100) representing a slope from point s to point t with condition measure c. Points without incoming slopes are mountain tops with beautiful scenery, points without outgoing slopes are valleys. The helicopter can land on every connecting point, so the friends can start and end their tour at any point they want. All slopes go downhill, so regardless of where they start, they cannot reach the same point again after taking any of the slopes. a single number n that is the maximum sum of condition measures along a path that the friends could take. Sample visualization Mt. Awesome (1) Canopy Vista (4) Hunter s Outpost (2) Hungry Bear Cave (5) Stardew Valley (3) Riverside Inn (6) Figure 1: Map of the second sample case 5 5 1 2 15 2 3 12 1 4 17 4 2 11 5 4 9 40

Sample 2 Sample 2 6 6 1 2 2 4 5 2 2 3 3 1 3 2 5 6 2 1 2 4 7

Problem ID: downthepyramid Do you like number pyramids? Given a number sequence that represents the base, you are usually supposed to build the rest of the pyramid bottom-up: For each pair of adjacent numbers, you would compute their sum and write it down above them. For example, given the base sequence [1, 2, 3], the sequence directly above it would be [3, 5], and the top of the pyramid would be [8]: 8 3 5 1 2 3 However, I am not interested in completing the pyramid instead, I would much rather go underground. Thus, for a sequence of n non-negative integers, I will write down a sequence of n + 1 non-negative integers below it such that each number in the original sequence is the sum of the two numbers I put below it. However, there may be several possible sequences or perhaps even none at all satisfying this condition. So, could you please tell me how many sequences there are for me to choose from? one line with the integer n (1 n 10 6 ), the length of the base sequence. one line with n integers a 1,..., a n (0 a i 10 8 for each i), forming the base sequence. a single integer, the number of non-negative integer sequences that would have the input sequence as the next level in a number pyramid. 6 12 5 7 7 8 4 Sample 2 Sample 2 3 10 1000 100 2 0

Problem ID: expiredlicense Paul is an extremely gifted computer scientist who just completed his master s degree at a prestigious German university. Now he would like to culminate his academic career in a PhD. The problem is that there are so many great universities out there that it is hard for him to pick the best. Because some application deadlines are coming up soon, Paul s only way to procrastinate his decision is by simply applying to all of them. Most applications require Paul to attach a portrait photo. However, it seems like there does not exist an international standard for the aspect ratio of these kinds of photos. While most European universities ask Paul to send a photograph with aspect ratio 4.5 by 6, some Asian countries discard the applications immediately if the photo does not have an aspect ratio of 7.14 by 11.22, precisely. As Paul has never been interested in photo editing, he never had a reason to spend a lot of money on proper software. He downloaded a free trial version some months ago, but that version has already expired and now only works with some funny restrictions. The cropping tool, for example, no longer accepts arbitrary numbers for setting the aspect ratio, but only primes. This makes Paul wonder whether the desired aspect ratios can even be properly expressed by two prime numbers. Of course, in case this is possible, he would also like to know the primes he has to enter. one line with an integer n (1 n 10 5 ), the number of applications Paul has to file; n lines, each with two real numbers a and b (0 < a, b < 100), where a b is the desired aspect ratio of one application. All real numbers are given with at most 5 decimal places after the decimal point. For each application, if it is possible to represent the desired aspect ratio by two prime numbers p and q, output one line with p and q. Otherwise, output impossible. If multiple solutions exist, output the one minimizing p + q. 3 4.5 6 7.14 11.22 0.00002 0.00007 impossible 7 11 2 7

Problem ID: fightingmonsters Emma just discovered a new card game called Gwint: A wizard s game. There are two types of cards: monster cards and spell cards. Monster cards are used to score points, while spell cards typically interact with the monsters in some way. On each monster card there is an integer value, the power of the monster. Monsters can fight each other, and during these fights the power acts as both the strength and the health of the monster. The monsters take turns hitting each other until one of them dies. Whenever a monster A hits a monster B, this causes B to lose an amount of power equal to the power of A. Conversely, if B hits A, A loses power equal to the power of B (see the example below). This continues until one of the two monsters has a power of zero or less, at which point this monster is considered dead. A 4 7 4 3 1 3 1 2-1 2 Images by OpenClipart-Vectors on Pixabay and from PhantomOpenEmoji. Figure 1: A fight between monsters A and B, starting with powers of 4 and 7, respectively. A hits first. B wins with a remaining power of 2. One of Emma s most beloved cards in the game is a spell called Fight! which states: Pick two monsters. They fight each other to the death. If the surviving monster has a power of exactly 1 left, return this card to your hand. Of course, Emma would like to play as efficiently as possible by picking two monsters such that Fight! is returned to her hand. However, there are often a lot of monsters on the board, which makes it very time consuming to figure out whether this can be done or not. Can you help her find two monsters she can pick so that she gets the card back? one line with an integer n (2 n 10 5 ), the number of monsters; one line with n integers m 1,..., m n (1 m i 10 6 ), giving the power of each monster. If there is no pair of monsters that Emma can pick, output impossible. Otherwise, output two distinct integers i, j (1 i, j n), where i is the index of the monster that starts the fight and j is the index of the other monster. If multiple solutions exist, any of them will be accepted. 4 1 12 67 8 impossible Sample 2 Sample 2 5 1 1 12 67 8 2 1 B

Sample 3 Sample 3 6 1 5 6 7 90 8 2 6

Problem ID: itstimeforamontage The heroes of your favorite action TV show are preparing for the final confrontation with the villains. Fundamentally, there are two rivals who will fight each other: a very important main hero who wants to save the universe and an equally important main villain who wants to destroy it. However, through countless recursive spin-offs, they may have slightly less important sidekicks (a hero and a villain who are rivals themselves), who in turn may also have their own (even less important) sidekicks, and so on. Note that there is an equal number of heroes and villains, and each rival pair has at most one sidekick pair. Initially, every character will fight their rival, with the winner being determined by who has the higher Power Level. If a hero and their corresponding villain have the same Power Level, their battle will be determined by their sidekicks battle, as the winning sidekick can help as a sort of tiebreaker. (If rivals of equal Power Level do not have sidekicks, the hero character will win with the help of random passersby.) However, whenever a battle is won by either side, there is nothing the sidekicks can do about it this is because the people behind the show believe some fans might get upset if a character were to get defeated by a bunch of less important characters, so they would lose regardless of the Power Levels. After the battles between rivals (and possible tiebreakers) are done, the most important character remaining will defeat the rest of the opposing side and determine the fate of the universe. Fortunately, the heroes can ensure victory through hard, rigorous training. For each day they spend training, the Power Level of each hero increases by 1, while the villains Power Levels remain constant. But you already knew all this. The question plaguing your mind is how long the training is going to take. one line with an integer n (1 n 1 000), giving the number of rival pairs. one line with n integers h 1,..., h n (1 h i 1 000 for each i), the i-th value giving the Power Level of the i-th most important hero. one line with n integers v 1,..., v n (1 v i 1 000 for each i), the i-th value giving the Power Level of the i-th most important villain. a single integer, the minimum number of days the heroes need to spend training in order for their side to win. 4 5 3 1 1 8 6 9 1 Sample 2 Sample 2 1 2 1 Sample 3 Sample 3 2 4 2 7 5 4 0 3

Problem ID: logicpuzzle While browsing a kiosk at a recent trip, you bought a magazine filled with various kinds of logic puzzles. After a while of solving, however, you start to get a bit bored of the puzzles. Still wanting to complete all the puzzles in the magazine, you start wondering about ways to solve some of them algorithmically. The puzzle you are currently trying to solve is called Mosaic, and it is quite similar to the classic Minesweeper video game: 1 1 2 1 1 0 1 1 1 0 1 1 2 1 1 0 1 1 1 0 Figure 1: Illustration of the first sample You are given a two-dimensional grid of cells, initially all white, and you have to color some of the cells in black. You are also given a grid of clue numbers, which extends beyond the borders of the puzzle grid by one cell in each direction. The number in a cell indicates (exactly) how many cells in the 3 3 block centered at this cell need to be colored in black. You may not color any cells outside of the original grid. one line with two integers h, w (1 h, w 100), the height and width of the puzzle; h + 2 lines, each with w + 2 integers c 1,..., c w+2 (0 c i 9), the clue numbers. If the given clue numbers are inconsistent, output impossible. Otherwise, output h lines with w characters each, the solution to the puzzle. Use X for black cells and. for white cells. If there are multiple solutions, any of them will be accepted. 2 3 1 1 2 1 1 0 1 1 1 0 X.X.X. Sample 2 Sample 2 1 2 0 0 1 1 0 1 1 1 0 1 1 1 impossible