1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Write a program, 'parens', which gets a command line argument, 'n',
which is an integer. The program should print all the
properly-balanced strings of parentheses of length 2n. For example,
given the argument '3', the program should print these five lines:
((()))
(()())
(())()
()(())
()()()
in some order. (The order is not important.)
For the argument '1'; the output should be:
()
and for argument '4', the output should be:
(((())))
((()()))
((())())
((()))()
(()(()))
(()()())
(()())()
(())(())
(())()()
()((()))
()(()())
()(())()
()()(())
()()()()
in some order.
Bitte auch hier vor Ablauf der 60 Stunden keine Hinweise oder Lösungen posten.
Datumstempel der Mail war: Wed, 01 Sep 2004 12:50:14 -0400
s--Pevna-;s.([a-z]).chr((ord($1)-84)%26+97).gee; s^([A-Z])^chr((ord($1)-52)%26+65)^gee;print;
use strict; use warnings; Link zu meiner Perlseite