Problems. Regional Competition - Juniors Croatia 2002. Problem SONG JANICA LETTERS TRAM. Executable file song.exe janica.exe letters.exe tram.

Similar documents
COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

SCORESHEET INSTRUCTIONS. RALLY POINT SCORING (RPS 2 out of 3 sets)

SCORESHEET INSTRUCTIONS. RALLY POINT SCORING (RPS 2 out of 3 sets)

Activities for parents to support the learning of multiplication tables

Spaceball7. Manual Outlet Version 1

How To Play The Math Game

MATHEMATICS Y6 Geometry 6750 Use co-ordinates and extend to 4 quadrants Equipment MathSphere

Collection of Backyard Games and Activities

family games Taking the kids swimming is a great way of making sure they re moving around and having fun. And to help you get them into

Sport Timetabling. Outline DM87 SCHEDULING, TIMETABLING AND ROUTING. Outline. Lecture Problem Definitions

MATHS ACTIVITIES FOR REGISTRATION TIME

Using games to support. Win-Win Math Games. by Marilyn Burns

Hooray for the Hundreds Chart!!

Probability. Section 9. Probability. Probability of A = Number of outcomes for which A happens Total number of outcomes (sample space)

1. Three-Color Light. Introduction to Three-Color Light. Chapter 1. Adding Color Pigments. Difference Between Pigments and Light. Adding Color Light

Game 1 - The Elephant Builder. Game 2 - Elephant Bazar

PERMUTATIONS and COMBINATIONS. If the order doesn't matter, it is a Combination. If the order does matter it is a Permutation.

Lowercase Letters Capital Letters Picture Cards

Decision Logic: if, if else, switch, Boolean conditions and variables

Greg Fletcher. Sharpshooter Roulette. Video Guide. Russell Hunter Publishing, Inc.

RULE 2012 EUROPEAN CLIMBING COMPETITIONS. For the points which are not specified on this rule, the IFSC rules book will be the reference.

Paralympic Table Tennis

Concepts of print are found to be effective when looking at comprehension strategies. These may include strategies such as:

101 IELTS Speaking Part Two Topic cards about sports, hobbies and free time A- Z

Mathematics Higher Level

Math Board Games. For School or Home Education. by Teresa Evans. Copyright 2005 Teresa Evans. All rights reserved.

One pile, two pile, three piles

Game 9. Overview. Materials. Recommended Grades 3 5 Time Instruction: minutes Independent Play: minutes

HOW TO RUN A TENNIS ON CAMPUS SERIES TOURNAMENT

Girl Scout Journey FAQs Frequently Asked Questions

Phonics. High Frequency Words P.008. Objective The student will read high frequency words.

Bus Rider Activities

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

Chapter 11 Number Theory

UM Online Practice Programming Contest September 20, 2011

Automatic Bet Tracker!

BSc in Artificial Intelligence and Computer Science ABDAL MOHAMED

THE WINNING ROULETTE SYSTEM by

Ready, Set, Go! Math Games for Serious Minds

Lecture 28 Economics 181 International Trade

Foundation 2 Games Booklet

LESSON 1. Opening Leads Against Notrump Contracts. General Concepts. General Introduction. Group Activities. Sample Deals

Introduction to Python

Pigeonhole Principle Solutions

n 2 + 4n + 3. The answer in decimal form (for the Blitz): 0, 75. Solution. (n + 1)(n + 3) = n lim m 2 1

Project 2: Bejeweled

An I Am poem is meant to help you express yourself as an individual. It is often used as an ice breaker activity or a first day of school Introduce

APPLYING BENFORD'S LAW This PDF contains step-by-step instructions on how to apply Benford's law using Microsoft Excel, which is commonly used by

Algebra 2 C Chapter 12 Probability and Statistics

1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier.

Cornerstones: Click, Clack, Moo Flash Card Games: Instructions

Random Fibonacci-type Sequences in Online Gambling

Would You Like To Earn $1000 s With The Click Of A Button?

mclass: Reading 3D Reminders

USA Volleyball Scorer Test A

Decision Mathematics D1 Advanced/Advanced Subsidiary. Tuesday 5 June 2007 Afternoon Time: 1 hour 30 minutes

Dynamic Programming. Lecture Overview Introduction

Introduction Solvability Rules Computer Solution Implementation. Connect Four. March 9, Connect Four

