TASK OKUPLJANJE USPON RAZINE ABECEDA STEP VODA. uspon.pas uspon.c uspon.cpp. razine.pas razine.c razine.cpp

Similar documents
COCI 2008/2009 Contest #4, 17 th January 2009 TASK MJEHURIC DATUM ROT SLIKAR TREZOR PERIODNI

COCI 2008/2009 Contest #5, 7 th February 2009 TASK LJESNJAK JABUKA JAGODA LUBENICA TRESNJA KRUSKA

COCI 2008/2009 Contest #1, 18 th October 2008 TASK SKOCIMIS PTICE MRAVOJED JEZ SKAKAVAC KRTICA

TASK BELA PUTOVANJE PIANINO PAROVI KRUMPIRKO SAN. standard input (stdin) standard output (stdout)

TASK JACK PROZORI ZAGRADE REZ PASTELE KOŠARE. zagrade.pas zagrade.c zagrade.cpp. time limit 1 second 1 second 1 second 1 second 5 seconds 2 second

TASK ŠEĆER KOLO GITARA POŠTAR KUGLICE UPIT. kolo.pas kolo.c kolo.cpp. gitara.pas gitara.c gitara.cpp

TASK FUNGHI ZMIJA TRAKTOR ZGODAN JABUKE DIVLJAK. standard input (stdio) standard output (stdout)

CROATIAN OPEN COMPETITION IN INFORMATICS. 7 th ROUND

INTERMEDIATE. Grades 8 and 9 NOT TO BE USED BEFORE 5 MARCH If you are NOT in grades 8 or 9, please report that you have the wrong paper.

2005 Galois Contest Wednesday, April 20, 2005

SAPO Finals 2017 Day 2 Cape Town, South Africa, 8 October standard output

Standard Sudoku point. 1 point. P a g e 1

CROATIAN OPEN COMPETITION IN INFORMATICS. 4th round

COCI 2017/2018. Round #1, October 14th, Tasks. Task Time limit Memory limit Score. Cezar 1 s 64 MB 50. Tetris 1 s 64 MB 80

Croatian Open Competition in Informatics, contest 5 February 23, 2008

Math 1111 Math Exam Study Guide

Problem A. Backward numbers. backw.in backw.out

TASK KAMPANJA MJESEC SETNJA TRAMPOLIN. mjesec.pas mjesec.c mjesec.cpp. standard input (stdin) standard output (stdout)

WPF PUZZLE GP 2017 ROUND 5A COMPETITION BOOKLET. Host Country: Czech Republic C D. Author: Jan Novotný

COCI 2008/2009 Contest #3, 13 th December 2008 TASK PET KEMIJA CROSS MATRICA BST NAJKRACI

Problem 4.R1: Best Range

TASK NOP CIJEVI ROBOTI RELJEF. standard output

Problem A. Jumbled Compass

COCI 2008/2009 Contest #6, 7 th March 2009 TASK BUKA BAZEN NERED CUSKIJA DOSTAVA SLICICE

Classwork Example 1: Exploring Subtraction with the Integer Game

Math Contest Preparation II

Q i e v e 1 N,Q 5000

UKMT UKMT UKMT. Junior Kangaroo Mathematical Challenge. Tuesday 12th June 2018

ACM Collegiate Programming Contest 2016 (Hong Kong)

Problems translated from Croatian by: Paula Gombar

Episode 3 16 th 19 th March Made In India and Regions by Prasanna Seshadri

Answers Solving mathematical problems

The 2016 ACM-ICPC Asia China-Final Contest Problems

CPSC 217 Assignment 3 Due Date: Friday March 30, 2018 at 11:59pm

Gough, John , Logic games, Australian primary mathematics classroom, vol. 7, no. 2, pp

Memory. Introduction. Scratch. In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

COCI 2016/2017 Tasks Bridž Kartomat Kas Rekonstruiraj Rima Osmosmjerka Total

ACM International Collegiate Programming Contest 2010

The 2013 British Informatics Olympiad

UTD Programming Contest for High School Students April 1st, 2017

Decimals on the Number Line

In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

Problems translated from Croatian by: Ivan Pilat

Table of Contents. Table of Contents 1

Problem A. Subway Tickets

Wordy Problems for MathyTeachers

Unit 1 Number Sense: Numbers to 10

Year 6. Mathematics A booklet for parents

1. For which of the following sets does the mean equal the median?

What is the sum of the positive integer factors of 12?

Saturday Morning Math Group October 27, Game Theory and Knowing about Knowledge PACKET A

Asia-Pacific Informatics Olympiad 2012

French-Australian Regional Informatics Olympiad 11th March, 2011

CPSC 217 Assignment 3

Measuring in Centimeters

Ideas beyond Number. Teacher s guide to Activity worksheets

Thousandths are smaller parts than hundredths. If one hundredth is divided into 10 equal parts, each part is one thousandth.

