ΚΤΠΡΙΑΚΟ ΤΝΔΕΜΟ ΠΛΗΡΟΦΟΡΙΚΗ CYPRUS COMPUTER SOCIETY ΠΑΓΚΤΠΡΙΟ ΜΑΘΗΣΙΚΟ ΔΙΑΓΩΝΙΜΟ ΠΛΗΡΟΦΟΡΙΚΗ 17 Αππιλίος 2010



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

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

Ππόβλημα 1: Ανηιζηποθή 2 (Μονάδερ: 20)

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

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

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

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

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

2 Composition. Invertible Mappings

Homework 3 Solutions

Αιγόξηζκνη Γνκή επηινγήο. Πνιιαπιή Δπηινγή Δκθωιεπκέλεο Δπηινγέο. Δηζαγωγή ζηηο Αξρέο ηεο Δπηζηήκεο ηωλ Η/Υ. introcsprinciples.wordpress.

Βάσεις Δεδομέμωμ. Εξγαζηήξην V. Τκήκα Πιεξνθνξηθήο ΑΠΘ

Matrices and Determinants

C.S. 430 Assignment 6, Sample Solutions

Section 8.3 Trigonometric Equations

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

Advanced Subsidiary Unit 1: Understanding and Written Response

ΚΤΠΡΙΑΚΗ ΜΑΘΗΜΑΣΙΚΗ ΕΣΑΙΡΕΙΑ ΜΑΘΗΜΑΣΙΚΗ ΚΤΣΑΛΟΓΡΟΜΙΑ 2007 ΓΙΑ ΣΟ ΓΤΜΝΑΙΟ Παπασκευή 26 Ιανουαπίου 2007 Σάξη: Α Γυμνασίου ΥΟΛΕΙΟ..

Απαντήσεις θέματος 2. Παξαθάησ αθνινπζεί αλαιπηηθή επίιπζε ησλ εξσηεκάησλ.

EE512: Error Control Coding

ΚΤΠΡΙΑΚΗ ΜΑΘΗΜΑΣΙΚΗ ΕΣΑΙΡΕΙΑ ΜΑΘΗΜΑΣΙΚΗ ΚΤΣΑΛΟΓΡΟΜΙΑ 2007 ΓΙΑ ΣΟ ΓΤΜΝΑΙΟ Παπασκευή 26 Ιανουαπίου 2007 Σάξη: Α Γυμνασίου ΥΟΛΕΙΟ..

derivation of the Laplacian from rectangular to spherical coordinates

Finite Field Problems: Solutions

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

Areas and Lengths in Polar Coordinates

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

TOOLBOOK (μάθημα 2) Δεκηνπξγία βηβιίνπ θαη ζειίδσλ ΠΡΟΑΡΜΟΓΗ: ΒΑΛΚΑΝΙΩΣΗ ΔΗΜ. ΕΚΠΑΙΔΕΤΣΙΚΟ ΠΕ19 1 TOOLBOOK ΜΑΘΗΜΑ 2

Συστήματα Διαχείρισης Βάσεων Δεδομένων

H ΜΑΓΕΙΑ ΤΩΝ ΑΡΙΘΜΩΝ

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

ΚΤΠΡΙΑΚΗ ΜΑΘΗΜΑΣΙΚΗ ΕΣΑΙΡΕΙΑ ΜΑΘΗΜΑΤΙΚΗ ΣΚΥΤΑΛΟΓΡΟΜΙΑ 2015 ΓΙΑ ΤΟ ΓΥΜΝΑΣΙΟ Τεηάπηη 28 Ιανουαπίου 2015 ΛΔΥΚΩΣΙΑ Τάξη: Α Γυμναζίου

FSM Toolkit Exercises

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

ΕΡΓΑΣΤΗΡΙΑΚΗ ΑΣΚΗΣΗ 4 ΣΥΝΔΥΑΣΤΙΚΑ ΚΥΚΛΩΜΑΤΑ

Areas and Lengths in Polar Coordinates

ΚΔΦ. 2.4 ΡΗΕΔ ΠΡΑΓΜΑΣΗΚΩΝ ΑΡΗΘΜΩΝ

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

ST5224: Advanced Statistical Theory II

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

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

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

Srednicki Chapter 55

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