Basics of Counting. The product rule. Product rule example. 22C:19, Chapter 6 Hantao Zhang. Sample question. Total is 18 * 325 = 5850

Past Tense Activities - Lesson 1

LAMC Beginners Circle: Parity of a Permutation Problems from Handout by Oleg Gleizer Solutions by James Newton

By the end of this workbook I should... What is a Website?

Unit 19: Probability Models

Third Grade Math Games

Unit Conversions. Ben Logan Feb 10, 2005

Put Your Song to the Tests

ONLINE SAFETY TEACHER S GUIDE:

v w is orthogonal to both v and w. the three vectors v, w and v w form a right-handed set of vectors.

Sue Fine Linn Maskell

Instructions for Setup

The Roman s Road. 1 By Tamarie Tigh copyright Lesson Legend Prepare Say Do o Note

MAKING MATH MORE FUN BRINGS YOU FUN MATH GAME PRINTABLES FOR HOME OR SCHOOL

MATH Fundamental Mathematics IV

Self-Acceptance. A Frog Thing by E. Drachman (2005) California: Kidwick Books LLC. ISBN Grade Level: Third grade

Please familiarise yourself with this document prior to the event

20-30 minutes, can be used within a longer activity

Storytime Crosswalk Connections: How the Six Skills and Five Practices Meet at the Library!


MAKE YOUR FIRST A-MAZE-ING GAME IN GAME MAKER 7

The fundamental question in economics is 2. Consumer Preferences

CPS122 Lecture: State and Activity Diagrams in UML

Converting from Fractions to Decimals

SECTION A OFFICIAL EVENTS

Chapter 2 Introduction to SPSS

How to Play. Player vs. Dealer

Make maths fun!! Give your child lots of praise and encouragement!

7 th Grade Integer Arithmetic 7-Day Unit Plan by Brian M. Fischer Lackawanna Middle/High School

How to open an account

BEGINNER S BRIDGE NOTES. Leigh Harding

Decimals and Percentages

Integer Programming Formulation

Calculator Practice: Computation with Fractions

The foreign King. Contents

Loteria Workshop is a great way to bring Mexican art and gaming tradition to your computer!

Magic Word. Possible Answers: LOOSER WINNER LOTTOS TICKET. What is the magic word?

Question 2: How do you solve a linear programming problem with a graph?

Excel basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

Lesson 5: School Bus Safety

RACE TO CLEAR THE MAT

Board Games. With Monkey Friends. 15 Multiplication Board Games to practice multiplication up to 10 x 10

Transcription:

Problems Problem SONG JANICA LETTERS TRAM Executable file song.exe janica.exe letters.exe tram.exe Source file song.pas song.c song.cpp janica.pas janica.c janica.cpp letters.pas letters.c letters.cpp tram.pas tram.c tram.cpp Input file song.in janica.in letters.in tram.in Output file song.out janica.out letters.out tram.out Time limit per test 0 0 0 0 Number of tests 0 0 0 0 Points per test 3 4 6 7 Total points 30 40 60 70 200

SONG A song consists of one or more verses, and each verse consists of four lines. Each line consists of one or more words separated by single blank character, and finally, each word consists of one or more letters (a-z, A-Z). We define the last syllable of a word to be the sequence of letters from the last vowel (inclusively) to the end of the word. If a word has no vowel, then the last syllable is the word itself. We say that two lines rhyme if they have same last syllables (ignoring the letter case). Verse can have perfect rhyme, even rhyme, cross rhyme, shell rhyme or there can be no rhyme at all (free rhyme). Verse has a perfect rhyme if all lines in a verse mutually rhyme (a a a a). If verse does not have a perfect rhyme then we say that it has: even rhyme: if the first and second line rhyme and also third and fourth line rhyme (a a b b). cross rhyme: if the first and third line rhyme and also second and fourth line rhyme (a b a b). shell rhyme: if the first and fourth line rhyme and also second and third line rhyme (a b b a). Write a program that will determine the rhyme for each verse in a song. The first line of the input file contains an integer N, the number of verses in the song, N 5. The following 4N lines of the input file contain the lines of the song. Maximal length of each line is 50. Output file should have N lines. For each verse in a song there should a single line containing one of the words 'perfect', 'even', 'cross', 'shell' or 'free' describing the rhyme in that verse. song.in mi smo Super Edit Pjaf Ran gari geri kuper ej pazi na ekran song.out cross song.in 2 Tko je to to je Zlo nije Zlo to je Mo Gdje je Mu jel na putu Brijem da nije vidlo bi se song.out perfect even song.in 2 mirko me ozbiljno zanima e dok ovo pisem drhtim placem ali znam da i ja mogu racunati na to ma znate sram me sapce da i ja njega mamim song.out even free