BALDWIN WALLACE UNIVERSITY 2016 HIGH SCHOOL PROGRAMMING CONTEST

(A) $2.53 (B) $5.06 (C) $6.24 (D) $7.42 (E) $8.77

Episode 4 30 th March 2 nd April 2018 Odd Even & Substitution Variations By R Kumaresan and Amit Sowani

Second Practice Test 1 Level 5-7

SUDOKU X. Samples Document. by Andrew Stuart. Moderate

MATHCOUNTS Mock National Competition Sprint Round Problems Name. State DO NOT BEGIN UNTIL YOU HAVE SET YOUR TIMER TO FORTY MINUTES.

(A) $2.53 (B) $5.06 (C) $6.24 (D) $7.42 (E) $8.77

1. How many diagonals does a regular pentagon have? A diagonal is a 1. diagonals line segment that joins two non-adjacent vertices.

A=, E=, T=, P=, L=, H= Fill in the blank spots in the sequence:

Midterm (Sample Version 3, with Solutions)

Diagonal Vision LMI March Sudoku Test

ProCo 2017 Advanced Division Round 1

ISudoku. Jonathon Makepeace Matthew Harris Jamie Sparrow Julian Hillebrand

Do not duplicate or distribute without written permission from CMKC!

Mathematical Olympiads November 19, 2014

TASK PATRIK POLICIJA SABOR

Analyzing Games: Solutions

Book 10: Slope & Elevation

MATHEMATICS LEVEL: 3 4 (Γ - Δ Δημοτικού)

2016 CCSC Eastern Conference Programming Competition

Patterns and Graphing Year 10

Released January Years 3/4. Small Steps Guidance and Examples. Block 2 Length, Perimeter, Area

The 2017 British Informatics Olympiad

Creating Your Own PowerPoint Jeopardy Game

PA5-1: Counting page 1

WPF PUZZLE GP 2016 ROUND 2 INSTRUCTION BOOKLET. Puzzle Authors: Slovakia. Matus Demiger. General Notes: None for this round. Points, Casual Section:

7. Three friends each order a large

Square Roots and the Pythagorean Theorem

Serbian round at Logic Masters India

Six stages with rational Numbers (Published in Mathematics in School, Volume 30, Number 1, January 2001.)

The problems in this booklet are organized into strands. A problem often appears in multiple strands. The problems are suitable for most students in

Pascal Contest (Grade 9) Wednesday, February 22, 2006

Counting Things. Tom Davis March 17, 2006

Math 2 Proportion & Probability Part 3 Sums of Series, Combinations & Compound Probability

Kangaroo 2017 Benjamin (6th and 7th grade)

Math 1111 Math Exam Study Guide

Sixth Grade Test - Excellence in Mathematics Contest 2012

March 5, What is the area (in square units) of the region in the first quadrant defined by 18 x + y 20?

PRIMES STEP Plays Games

The Pythagorean Theorem is used in many careers on a regular basis. Construction

2006 Canadian Computing Competition: Junior Division. Sponsor:

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

THE G C SCHOOL OF CAREERS MATHEMATICS SCHOOL

Transcription:

th round, March th, 2011 TASK OKUPLJANJE USPON RAZINE ABECEDA STEP VODA source code okupljanje.pas okupljanje.c okupljanje.cpp uspon.pas uspon.c uspon.cpp razine.pas razine.c razine.cpp abeceda.pas abeceda.c abeceda.cpp step.pas step.c step.cpp voda.pas voda.c voda.cpp standard (stdin) standard (stdout) time limit 1 second 1 second 1 second 1 second 1 second second memory limit 2 MB 2 MB 2 MB 2 MB 2 MB 128 MB point value 0 0 70 100 120 10 00

Task OKUPLJANJE th round, March th, 2011 Author: Marko Ivanković The day after a giant party everybody wants to know a couple of things - who was at the party and how many people were there? Since parties are usually pretty big, nobody actually knows the correct number of people who were there. Your friend Krešo was on a party last Saturday and he knows how many people there were per 1 m 2. While reading newspaper articles about that party, you have written down numbers, specifying how many people were present at the party according to each of the articles. You believe Krešo s information and you d like to know how much each of the articles was wrong. The first line of contains two positive integers, Lj (1 Lj 10), the number of people per m 2, and P (1 P 1000), the area of the room the party was held in. The second line of contains positive integers less than 10, the number of people present at the party according to each of the articles. The first and only line of must contain numbers, the difference between the number of people written in an article and Krešo s (correct) number. 1 10 10 10 10 10 10 0 0 0 0 0 20 99 101 1000 0 97-1 1 900-100 -