ΓΗΑΓΩΝΗΣΜΑ ΣΤΑ ΜΑΘΖΜΑΤΗΚΑ. Ύλη: Μιγαδικοί-Σσναρηήζεις-Παράγωγοι Θεη.-Τετν. Καη Εήηημα 1 ο :

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

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

Inverse trigonometric functions & General Solution of Trigonometric Equations

Example Sheet 3 Solutions

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

Galatia SIL Keyboard Information

Αζκήζεις ζτ.βιβλίοσ ζελίδας 13 14

Cambridge International Examinations Cambridge International General Certificate of Secondary Education

Math 6 SL Probability Distributions Practice Test Mark Scheme

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

LESSON 14 (ΜΑΘΗΜΑ ΔΕΚΑΤΕΣΣΕΡΑ) REF : 202/057/34-ADV. 18 February 2014

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education

Section 7.6 Double and Half Angle Formulas

5.4 The Poisson Distribution.

The challenges of non-stable predicates

Bayesian statistics. DS GA 1002 Probability and Statistics for Data Science.

Homework 8 Model Solution Section

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

Practice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1

1) Formulation of the Problem as a Linear Programming Model

TMA4115 Matematikk 3

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

* * GREEK 0543/02 Paper 2 Reading and Directed Writing May/June 2009

Άζκηζη ζτέζης κόζηοσς-τρόνοσ (Cost Time trade off) Καηαζκεσαζηική ΑΔ

Numerical Analysis FMN011

Strain gauge and rosettes

[1] P Q. Fig. 3.1

Τίτλος Μαθήματος: Ηλεκτρονικοί Υπολογιστές IΙΙ. Διδάσκων: Επίκουρος Καθηγητής Αθανάσιος Σταυρακούδης

Second Order RLC Filters

Paper Reference. Paper Reference(s) 1776/04 Edexcel GCSE Modern Greek Paper 4 Writing. Thursday 21 May 2009 Afternoon Time: 1 hour 15 minutes

ΣΕΙ Δυτικήσ Μακεδονίασ, Παράρτημα Καςτοριάσ Τμήμα Πληροφορικήσ και Τεχνολογίασ Υπολογιςτών

Fractional Colorings and Zykov Products of graphs

EU-Profiler: User Profiles in the 2009 European Elections

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

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

Elements of Information Theory

Constructors and Destructors in C++

Instruction Execution Times

Άσκηση 1 - Μοπυοποίηση Κειμένου

ΚΕΦ. 2.3 ΑΠΟΛΤΣΗ ΣΘΜΗ ΠΡΑΓΜΑΣΘΚΟΤ ΑΡΘΘΜΟΤ

Other Test Constructions: Likelihood Ratio & Bayes Tests

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

The Simply Typed Lambda Calculus

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

Μηχανική Μάθηση Hypothesis Testing

