ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011



Σχετικά έγγραφα
ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/2006

Section 8.3 Trigonometric Equations

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 2008

Approximation of distance between locations on earth given by latitude and longitude

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

Matrices and Determinants

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

TMA4115 Matematikk 3

2 Composition. Invertible Mappings

Areas and Lengths in Polar Coordinates

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

Homework 3 Solutions

1. Αφετηρία από στάση χωρίς κριτή (self start όπου πινακίδα εκκίνησης) 5 λεπτά µετά την αφετηρία σας από το TC1B KALO LIVADI OUT

(C) 2010 Pearson Education, Inc. All rights reserved.

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ. ΕΠΛ342: Βάσεις Δεδομένων. Χειμερινό Εξάμηνο Φροντιστήριο 10 ΛΥΣΕΙΣ. Επερωτήσεις SQL

Areas and Lengths in Polar Coordinates

10 MERCHIA. 10. Starting from standing position (where the SIGN START ) without marshal (self start) 5 minutes after TC4 KALO LIVADI OUT

EE512: Error Control Coding

ΚΥΠΡΙΑΚΗ ΜΑΘΗΜΑΤΙΚΗ ΕΤΑΙΡΕΙΑ IΔ ΚΥΠΡΙΑΚΗ ΜΑΘΗΜΑΤΙΚΗ ΟΛΥΜΠΙΑΔΑ ΑΠΡΙΛΙΟΥ 2013 Β & Γ ΛΥΚΕΙΟΥ.

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

Instruction Execution Times

Section 9.2 Polar Equations and Graphs

Potential Dividers. 46 minutes. 46 marks. Page 1 of 11

derivation of the Laplacian from rectangular to spherical coordinates

Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible.

FSM Toolkit Exercises

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

IIT JEE (2013) (Trigonomtery 1) Solutions

Section 7.6 Double and Half Angle Formulas

Homework 8 Model Solution Section

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 10η: Basics of Game Theory part 2 Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

7 Present PERFECT Simple. 8 Present PERFECT Continuous. 9 Past PERFECT Simple. 10 Past PERFECT Continuous. 11 Future PERFECT Simple

The Simply Typed Lambda Calculus

Example Sheet 3 Solutions

Δημιουργία Λογαριασμού Διαχείρισης Business Telephony Create a Management Account for Business Telephony

Οι αδελφοί Montgolfier: Ψηφιακή αφήγηση The Montgolfier Βrothers Digital Story (προτείνεται να διδαχθεί στο Unit 4, Lesson 3, Αγγλικά Στ Δημοτικού)

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in

Inverse trigonometric functions & General Solution of Trigonometric Equations

2. THEORY OF EQUATIONS. PREVIOUS EAMCET Bits.

Review Test 3. MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Example of the Baum-Welch Algorithm

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

Mean bond enthalpy Standard enthalpy of formation Bond N H N N N N H O O O

Advanced Subsidiary Unit 1: Understanding and Written Response

ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω

Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1

Section 1: Listening and responding. Presenter: Niki Farfara MGTAV VCE Seminar 7 August 2016

SCITECH Volume 13, Issue 2 RESEARCH ORGANISATION Published online: March 29, 2018

C.S. 430 Assignment 6, Sample Solutions

ΦΥΛΛΟ ΕΡΓΑΣΙΑΣ Α. Διαβάστε τις ειδήσεις και εν συνεχεία σημειώστε. Οπτική γωνία είδησης 1:.

Spherical Coordinates

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

A ΜΕΡΟΣ. 1 program Puppy_Dog; 2 3 begin 4 end. 5 6 { Result of execution 7 8 (There is no output from this program ) 9 10 }

Quadratic Expressions

Numerical Analysis FMN011

Second Order Partial Differential Equations

Right Rear Door. Let's now finish the door hinge saga with the right rear door

ΑΛΕΞΑΝΔΡΟΣ ΠΑΛΛΗΣ SCHOOLTIME E-BOOKS

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

the total number of electrons passing through the lamp.

Πώς μπορεί κανείς να έχει έναν διερμηνέα κατά την επίσκεψή του στον Οικογενειακό του Γιατρό στο Ίσλινγκτον Getting an interpreter when you visit your

14 Lesson 2: The Omega Verb - Present Tense

Συντακτικές λειτουργίες

1. Πόσοι αριθμοί μικρότεροι του διαιρούνται με όλους τους μονοψήφιους αριθμούς;

LESSON 12 (ΜΑΘΗΜΑ ΔΩΔΕΚΑ) REF : 202/055/32-ADV. 4 February 2014

Congruence Classes of Invertible Matrices of Order 3 over F 2

ΚΥΠΡΙΑΚΗ ΜΑΘΗΜΑΤΙΚΗ ΕΤΑΙΡΕΙΑ IΖ ΚΥΠΡΙΑΚΗ ΜΑΘΗΜΑΤΙΚΗ ΟΛΥΜΠΙΑΔΑ ΑΠΡΙΛΙΟΥ 2016 Α & Β ΓΥΜΝΑΣΙΟΥ.

Modbus basic setup notes for IO-Link AL1xxx Master Block

UNIVERSITY OF CALIFORNIA. EECS 150 Fall ) You are implementing an 4:1 Multiplexer that has the following specifications:

[1] P Q. Fig. 3.1

Other Test Constructions: Likelihood Ratio & Bayes Tests

Math 6 SL Probability Distributions Practice Test Mark Scheme

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS General Certificate of Education Ordinary Level

Volume of a Cuboid. Volume = length x breadth x height. V = l x b x h. The formula for the volume of a cuboid is

Affine Weyl Groups. Gabriele Nebe. Summerschool GRK 1632, September Lehrstuhl D für Mathematik

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

Στο εστιατόριο «ToDokimasesPrinToBgaleisStonKosmo?» έξω από τους δακτυλίους του Κρόνου, οι παραγγελίες γίνονται ηλεκτρονικά.

Cambridge International Examinations Cambridge International General Certificate of Secondary Education

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation

Section 8.2 Graphs of Polar Equations

On a four-dimensional hyperbolic manifold with finite volume

Finite Field Problems: Solutions

Srednicki Chapter 55

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

Fractional Colorings and Zykov Products of graphs

STARTING STEPS IN GRAMMAR, FINAL TEST C TERM 2012 UNITS 1-18

Πανεπιστήμιο Κρήτης, Τμήμα Επιστήμης Υπολογιστών Άνοιξη HΥ463 - Συστήματα Ανάκτησης Πληροφοριών Information Retrieval (IR) Systems

5.4 The Poisson Distribution.

9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr

Strain gauge and rosettes

ΑΡΙΣΤΟΤΕΛΕΙΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΘΕΣΣΑΛΟΝΙΚΗΣ ΤΜΗΜΑ ΟΔΟΝΤΙΑΤΡΙΚΗΣ ΕΡΓΑΣΤΗΡΙΟ ΟΔΟΝΤΙΚΗΣ ΚΑΙ ΑΝΩΤΕΡΑΣ ΠΡΟΣΘΕΤΙΚΗΣ

ΟΔΗΓΙΕΣ ΕΓΚΑΤΑΣTΑΣΗΣ ΓΙΑ ΠΑΤΩΜΑ WPC INSTALLATION GUIDE FOR WPC DECKING

Transcript:

Διάρκεια Διαγωνισμού: 3 ώρες Απαντήστε όλες τις ερωτήσεις Μέγιστο Βάρος (20 Μονάδες) Δίνεται ένα σύνολο από N σφαιρίδια τα οποία δεν έχουν όλα το ίδιο βάρος μεταξύ τους και ένα κουτί που αντέχει μέχρι 500 γραμμάρια. Να γράψετε ένα πρόγραμμα το οποίο υπολογίζει πόσο είναι το μέγιστο βάρος σφαιριδίων που μπορούμε να τοποθετήσουμε στο κουτί χωρίς να υπερβούμε το πιο πάνω όριο. Είσοδος Από το πληκτρολόγιο, δίνετε στη πρώτη γραμμή εισόδου ένας θετικός ακέραιος αριθμός Ν (όπου 0 < Ν < 0). Στην επόμενη γραμμή υπάρχουν Ν θετικοί ακέραιοι αριθμοί, που αντιπροσωπεύουν το βάρος του κάθε σφαιριδίου. Έξοδος Στην οθόνη, σε μια γραμμή εκτυπώστε το μέγιστο βάρος σφαιριδίων που μπορούμε να τοποθετήσουμε χωρίς να υπερβούμε το όριο των 500 γραμμαρίων. 20 50 40 30 20 40 30 40 40 50 30 40 30 40 70 80 50 60 60 60 60 500 50 300 400 700 800 550 600 600 60 600 460

Competition Duration: 3 hours Answer all questions Maximum Weight (20 Points) You are given a group of N spheres, not necessarily having the same weight a box that can take up to 500 grams. Write a program that calculates the maximum weight of spheres we can place in the box without exceeding the above limit. Input From the keyboard, you are give on the first line a positive integer number Ν (where 0 < Ν < 0). On the next line there are Ν positive integer numbers, who represent the weight of each sphere. Output On the screen, in one line print the maximum weight of spheres that can be placed in the box without exceeding the 500 grams limit. 20 50 40 30 20 40 30 40 40 50 30 40 30 40 70 80 50 60 60 60 60 500 50 300 400 700 800 550 600 600 60 600 460