Task USPON th round, March th, 2011 Author: Matija Osrečki Tomislav has recently discovered that he s completely out of shape. He actually becomes tired while walking down the stairs! One morning he woke up and decided to come in good shape. His favourite sport is cycling, so he decided to ride a tour on the local hills. The route he is taking is described as a sequence of N numbers which represent the height of the road at evenly spaced points of the route, from the beginning to the end of it. Tomislav is interested in the largest segment of the route which goes up the hill he has to ride, according to the information he has. Let s call such a segment a climb. Tomislav is too tired to bother about details, so he will only take into account the height difference of a climb, not its length. A climb is more strictly defined as a consecutive increasing subsequence of at least two numbers describing the road. The size of the climb is the difference between the last and first number in the subsequence. For example, let s consider a route described by the following sequence of heights: 12 7_10 1_11. Underlined numbers represent two different climbs. The size of the first climb is 7. The second climb is larger, with size 10. Points with heights 12 and are not parts of any climb. Help Tomislav and calculate the largest climb! The first line of contains a positive integer N (1 N 1000), the number of measured points on the route. The second line of contains N positive integers P i (1 P i 1000), the heights of measured points on the route. The first and only line of should contain the size of the largest climb. If the route in the does not contain any climbs, 0. 1 2 1 8 12 20 1 11 1 8 10 8 8 0 Second sample description: climbs are 12-20, 1--, and -11. 1----11 is not a climb because sequence of numbers describing a climb has to be strictly increasing.

Task ABECEDA th round, March th, 2011 Author: Luka Kalinovčić Mirko has developed his own video game. The game has N levels and each successfully completed level is worth a certain number of points, which add up to the player s total score on an online rank list of all players. Mirko has ordered his levels by difficulty from the easiest to the most difficult, but he has made a mistake and made some difficult levels worth less points than some of the easier ones. To overcome this problem, Mirko has decided to reduce the number of points for certain levels with the goal of making the point sequence strictly increasing (so in the end easier levels are worth less points than the difficult ones). Help Mirko fix his video game in such a way that the total number of points reduced is minimal. Final points have to be positive. You can assume that a solution exists for each test case. The first line of contains one positive integer N (1 N 100), the number of levels. The next N lines contain positive integers less than 20 000, the number of points that Mirko has associated with each level, from the first to the last level. The first and and only line of should contain one number - the minimum total number of points Mirko has to subtract to fulfill requirements given in the task statement above. 7

Task ABECEDA th round, March th, 2011 Author: Luka Kalinovčić A list of words written in some unknown alphabet was found. It is known, however, that these words are in alphabetic order. Write a program that will find the unique alphabetic ordering of used letters, or determine that no such ordering exists or that there is more than one possible solution. The first line of contains a positive integer N (N 100), the number of words. The following N lines contain the list of words found, one word per line. Each word consists of at most 10 lowercase letters. The first and only line of should contain all letters in alphabetic order. If no such ordering exists,!. If there is more than one solution,?. ula uka klua kula al luka jaja baba baja beba! marko darko zarko?

Task STEP th round, March th, 2011 Author: Frane Kurtović Mirko and Slavko started taking tap dance lessons. This dance consists mostly of tapping the floor with a special kind of shoe. Since Mirko and Slavko are fast learners, they decided to come up with their own choreography. Tap dance choreography can be described as a sequence consisting of two letters, L and R. L means that you should tap the floor with your left foot, and R with your right foot. Mirko realised that the most exciting parts of tap dancing are the ones in which you don t use the same leg twice in a row. He defined the value of a choreography as the longest subsequence of consecutive elements that doesn t contain two consecutive L s or R s. As we all know, designing a choreography can be very challenging, with lots of small changes until it s done. For every alteration that Slavko does, he would like to know the current choreography value. One alteration is changing one L to R, and vice versa. Before any alterations are made, the choreography consists only of letters L. The first line of contains two integers, the choreography length N (1 N 200 000), and the number of alterations Q (1 Q 200 000). Each of the next Q lines contains an integer specifying the position that Mirko and Slavko are altering, in order of alteration. The must contain Q integers, one per line - the current values of the choreography after each alteration. 2 2 1 1 2 First sample description: choreographies are: LLLLLL LRLLLL LRLRLL

Task VODA th round, March th, 2011 Author: Goran Žužić Mirko, the mad plumber, was hired to construct a water supply network between two locations in a city. The city map can be represented as a R S grid. Some cells are not suitable for placing water pipes. Locations Mirko needs to connect are placed directly above the top left cell of the grid, and directly below the bottom right cell. Each suitable cell Mirko can either leave empty or use it for placing one of the following pipe types: Find the number of ways that pipes can be placed to connect the two locations with a continuous pipe (water must not be spilled). All placed pipe parts must be in use. Output the solution modulo 10007. The first line of contains the integers R and S (2 R, S 10), the number of rows and columns of the city grid, respectively. Each of the next R lines contains exactly S characters:. if the cell is suitable for placing pipes, and # if not. The first and only line of must contain the required number of ways modulo 10007.. 2.#. 1 12 First sample description: this is the only possible solution: