diff options
author | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2017-02-21 21:09:39 +0700 |
---|---|---|
committer | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2017-02-21 21:09:39 +0700 |
commit | 7d19f480637e9e880b98dabfbcf8e885b0a2d3b9 (patch) | |
tree | fa52914a2e58bc13570839fa297be05b7b7616bf /others/volume1/113.pas | |
parent | f2d4bc6b7c302dee2d84a3acf84b83b5a98c45fa (diff) | |
download | cp-7d19f480637e9e880b98dabfbcf8e885b0a2d3b9.tar.gz |
Update others/volume1
Diffstat (limited to 'others/volume1/113.pas')
-rw-r--r-- | others/volume1/113.pas | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/others/volume1/113.pas b/others/volume1/113.pas new file mode 100644 index 0000000..64d2af5 --- /dev/null +++ b/others/volume1/113.pas @@ -0,0 +1,28 @@ +const + cond: array[0..2] of set of char = ( + ['A', 'H', 'I', 'M', 'O', 'T', 'U', 'V', 'W', 'X', 'Y'], + ['B', 'C', 'D', 'E', 'H', 'I', 'K', 'O', 'X'], + ['H', 'I', 'N', 'O', 'S', 'X', 'Y'] + ); + +var + s: ansistring; + c: char; + b: array[0..2] of boolean; + i: int8; + +begin + readln(s); + for i := 0 to 2 do + b[i] := true; + for c in s do + for i := 0 to 2 do + b[i] := b[i] and (c in cond[i]); + for i := 0 to 2 do + if b[i] then + write('+') + else + write('-'); + writeln +end. +end. |