Assalamu `alaikum wr. wb.

Cambridge International Examinations Cambridge International General Certificate of Secondary Education

An Inventory of Continuous Distributions

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

SOAP API. Table of Contents

D Alembert s Solution to the Wave Equation

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

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

( ) 2 and compare to M.

2. THEORY OF EQUATIONS. PREVIOUS EAMCET Bits.

Transcript:

Διάπκεια 3 ώπερ. Να απανηηθούν όλερ οι επωηήζειρ Ππόβλημα 1: ABC (Μονάδερ: 15) Θα ζνπ δίλνληαη από ην πιεθηξνιόγην ηξεηο ζεηηθνί αθέξαηνη Α, Β θαη C. Οη αξηζκνί δελ είλαη απαξαίηεην λα δνζνύλ κε απηή ηε ζεηξά, αιιά ζίγνπξα ν Α ζα είλαη κηθξόηεξνο από ηνλ B θαη ν B κηθξόηεξνο από ηνλ C. Γηα λα ην θάλνπκε πην επράξηζην νπηηθά, λα γξάςεηε έλα πξόγξακκα πνπ λα ηνπο δηαβάδεη θαη λα ηνπο εκθαλίδεη ζηελ νζόλε κε ηε ζεηξά πνπ ζαο δίλνληαη. Η πξώηε γξακκή πεξηέρεη ηξεηο ζεηηθνύο αθέξαηνπο αξηζκνύο Α, B θαη C, όρη απαξαίηεηα ζε απηή ηε ζεηξά. Καη νη ηξεηο αξηζκνί είλαη κηθξόηεξνη ή ίζνη ηνπ 100. Η δεύηεξε γξακκή πεξηέρεη ηξία θεθαιαία γξάκκαηα Α, Β θαη C (ρσξίο θελά δηαζηήκαηα κεηαμύ ηνπο) αληηπξνζσπεύνληαο ηελ επηζπκεηή ζεηξά κε ηελ νπνία ζα πξέπεη λα εκθαλίδνληαη. Μηα κόλν γξακκή κε ηελ επηζπκεηή ζεηξά ησλ αθεξαίσλ A, B θαη C, νη νπνίνη δηαρσξίδνληαη κε έλα θελό δηάζηεκα. Παπαδείγμαηα 1 5 3 ABC 1 3 5 6 4 2 CAB 6 2 4 1 P a g e http://www.pspo.org.cy/

Duration 3 hours Answer all questions Problem 1: ABC (Points: 15) You will be given from the keyboard three positive integers A, B and C. The numbers will not be given in that exact order, but we do know that A is less than B and B less than C. In order to have a more pleasant viewing, write a program to rearrange them and display them on the screen in the given order. The first line contains three positive integers A, B and C, not necessarily in that order. All three numbers will be less than or equal to 100. The second line contains three uppercase letters 'A', 'B' and 'C' (with no spaces between them) representing the desired order. integers A, B and C in the desired order on a single line, separated by a single space. Sample test data 1 5 3 ABC 1 3 5 6 4 2 CAB 6 2 4 2 P a g e http://www.pspo.org.cy/

Ππόβλημα 2: Επαναλήψειρ (Μονάδερ: 15) Να γξαθεί πξόγξακκα ην νπνίν θηίδεη κηα ζθάια από ραξαθηήξεο. Τν πξόγξακκα απηό δέρεηαη σο είζνδν κηα ζπκβνινζεηξά από ην πιεθηξνιόγην, πνπ δελ μεπεξλά ηνπο 78 ραξαθηήξεο. Γηα θάζε ραξαθηήξα εηζόδνπ, ην πξόγξακκα εκθαλίδεη ζε λέα γξακκή ηνλ ραξαθηήξα i θνξέο ζηελ νζόλε (όπνπ i ε ζέζε ηνπ ραξαθηήξα ζηε ζπκβνινζεηξά εηζόδνπ). Η ζπκβνινζεηξά εηζόδνπ πεξηέρεη κόλν ραξαθηήξεο από ην ιαηηληθό αιθάβεην (δειαδή, a-z θαη A-Z) Μηα ζπκβνινζεηξά πνπ λα ηεξεί ηηο πξνδηαγξαθέο ηνπ πξνβιήκαηνο. Παπαδείγμαηα asdf a ss ddd ffff asdad a ss ddd aaaa ddddd 3 P a g e http://www.pspo.org.cy/

Problem 2: Loops (Points: 15) Write a program that builds a staircase of characters. This program accepts as input a string of characters from the keyboard (max length 78 characters). For each input character the program displays a new line on the screen that contains the character i times (where i is the position of the character in the input string). The input string consists only of characters of the Latin alphabet (i.e. a-z and A-Z). A string of characters that complies with the requirements of the problem. Sample test data asdf a ss ddd ffff asdad a ss ddd aaaa ddddd 4 P a g e http://www.pspo.org.cy/

Ππόβλημα 3: Πποκαηαπκηική εκηέλεζη (Μονάδερ: 15) Με ηελ κέζνδν ηεο πξνθαηαξθηηθήο εθηέιεζεο (dry run), θαηαγξάςεηε βήκα-πξνοβήκα ηηο ηηκέο ησλ κεηαβιεηώλ i θαη j κέρξη ηέινπο. Φξεζηκνπνηείζηε ηηο αξρηθέο ηηκέο i =2 θαη j = 6. Function Looping(i, j) if ( i < j ) return ( i * Looping(i+1,j) ); else return i; Ππόβλημα 4: Ανηιζηποθή (Μονάδερ: 25) Να γξάςεηε έλα πξόγξακκα ην νπνίν δηαβάδεη από ην πιεθηξνιόγην κηα γξακκή κήθνπο ην πνιύ 60 ραξαθηήξσλ θαη ηελ ηππώλεη αληεζηξακκέλε. Υπόδεημε: Γηα λα ην πεηύρεη απηό ην πξόγξακκα ζαο ππέπει λα ρξεζηκνπνηήζεη κηα recursive δηαδηθαζία ηελ νπνία ζα νλνκάζεηε PushTheCharacters. Μηα γξακκή πνπ απνηειείηαη από Ν ραξαθηήξεο (όπνπ, 1 Ν 60) Μηα γξακκή πνπ πεξηέρεη ηελ γξακκή εηζόδνπ αληεζηξακκέλε. Παπάδειγμα Ειζόδορ qwerty Εξόδορ ytrewq 5 P a g e http://www.pspo.org.cy/

Problem 3: Dry Run (Μονάδερ: 15) Using the dry run method, write step-by-step the values of the variables i and j until termination. Use initial values i =2 and j = 6. Function Looping(i, j) if ( i < j ) return ( i * Looping(i+1,j) ); else return i; Problem 4: Reverse (Points: 25) Write a program that reads from the keyboard, one line with maximum length 60 characters and prints it in reverse order. Note: You must use a recursive function to achieve this which will be named PushTheCharacters. A line that is composed from N characters (where, 1 N 60) A line that contains the input line reversed. Sample test data qwerty ytrewq 6 P a g e http://www.pspo.org.cy/

Ππόβλημα 5: Κπςθέρ Λέξειρ (Μονάδερ: 30) Να γξάςεηε πξόγξακκα ην νπνίν δηαβάδεη από ην αξρείν edgar.txt κία γξακκή θάζε θνξά. Κάζε γξακκή πεξηέρεη αξηζκό ιέμεσλ νη νπνίεο ρσξίδνληαη κεηαμύ ηνπο κε έλα θελό ραξαθηήξα ή ηειεία. Τν πξόγξακκα ζαο πξέπεη λα ειέγρεη ηε γξακκή θαη λα ηελ εκθαλίδεη ζηελ νζόλε αλ ζε απηή πεξηέρνληαη κία ή πεξηζζόηεξεο από ηηο πην θάησ ιέμεηο, είηε γξακκέλεο θαλνληθά είηε κε ηα γξάκκαηα ηνπο ζε ηπραία δηάηαμε. Λέμεηο πνπ αλαδεηνύληαη: sit, won, to, not Η θάζε γξακκή απνηειείηαη από 80 ην πνιύ ραξαθηήξεο, θαη ιέμεηο απνηεινύληαη ην πνιύ από 15 ραξαθηήξεο. Μ γξακκέο πνπ απνηειείηαη από Ν ραξαθηήξεο (όπνπ, 1 Ν 80, 1 Μ) Κ γξακκέο, νη νπνίεο είλαη νη γξακκέο όπνπ βξέζεθαλ ζε απηέο νη θξπθέο ιέμεηο (K M) Παπάδειγμα Ειζόδορ page now lying before not be found with any integers signal. This has been already too much an object oriented The value cannot be found. There must be an error. The upper regions of the globe have not the. continue to search however its nothing there. Oh this is a sample of a text. To the earth and moon are forever not to its dreams. to its flowers, to its golden goals. perfect and limitless programs exist. it not hang eternally between their loops and programming Εξόδορ page now lying before not be found with any integers The upper regions of the globe have not the. continue to search however its nothing there. To the earth and moon are forever not to its dreams. to its flowers, to its golden goals. perfect and limitless programs exist. it not hang eternally 7 P a g e http://www.pspo.org.cy/

Problem 5: Hidden Words (Points: 30) Write a program that reads from file edgar.txt, one line at a time. Each line consists of a number of words separated by a blank character or a dot. Your program must check each line and display it on the screen if it contains one of the following words, either written correctly or written with their letters in a random order. Words to look for: sit, won, to, not Each line consists of at most 80 characters, and each word of at most 15 characters. M lines that are composed from N characters (where, 1 Ν 80, 1 Μ) K lines, which are the ones in which your program found hidden words. (K M) Sample test data page now lying before not be found with any integers signal. This has been already too much an object oriented The value cannot be found. There must be an error. The upper regions of the globe have not the. continue to search however its nothing there. Oh this is a sample of a text. To the earth and moon are forever not to its dreams. to its flowers, to its golden goals. perfect and limitless programs exist. it not hang eternally between their loops and programming page now lying before not be found with any integers The upper regions of the globe have not the. continue to search however its nothing there. To the earth and moon are forever not to its dreams. to its flowers, to its golden goals. perfect and limitless programs exist. it not hang eternally 8 P a g e http://www.pspo.org.cy/