From 7d19f480637e9e880b98dabfbcf8e885b0a2d3b9 Mon Sep 17 00:00:00 2001 From: Raphael McSinyx Date: Tue, 21 Feb 2017 21:09:39 +0700 Subject: Update others/volume1 --- others/volume1/113.pas | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 others/volume1/113.pas (limited to 'others/volume1/113.pas') 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. -- cgit 1.4.1