This guide has been created to share ideas for finding the shortest solutions and the shortest unbounded-input solutions in A = B. If you have any ideas, please feel free to share them in the comments.
Note: "unbounded-input" refers to a solution that is able to operate even when the input exceeds the limits specified in the problem (such as input string length or input number). In such cases, the string length limit (255) and the time limit (100000) are disregarded. This unbounded-input regulation originated from voickas's guide, "Length-agnostic solutions".
このガイドは、ゲーム「A=B」の問題における「最も行数が短い解法」と「入力上限がなくても動作する解法の中で最短の解法」を見つけるために作成しました。何かアイデアがあれば、ぜひコメントで共有してください。
※ここで言う「入力上限がなくても動作する解法 (unbounded-input solution)」とは、入力文字列の長さや入力値の上限を超える入力が与えられても、理論上 (string length limit (255) や time limit (100000) を無視することで) 動作可能な解法を意味する。正攻法とも言う。
Records
・(?/?) indicates the record for the shortest solutions.
・[?/?] indicates the record for the shortest unbounded-input solutions.
・If [?/?] is absent, (?/?) represents both.
Chapter 1: A=B
1-1 (1/1)
1-2 (3/3)
1-3 (3/3)
1-4 (2/2)
1-5 (3/3)
1-6 (4/4)
Chapter 2: Keyword
2-1 (1/1)
2-2 (4/4)
2-3 (5/5)
2-4 (6/6)
2-5 (8/10)
2-6 (7/13)
2-7 (5/8) [8/8]
2-8 (7/11) [9/11]
2-9 (7/9) [9/9]
Chapter 3: Start and End
3-1 (2/2)
3-2 (2/2)
3-3 (4/4)
3-4 (3/4)
3-5 (6/7)
3-6 (10/11)
3-7 (7/8)
Chapter 4: Once Upon A Time
4-1 (1/1)
4-2 (3/3)
4-3 (4/4)
4-4 (4/5) [5/5]
4-5 (7/7)
4-6 (5/6) [6/6]
4-7 (6/7)
4-8 (8/11)
4-9 (4/5) [5/5]
4-10 (6/8)
4-11 (8/9)
4-12 (5/9) [6/9]
4-13 (7/10) [8/10]
4-14 (7/15) [9/15]
4-15 (7/13) [9/13]
4-16 (4/9) [5/9]
Chapter 5: Math
5-1 (3/7)
5-2 (4/4)
5-3 (5/9) [6/9]
5-4 (5/8)
5-5 (8/28) [10/28]
5-6 (10/40) [12/40]
Chapter 6: Aftermath
6-1 (4/4)
6-2 (9/24)
6-3 (6/13) [9/13]
Summary
Chapter 1 (16/16)
Chapter 2 (50/67) [57/67]
Chapter 3 (34/38)
Chapter 4 (86/122) [96/122]
Chapter 5 (35/96) [40/96]
Chapter 6 (19/41) [22/41]
Total (240/380) [265/380]
━ ━ ━ ━ ━ ━ ━ ━ ━ ━
⚠️ Spoilers Ahead ⚠️
━ ━ ━ ━ ━ ━ ━ ━ ━ ━
Chapter 1: A=B
1-1 A to B (1/1)a=b
1-2 Uppercase (3/3)a=A
b=B
c=C
1-3 Singleton (3/3)aa=a
bb=b
cc=c
1-4 Singleton 2 (2/2)aaa=aa
aa=
1-5 Sort (3/3)ba=ab
ca=ac
cb=bc
1-6 Compare (4/4)ab=
ba=
aa=a
bb=b
Chapter 2: Keyword
2-1 Hello World (1/1)=(return)helloworld
2-2 AAA (4/4)b=
c=
aaa=(return)true
=(return)false
2-3 Exactly Three (5/5)b=a
c=a
aaaa=(return)false
aaa=(return)true
=(return)false
2-4 Remainder (6/6)b=a
c=a
aaaa=a
aaa=0
aa=2
a=1
2-5 Odd (8/10)a=|--
b=-|-
c=--|
|--|--|=|
-|-|-=|---|
--||--=|----|
|--|=(return)false
=(return)true
2-6 The Only (7/13)a=eteteeeteeteete
b=eteeteteeeteete
c=eteeteeteteeete
eeeteeteeteet=e
eteteee=teteruee
ete=
te=(return)false
2-7 Ascend (5/8)aaaaaaaaac=
ca=ac
b=aaaaaaaa
aaaaaacc=(return)true
=(return)false
(unbounded) [8/8]ba=ab
ca=ac
cb=bc
b|=|b
bc=|
a|=
|c=(return)true
=(return)false
2-8 Most (7/11)ba=ab
ca=ac
cb=bc
aaaa=(return)a
bbbb=(return)b
ccc=(return)c
=abc
(unbounded) [9/11]|b=a|
|c=b|
||||a=|
|a=c|
a|||=a
|||||||||||=(return)c
||||||||||=(return)b
|||||||||=(return)a
=||||
2-9 Least (7/9)ba=ab
ca=ac
cb=bc
abc=(return)b
aab=(return)c
bc=(return)a
=ab
(unbounded) [9/9]|b=a|
|c=b|
||||a=|
|a=c|
||||||=(return)c
|||||=(return)b
||||=(return)a
|||=
=||||
Chapter 3: Start and End
3-1 Remove (2/2)(start)a=
(end)a=
3-2 Spin (2/2)(start)b=(end)b
(start)c=(end)c
3-3 A to B 2 (4/4)(start)a=(end)<
(end)a=(start)>
<=(start)b
>=(end)b
3-4 Swap (3/4)(end)b=(start)|b
|ba=(end)|ab
|=
3-5 Match (6/7)b=|a||
c=||a|
(start)|=(end)|
(end)a|||=(return)true
(end)|=(return)false
=(return)true
3-6 Most 2 (10/11)ab=(end)|c
ba=(end)|c
ca=ac
cb=bc
c|c=(end)|
ac=(end)|
bc=(end)|
a|=aa
b|=bb
|=c
3-7 Palindrome (7/8)b=a|a|
c=a|aa|
a|-=
--=(return)false
(start)a|=(end)-
(start)a=(end)|-
=(return)true
Chapter 4: Once Upon A Time
4-1 Hello 2 (1/1)(once)=hello
4-2 Remove 2 (3/3)(once)a=
(once)a=
(once)a=
4-3 Cut (4/4)(once)=|||
|a=
|b=
|c=
4-4 Remove 3 (4/5)(once)=(end)cccccccccccccccccccccccc
bcccccccc=ccccccccb
acccccccc=
cccccccc=
(unbounded) [5/5](once)=(end)|||
b|=|b
c|=|c
a|=
|=
4-5 Reverse (7/7)(once)=<
a<=(start)a
b<=(start)b
c<=(start)c
<a=(end)<a
<b=(end)<b
<c=(end)<c
4-6 Reverse 2 (5/6)(once)=<<<<<<<
<a=(start)a
<b=(start)b
<c=(start)c
<=
(unbounded) [6/6](once)=,
<a=(start)a
<b=(start)b
<c=(start)c
,<=
,=,<
4-7 Cut 2 (6/7)(once)=||||||||||||
|b=a
|c=b
||||a=c|||
||=|
|a=
4-8 Clone (8/11)(once)=>>>
<a=(start)a
<b=(start)b
<c=(start)c
>a=(end)<aa
>b=(end)<bb
>c=(end)<cc
(once)=<<<
4-9 A to B 3 (4/5)(once)=cccccccc
cccccccca=bcccccccc
ccccccccb=acccccccc
cccccccc=
(unbounded) [5/5](once)=|
|a=b|
|b=a|
|c=c|
|=
4-10 Half (6/8)(once)=|||
|b=a|
|c=b|
||||a=c|
|a=||||
|=
4-11 Clone 2 (8/9)(once)=(end)|
>a=(end)a
>b=(end)b
>c=(end)c
a|=|>|aa
b|=|>|bb
c|=|>|cc
|=
4-12 To B or not to B (5/9)(once)b=abbbbbbbb
cbbbbbbbb=bbbbbbbbc
abbbbbbb=(end)bbbbbbbb
bbbbbbbb=
a=c
(unbounded) [6/9](once)b=a|b
b|=|b
c|b=|bc
a|=(end)|b
|b=
a=c
4-13 Center (7/10)(once)=>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>a=(end)a
>b=(end)b
>c=(end)c
(start)a=(return)a
(start)b=(return)b
(start)c=(return)c
(unbounded) [8/10]a=,,,,,/
b=,,,,/
c=,,,/
,,,,,,/=
/,,,=,,,/
,,,,,=(return)a
,,,,=(return)b
,,,=(return)c
4-14 Center 2 (7/15)(once)=(end)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<c<c<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
a<=(start)a
b<=(start)b
ac<c=ccc<
bc<c=ccc<
c<=(start)c
(once)ccc=
(unbounded) [9/15](once)=/, ,,
,,a=(end),/aa
,,b=(end),/bb
,,c=(end),/cc
,=(start),
= ,, ,,
,/a=
,/b=
,/c=
4-15 Expansion (7/13)(once)=|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|b=a|
|c=b|
||||||||||||||||||a=a|||||||||||||||
||||a=|aa
|a=c|
|=
(unbounded) [9/13](once)=||-||-
||-a=(end)|-|a|-|
||-b=(end)|-|b|-|
||-c=(end)|-|c|-|
a|-||-|b|-||-|c=(start)|||-|-
-||-|a=|-||-||-abcaa
-||-|b=|-||-||-abcbb
-||-|c=|-||-||-abccc
|-|=
4-16 Merge (4/9)a,,=(start)a
b,,=(start)b
>=(end),
,=>>>,,>>,,>>,,>>,,>>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
(unbounded) [5/9]>,,,a=(end)a
>,,,b=(end)b
,>=(start)>,,,
>,,,,,=
,=,>,,
Chapter 5: Math
5-1 Count (3/7)a1=1aa
a0=1a
1=a
5-2 A+1 (4/4)(once)=(end)a
1a=a0
0a=1
a=1
5-3 A+B (5/9)(once)=||||||||||||||||||||||||||||||
1+11111=+111110
0+11111=1
+11111=1
|=(end)+11111
(unbounded) [6/9]+++11=1+++1+++1
+++10=1+++1
1++1=++10
0++1=1
++=
+=++++
5-4 A-B (5/8)-1|0-10=(start)-1|0-1
-1|0-1=
1|=(end)|0-1|0-10-1
0|0=|01
-=|0--1|0-1
5-5 A*B (8/28)10000000000=00000000001|
|0000000000=0000000000|
0100000|||||||||||||||||||||||||||=(start)0
1100000|||||||||||||||||||||||||||1=100000|||||||||||||||||||||||||||10
(start)0=
(start)|=(end)0000000000
|=1000000100000||||||||||||||||||||||||||||||||||||||||||||||||||||||1
*=||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(unbounded) [10/28]0|<1=1|0|<
0|<|=|0|<
|<0=0|<
0|=1
(start)0=
1<=(start)0
0<0=<01
(start)1*=
*=<0*0|<
|=<|0
5-6 A/B (10/40)(once)=(end)/////1,////////////////////////////////////////////////////////////////// // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /,//////////////////////////////////////////////////////////////////
///1,////////////////////////////////////////////////////////////////// /=(start)///1/1,////////////////////////////////////////////////////////////////,/
///1/ /=///1
0//=//1
/1//1=/1
1//=0
/// /=
////////////////////////////////////////////////////////////////,////1/1,//=(end)1,//////////////////////////////////////////////////////////////////
=(end) //
1/1,= /11111
(unbounded) [12/40](once)=(end)///0//0///
,1//,1=(end),1/
0////,1/0///=////,1/0///1
1////,1/0///0=(end)0///
/1////,1/0//=
1////,1/0///=0
////,1=///
///0=(start)0,1/1////,1/0///
//=////,1/0/////,1/
1,1/=,1/0
0,1/=1
,1/=1
Chapter 6: Aftermath
6-1 Hello Again (4/4)b=a
c=a
da=d
a=helloworld
6-2 Palindrome 2 (9/24)eeeeeeteee=te
eet=tee
teeeee=
ea=ettette
b=aatttetetettettttete
c=aatttetetettttetetettttete
aa=true
te=eeeee
truee=false
6-3 To B or not to B 2 (6/13)a=ccccccc|ccccccc
ccccccc|cccccccccccccccccccc=b
cccccccccccccccccccc|ccccccc=b
cccccccb=ccccccccccccccccccccb
bccccccc=bcccccccccccccccccccc
ccccccc|cccccc=
(unbounded) [9/13]|a|c|cc=c|a|c|c
|a|c|ca=a|a|c|c
|c|a|c|cb=|cb
b|=b|a|c|
a|c|=
c|=|c
a|c=b
|=|a|c|c|a|c|
a=|ca
Workshop: Kazuei's Problems
Below are the problems I submitted to the workshop. Challengers welcome!
https://steamcommunity.com/sharedfiles/filedetails/?id=3456583893
k-1 SubtractionNo solutions have been provided yet.
k-2 SummationNo solutions have been provided yet.
k-3 Square Root No solutions have been provided yet.
k-4 LogarithmNo solutions have been provided yet.
k-5 Fibonacci SequenceNo solutions have been provided yet.
k-6 Greatest Common DivisorNo solutions have been provided yet.
k-7 Least Common MultipleNo solutions have been provided yet.
k-8 Prime FactorizationNo solutions have been provided yet.
k-9 Lexicographic OrderNo solutions have been provided yet.
k-10 A=B by A=BNo solutions have been provided yet.
k-11 Decimal to RomanNo solutions have been provided yet.
k-12 Binary to RomanNo solutions have been provided yet.