JANICA Watching alpine skiing on TV can be really boring sometimes. Fortunately, it can happen that your TV operator doesn t show all the information about the race and then you have to do some computation to determine the winner yourself. Here are some details about a race: Each race consists of two rounds. In first round, N skiers numbered from to N, race starting in that order. When the first skier in the first round (numbered with ) finishes the race we are given the time he/she needed to complete the course. For every following skier we are given time difference between his/her time and the time of the skier currently leading the race. Only the best M skiers qualify for the second round and they start the second round ordered by time from the first round decreasingly (last skier qualified for the second round starts first and the leader after the first round start last). In the second round we are given the total time (first and second round added) of the first skier racing, and then for every following skier we are given the time difference between his/her total time and the total time of the skier currently leading the race. Write a program that will determine medal winners after the race has finished. You can assume that it can never happen that two skiers have same time (after the first round or after both rounds). Time for any race will be between 0 and 300. All times will be real numbers with at most two decimal digits. The first line of the input file contains two integers N and M, separated by a single blank character, 3 M N 00. The following line contains the time for the first skier in the first round, and the following N- lines contain the described time differences. The following line contains the time for the first skier in the second round, and the following M- lines contain the described time differences.

JANICA The first line of the output file should contain the number of the skier winning the gold medal, second line the number of skier winning the silver medal, and the third line the number of skier winning the bronze medal. janica.in 3 3 25.3 +.4 +2.8 45.08 +2.4 +3. janica.out 3 2 janica.in 4 3 29.8 +2.8 +0.05 +.3 54.22 +.23 +. janica.out 4 3 janica.in 5 4 27.29 -.02 +.83-0.43 +0.03 56.98 +.83-0.43 +0.03 janica.out 5 4

LETTERS A single-player game is played on a rectangular board divided in R rows and C columns. There is a single uppercase letter (A-Z) written in every position in the board. Before the begging of the game there is a figure in the upper-left corner of the board (first row, first column). In every move, a player can move the figure to the one of the adjacent positions (up, down, left or right). Only constraint is that a figure cannot visit a position marked with the same letter twice. The goal of the game is to play as many moves as possible. Write a program that will calculate the maximal number of positions in the board the figure can visit in a single game. The first line of the input file contains two integers R and C, separated by a single blank character, R, S 20. The following R lines contain S characters each. Each line represents one row in the board. The first and only line of the output file should contain the maximal number of position in the board the figure can visit. letters.in 2 4 CAAB ADCB letters.out 3 letters.in 3 6 HFDFFB AJHGDH DGAGEH letters.out 6 letters.in 5 5 IEFCJ FHFKC FFALF HFGCF HMCHH letters.out 0

TRAM Tram network in Zagreb consists of a number of intersections and rails connecting some of them. In every intersection there is a switch pointing to the one of the rails going out of the intersection. When the tram enters the intersection it can leave only in the direction the switch is pointing. If the driver wants to go some other way, he/she has to manually change the switch. When a driver has do drive from intersection A to the intersection B he/she tries to choose the route that will minimize the number of times he/she will have to change the switches manually. Write a program that will calculate the minimal number of switch changes necessary to travel from intersection A to intersection B. The first line of the input file contains integers N, A and B, separated by a single blank character, 2 N 00, A, B N, N is the number of intersections in the network, and intersections are numbered from to N. Each of the following N lines contain a sequence of integers separated by a single blank character. First number in the i-th line, K i (0 K i N-), represents the number of rails going out of the i-th intersection. Next K i numbers represents the intersections directly connected to the i-th intersection. Switch in the i-th intersection is initially pointing in the direction of the first intersection listed. The first and only line of the output file should contain the target minimal number. If there is no route from A to B the line should contain the integer -. tram.in 3 2 2 2 3 2 3 2 2 tram.out 0 tram.in 3 3 2 2 3 2 tram.out tram.in 4 4 2 2 4 3 tram.out -