From 5d04d167dff89b8ff7e9fd7dd9a0d8d7560a1414 Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Wed, 6 Nov 2019 22:21:11 +0100 Subject: [PATCH] Task for English classes --- TaskE01/description.txt | 18 ++++++++++++++++++ TaskE01/test.exp | 9 +++++++++ TaskE01/test.in | 9 +++++++++ TaskE02/description.txt | 18 ++++++++++++++++++ TaskE02/test.exp | 7 +++++++ TaskE02/test.in | 7 +++++++ TaskE03/description.txt | 18 ++++++++++++++++++ TaskE03/test.exp | 9 +++++++++ TaskE03/test.in | 9 +++++++++ TaskE04/description.txt | 19 +++++++++++++++++++ TaskE04/test.exp | 7 +++++++ TaskE04/test.in | 7 +++++++ blend.sh | 2 +- 13 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 TaskE01/description.txt create mode 100644 TaskE01/test.exp create mode 100644 TaskE01/test.in create mode 100644 TaskE02/description.txt create mode 100644 TaskE02/test.exp create mode 100644 TaskE02/test.in create mode 100644 TaskE03/description.txt create mode 100644 TaskE03/test.exp create mode 100644 TaskE03/test.in create mode 100644 TaskE04/description.txt create mode 100644 TaskE04/test.exp create mode 100644 TaskE04/test.in diff --git a/TaskE01/description.txt b/TaskE01/description.txt new file mode 100644 index 0000000..94ceab4 --- /dev/null +++ b/TaskE01/description.txt @@ -0,0 +1,18 @@ +An upper-case letter and two digits +=================================== + +Note: this task is only for students of "Formal languages and +complexity theory" taught in English. + +[Your program should read lines from the standard input and check each + line separately (without end-of-line character). Please use regular + expressions as much as possible (in particular, try not to use + logical operators outside the regeular expression). If it is + possible, use just one regular expression.] + +For each string from the standard input, check whether if contains a +substring composed of an upper-case letter and 2 digits. Write "true"/"false" +on the standard output accordingly. + +POINTS: 2 +DEADLINE: 2019-11-21 17:00 diff --git a/TaskE01/test.exp b/TaskE01/test.exp new file mode 100644 index 0000000..d255222 --- /dev/null +++ b/TaskE01/test.exp @@ -0,0 +1,9 @@ +true +false +false +true +false +false +false +true +true diff --git a/TaskE01/test.in b/TaskE01/test.in new file mode 100644 index 0000000..fc29212 --- /dev/null +++ b/TaskE01/test.in @@ -0,0 +1,9 @@ +G3923d +G9 +Ha3a5 +Z00 +Z0x0 +az33a +dsdg34 +hahaA39dsdsd +sssssssssssU23 diff --git a/TaskE02/description.txt b/TaskE02/description.txt new file mode 100644 index 0000000..b6b0cd4 --- /dev/null +++ b/TaskE02/description.txt @@ -0,0 +1,18 @@ +No 555 +====== + +Note: this task is only for students of "Formal languages and +complexity theory" taught in English. + +[Your program should read lines from the standard input and check each + line separately (without end-of-line character). Please use regular + expressions as much as possible (in particular, try not to use + logical operators outside the regeular expression). If it is + possible, use just one regular expression.] + +For each string from the standard input, check whether it is a 9-digit +phone number (format "NNN-NNN-NNN" or "NNN NNN NNN"), not beginning +with "555". Write "true"/"false" on the standard output accordingly. + +POINTS: 3 +DEADLINE: 2019-11-21 17:00 diff --git a/TaskE02/test.exp b/TaskE02/test.exp new file mode 100644 index 0000000..7aed87e --- /dev/null +++ b/TaskE02/test.exp @@ -0,0 +1,7 @@ +true +true +true +false +true +false +false diff --git a/TaskE02/test.in b/TaskE02/test.in new file mode 100644 index 0000000..ae3eec2 --- /dev/null +++ b/TaskE02/test.in @@ -0,0 +1,7 @@ +055-555-555 +505-324-555 +551-233-455 +555-123-456 +556 345 667 +556 345 6675 +556 345-667 diff --git a/TaskE03/description.txt b/TaskE03/description.txt new file mode 100644 index 0000000..ab05157 --- /dev/null +++ b/TaskE03/description.txt @@ -0,0 +1,18 @@ +One vowel +========= + +Note: this task is only for students of "Formal languages and +complexity theory" taught in English. + +[Your program should read lines from the standard input and check each + line separately (without end-of-line character). Please use regular + expressions as much as possible (in particular, try not to use + logical operators outside the regeular expression). If it is + possible, use just one regular expression.] + +For each string from the standard input, check whether it is a single +word with exactly one vowel (consider only Latin alphabet). Write +"true"/"false" on the standard output accordingly. + +POINTS: 2 +DEADLINE: 2019-11-21 17:00 diff --git a/TaskE03/test.exp b/TaskE03/test.exp new file mode 100644 index 0000000..4fafe02 --- /dev/null +++ b/TaskE03/test.exp @@ -0,0 +1,9 @@ +false +false +true +false +false +false +true +false +true diff --git a/TaskE03/test.in b/TaskE03/test.in new file mode 100644 index 0000000..6547367 --- /dev/null +++ b/TaskE03/test.in @@ -0,0 +1,9 @@ +223 +aa +dom +html +ostrach +puko +strach +strachy +u diff --git a/TaskE04/description.txt b/TaskE04/description.txt new file mode 100644 index 0000000..ec63be4 --- /dev/null +++ b/TaskE04/description.txt @@ -0,0 +1,19 @@ +Minutes +======= + +Note: this task is only for students of "Formal languages and +complexity theory" taught in English. + +[Your program should read lines from the standard input and check each + line separately (without end-of-line character). Please use regular + expressions as much as possible (in particular, try not to use + logical operators outside the regeular expression). If it is + possible, use just one regular expression.] + +For each string from the standard input, extract minutes from a string +representing an hour ("9:13", "18:44", etc.) and write it on the +standard output. If the input string is not an hour, write "" on +the standard output. + +POINTS: 3 +DEADLINE: 2019-11-21 17:00 diff --git a/TaskE04/test.exp b/TaskE04/test.exp new file mode 100644 index 0000000..d107194 --- /dev/null +++ b/TaskE04/test.exp @@ -0,0 +1,7 @@ +00 +44 +59 + +13 + + diff --git a/TaskE04/test.in b/TaskE04/test.in new file mode 100644 index 0000000..f51fd3b --- /dev/null +++ b/TaskE04/test.in @@ -0,0 +1,7 @@ +0:00 +18:44 +23:59 +25:14 +9:13 +9:61 +x9:13y diff --git a/blend.sh b/blend.sh index fc46ce4..08d54f2 100755 --- a/blend.sh +++ b/blend.sh @@ -19,7 +19,7 @@ cp "${PREFIX}/count-points.pl" arena/ cp "${PREFIX}/overrides.txt" arena/ cp "${PREFIX}/Makefile" arena/ -for TX in X01 X02 X03 X04 B00 B01 B02 # X05 X06 X07 X08 X09 X10 B03 B04 X10 +for TX in X01 X02 X03 X04 B00 B01 B02 E01 E02 E03 E04 # X05 X06 X07 X08 X09 X10 B03 B04 X10 do mkdir -p arena/Task$TX done