T9 (35 Μονάδες) Σε ένα τυπικό τηλέφωνο, οι αριθμοί 1-9 αντιστοιχίζονται εξής ομάδες γραμμάτων: 1: κενό 2: ABC 3: DEF 4: GHI 5: JKL 6: MNO 7: PQRS 8: TUV 9: WXYZ Χρησιμοποιώντας το πληκτρολόγιο του τηλεφώνου, μπορούμε να γράψουμε κάποια λέξη εισάγοντας τα ψηφία που αντιστοιχούν με το κάθε γράμμα της λέξης. Για παράδειγμα η λέξη words αντιστοιχεί με τον αριθμό 96737. Να γράψετε ένα πρόγραμμα το οποίο δέχεται σαν είσοδο ένα αριθμό και με τη χρήση ενός αρχείου/λεξικού (lex.in) παρουσιάζει όλες τις λέξεις από το αρχείο οι οποίες περιέχουν ολόκληρο και αναλλοίωτο τον αριθμό εισόδου οπουδήποτε μέσα στην αντιστοιχία τους. Είσοδος Από το πληκτρολόγιο, δίνετε σε μία γραμμή εισόδου ένας θετικός ακέραιος αριθμός Ν (όπου το μήκος του Ν είναι το πολύ 18 ψηφία και κάθε ψηφίο είναι ανάμεσα στο 2-9 συμπεριλαμβανομένων. Το αρχείο lex.in περιέχει σε κάθε γραμμή μια λέξη. Κάθε λέξη έχει μέγιστο μήκος 18 γράμματα. Έξοδος Στην οθόνη, εκτυπώστε όλες τις λέξεις οι οποίες περιέχουν οπουδήποτε στην αριθμητική αντιστοιχία τους τον αριθμό εισόδου. Να εκτυπώσετε μία σε κάθε γραμμή. Αν δεν βρεθεί καμία, εκτυπώστε No Match. 22222 No Match 3333 626

T9 (35 Points) On a typical phone, the numbers 1-9 are matched with following groups of letters: 1: space 2: ABC 3: DEF 4: GHI 5: JKL 6: MNO 7: PQRS 8: TUV 9: WXYZ Using the keyboard of the telephone, we can write any word by entering the digits that match each letter of the word. For example, the word words matches the number 96737. Write a program that accepts as input a number and using a file/dictionary (lex.in) and it presents all words from the file that contain the complete and unchanged input number as part of their matching number. Input From the keyboard, you are given in one input line a positive integer number Ν (where the length of Ν is at most 18 digits. Each digit is between 2-9, both values inclusive. The file lex.in contains on each line one word. Every word has maximum length 18 letters. Output On the screen, print all words that contain in their matching number the input number. Print one on each line. If none is found, print No Match. 22222 No Match 3333 626

Ανθρακωρύχος (45 Μονάδες) Ένας ανθρακωρύχος έχει παγιδευτεί σε ένα ορυχείο. Μαζί του έχει ένα PDA με τον ανανεωμένο χάρτη του ορυχείου και Ν ράβδους δυναμίτη. Να γράψετε ένα πρόγραμμα το οποίο με τη χρήση του χάρτη (map.in) υπολογίζει μια διαδρομή για να βγει έξω ο ανθρακωρύχος ανατινάζοντας βράχια όποτε κρίνει σκόπιμο χρησιμοποιώντας τον ελάχιστο αριθμό ράβδων δυναμίτη. Είσοδος Από το πληκτρολόγιο, δίνετε στη πρώτη γραμμή εισόδου ένας θετικός ακέραιος αριθμός Ν (όπου 0 < Ν < 00). Από το αρχείο map.in, δίνετε ο χάρτης όπου: στην πρώτη γραμμή δίνονται δύο θετικοί ακέραιοι αριθμοί i,j (όπου 5 < i,j < 0). Στις επόμενες i γραμμές περιέχονται j θετικοί ακέραιοι αριθμοί. Κάθε αριθμός, αντιπροσωπεύει τον αριθμό των ράβδων δυναμίτη που απαιτούνται για να περάσει από τη συγκεκριμένη θέση ο ανθρακωρύχος. Ξεκινώντας την αρίθμηση από i=0 και j=0, η αρχική θέση του ανθρακωρύχου είναι πάντα η [1,1] και συμβολίζεται από την τιμή 01. Η έξοδος είναι πάντα στη θέση [i- 1,j-1] και συμβολίζεται από την τιμή 02. Έξοδος Στην οθόνη, στην πρώτη γραμμή εκτυπώστε τον ελάχιστο αριθμό ράβδων δυναμίτη που απαιτούνται για να βγει έξω ο ανθρακωρύχος (Πάντα θα υπάρχει τρόπος να βγει έξω ο ανθρακωρύχος). Στην επόμενη γραμμή εκτυπώστε τις συντεταγμένες των σημείων όπου τοποθετήθηκε έστω και μία ράβδος δυναμίτη. 2 5 5 5 8 6 0 0 0 0 0 0 0 0 0 0 0 01 0 0 0 0 0 0 0 0 0 0 0 0 0 2 3 2 1 4 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 2 0 0 1 1 0 0 0 0 0 1 0 0 1 02

Coalminer (45 Points) A coalminer is trapped in a mine. With him he has a PDA with the updated map of the mine and Ν sticks of dynamite. Write a program that using the map (map.in) calculates a path to get the coalminer out by blowing away rocks whenever necessary, and using at the same time the minimum quantity of dynamite sticks. Input From the keyboard, you are given on the first input line a positive integer number, Ν (where 0 < Ν < 00). From the file map.in, you are given the map, where: on the first line you are given two positive integer numbers i,j (where 5 < i,j < 0). On the next i lines there are j positive integer numbers. Each number represents the number of dynamite sticks needed to be used by the coalminer in order to go through. Starting with numbering of i=0 and j=0, the initial position of the coalminer is always [1,1] and the value 01 is used as a symbol. The exit is always on the position [i-1,j-1] and the value 02 is used as a symbol. Output On the screen, on the first line print the minimum amount of dynamite sticks needed for the coalminer to get out (There will always be a way for the coalminer to get out). On the next line print the coordinates of the points where at least one dynamite stick was used. 2 5 5 5 8 6 0 0 0 0 0 0 0 0 0 0 0 01 0 0 0 0 0 0 0 0 0 0 0 0 0 2 3 2 1 4 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 2 0 0 1 1 0 0 0 0 0 1 0 0 1 02