Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
28
Task/ABC-Problem/ERRE/abc-problem.erre
Normal file
28
Task/ABC-Problem/ERRE/abc-problem.erre
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
PROGRAM BLOCKS
|
||||
|
||||
!$INCLUDE="PC.LIB"
|
||||
|
||||
PROCEDURE CANMAKEWORD(WORD$)
|
||||
LOCAL B$,P%
|
||||
B$=BLOCKS$
|
||||
PRINT(WORD$;" -> ";)
|
||||
P%=INSTR(B$,CHR$(ASC(WORD$) AND $DF))
|
||||
WHILE P%>0 AND WORD$>"" DO
|
||||
CHANGE(B$,P%-1+(P% MOD 2),".."->B$)
|
||||
WORD$=MID$(WORD$,2)
|
||||
EXIT IF WORD$=""
|
||||
P%=INSTR(B$,CHR$(ASC(WORD$) AND $DF))
|
||||
END WHILE
|
||||
IF WORD$>"" THEN PRINT("False") ELSE PRINT("True") END IF
|
||||
END PROCEDURE
|
||||
|
||||
BEGIN
|
||||
BLOCKS$="BOXKDQCPNAGTRETGQDFSJWHUVIANOBERFSLYPCZM"
|
||||
CANMAKEWORD("A")
|
||||
CANMAKEWORD("BARK")
|
||||
CANMAKEWORD("BOOK")
|
||||
CANMAKEWORD("TREAT")
|
||||
CANMAKEWORD("COMMON")
|
||||
CANMAKEWORD("SQUAD")
|
||||
CANMAKEWORD("Confuse")
|
||||
END PROGRAM
|
||||
Loading…
Add table
Add a link
Reference in a new issue