Introduction
This is a small challenge I came up with while trying to make some compact code for my younger brother to use. I don't think it's particularly interesting, but I believe it presents some unique challenges because of its limited input/output requirements.
Challenge
I want to enumerate all the characters that my brother can write on his MacOS computer using only his US English keyboard, as they will be read by my Windows device. He does not have Unicode hex input enabled, so I only have to worry about things he can type using combinations of Shift and Alt/Option. These are as follows:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~¡¢£\§ ̈©a«¬® ̄°± ́μ¶· ̧o»¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜßàáâãäåæçèéêëìíîïñòóôõö÷øùúûüÿıŒœŸƒˆˇ ̆ ̇ ̊ ̨ ̃ ̋Ωπ–—‘’‚""„†‡•...‰‹›⁄€TM∂∆∏∑√∞∫≈≠≤≥◊fifl
along with the Apple logo, which my device reads as � (U+FFFD REPLACEMENT CHARACTER). As a list of unicode codepoints, these are
[U+0020, U+0021, U+0022, U+0023, U+0024, U+0025, U+0026, U+0027, U+0028, U+0029, U+002A, U+002B, U+002C, U+002D, U+002E, U+002F, U+0030, U+0031, U+0032, U+0033, U+0034, U+0035, U+0036, U+0037, U+0038, U+0039, U+003A, U+003B, U+003C, U+003D, U+003E, U+003F, U+0040, U+0041, U+0042, U+0043, U+0044, U+0045, U+0046, U+0047, U+0048, U+0049, U+004A, U+004B, U+004C, U+004D, U+004E, U+004F, U+0050, U+0051, U+0052, U+0053, U+0054, U+0055, U+0056, U+0057, U+0058, U+0059, U+005A, U+005B, U+005C, U+005D, U+005E, U+005F, U+0060, U+0061, U+0062, U+0063, U+0064, U+0065, U+0066, U+0067, U+0068, U+0069, U+006A, U+006B, U+006C, U+006D, U+006E, U+006F, U+0070, U+0071, U+0072, U+0073, U+0074, U+0075, U+0076, U+0077, U+0078, U+0079, U+007A, U+007B, U+007C, U+007D, U+007E, U+00A1, U+00A2, U+00A3, U+00A5, U+00A7, U+00A8, U+00A9, U+00AA, U+00AB, U+00AC, U+00AE, U+00AF, U+00B0, U+00B1, U+00B4, U+00B5, U+00B6, U+00B7, U+00B8, U+00BA, U+00BB, U+00BF, U+00C0, U+00C1, U+00C2, U+00C3, U+00C4, U+00C5, U+00C6, U+00C7, U+00C8, U+00C9, U+00CA, U+00CB, U+00CC, U+00CD, U+00CE, U+00CF, U+00D1, U+00D2, U+00D3, U+00D4, U+00D5, U+00D6, U+00D8, U+00D9, U+00DA, U+00DB, U+00DC, U+00DF, U+00E0, U+00E1, U+00E2, U+00E3, U+00E4, U+00E5, U+00E6, U+00E7, U+00E8, U+00E9, U+00EA, U+00EB, U+00EC, U+00ED, U+00EE, U+00EF, U+00F1, U+00F2, U+00F3, U+00F4, U+00F5, U+00F6, U+00F7, U+00F8, U+00F9, U+00FA, U+00FB, U+00FC, U+00FF, U+0131, U+0152, U+0153, U+0178, U+0192, U+02C6, U+02C7, U+02D8, U+02D9, U+02DA, U+02DB, U+02DC, U+02DD, U+03A9, U+03C0, U+2013, U+2014, U+2018, U+2019, U+201A, U+201C, U+201D, U+201E, U+2020, U+2021, U+2022, U+2026, U+2030, U+2039, U+203A, U+2044, U+20AC, U+2122, U+2202, U+2206, U+220F, U+2211, U+221A, U+221E, U+222B, U+2248, U+2260, U+2264, U+2265, U+25CA, U+FB01, U+FB02, U+FFFD]
Your program should take no input and return as output any permutation of the above characters. As such, all of the following are equally valid outputs:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~¡¢£\§ ̈©a«¬® ̄°± ́μ¶· ̧o»¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜßàáâãäåæçèéêëìíîïñòóôõö÷øùúûüÿıŒœŸƒˆˇ ̆ ̇ ̊ ̨ ̃ ̋Ωπ–—‘’‚""„†‡•...‰‹›⁄€TM∂∆∏∑√∞∫≈≠≤≥◊fifl�
�flfi◊≥≤≠≈∫∞√∑∏∆∂TM€⁄›‹‰...•‡†„""‚’‘—–πΩ ̋ ̃ ̨ ̊ ̇ ̆ˇˆƒŸœŒıÿüûúùø÷öõôóòñïîíìëêéèçæåäãâáàßÜÛÚÙØÖÕÔÓÒÑÏÎÍÌËÊÉÈÇÆÅÄÃÂÁÀ¿»o ̧·¶μ ́±° ̄®¬«a© ̈§\£¢¡~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!
'•ö‚›ƒõo≈¶≥πJBè≤‰ˆ®Iã8√=Ÿ"...«PêıÕ*&|UZk£_!œ’uÆ@Ùø¢{Û ̊Óüä^j¡5y- 3(nËN∑ò‡⁄D\S2FhÒîO1ûV6ç,m9ÍæÉ· ̧/◊Êw∆~R)é4áÂ% ̋Úl°ÿG† ̆tKÈ¿Àó∞H]§`rfiñ≠ìzv.¬»©∏ëâgcbØ÷ ̈Ã"eíŒ∂? ́$Ç\�ÁC ̨ïù±ΩaoflÄ}#Îμ„:àßXaMxå€ÔTTM; ̃<qÅ7d∫‹ú‘ˇ+—Ñ0ô[fs–ÏQÖEpÌ ̇LW"ÜAi> ̄Y
_Õz∆h@`òÈmóc|\á∞IŒ›d ̆œ';86åƒ"-§μéX†T·$C.Ú¡Æ ̊BíN{ßtSûe¿âÓ’üZπìa ̃ËKG] ̨±Öb)A"Yx⁄ô*+TMÍQÔı¶0ÜÒ•}4ÿÑ£uêw¢ps– ̄—qøfi‡HÁR 5k[ΩèL"/≈FyJ≠^ ̇€~©fl�ï°V7æúE#öanrM...«WÊ13îgoà◊Ï‘‹ ́ÛÌÉ=» ̈®ÄOÇ∏ˇD(U‚≥Ù‰>v<Ÿõo%√Î∫ç∑Øi2:P&9À„fù≤,∂lj!ë\ň ̧Ãã¬÷ ̋ñä?
The following are invalid outputs:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
(only some of the characters)
D4úÉÄnxJ ]0l"fiƒ‹«:£* ̃∏ضcÃÈ•ír\ ̈(63S ̇ ̊1TMR{u ̋ ́é&"#Õ œGÅ9ÂUîÊ ̄E®øfH–@ãòp†YÜ‚K"!öïsOâXg·NûQaàiÍÓ'o#&ñìÀÔÑŒt√≤ ̆Bæ∫„¿fl°,ˆ€çb\...>Ï◊äw)≈C§;ùkÁμ�eoI¬ÛË›V[`∞≠yÎAzˇ»÷j’ÿÇ<_Ì¡Z-õvÆMΩ∂FWm%⁄L2ß∑‘åÒÚ|=‡≥ê¢Öó~aı+ë$.üq58±∆Ùh/èô^π©—$‰TP%'" ̧Ÿ!7á?}d ̨
(some characters repeated)
‹ìñ∞]~äÓ_1,òètaqÙ|cıiß≥ÜóÎm{;`oÃBÏçyxπ ̆Ç®—âÆÕ©jîOp ̧MV¿éÄT¡êØ∫≠!CΩ≤ ̋ö∂næ+"PÒ⁄‰°∏GÚ?⍼o∆†Y387ドル»AaÅbTMu=‡ÍË�ˇUR@Füμfi◊ør ̇íQe:wkWH46Êv ́œ5flNlȈdã÷Œ ‚\ÉÖ>ú[}•õ≈ù/Û∑ô›%åÿ¶\Ì–Á·¬< ̃ ̊ ̄&ëXà§ ̨ƒï€«2Ñ-'û)‘√À*ÂZ^#Isf0...K." ̈„gh±SL¢$"Dá(’ÔzE9JŸ
(includes a character not in the list, namely ⍼)
Solutions in Python 2 or Python 3 are preferred because Python is my native programming language, but all standard languages, code-golf oriented or otherwise, are allowed (of course, no standard loopholes). Your program must finish within five seconds, and you must provide a link to a resource to run it online. Programs are scored as follows:
- take the length (in bytes) of the UTF-32(-LE) representation of the source code
- if your code gives the same output every time, add
nto its score, wherenis the smallest number of characters you have to remove from its output to make it be sorted in UTF-32 order (either increasing or decreasing) - if it can give different outputs, add
222(the length of the output) to its score. - if your code uses only ASCII characters, you get to (ceiling-)divide its score by 2, so a score of 731 becomes 366.
If your code is bytes rather than characters (as in the case of a custom codepage) and it can be decoded with ASCII then it counts as "ASCII-only"; otherwise each byte is 4 points. An ASCII only solution will score twice its byte count as a baseline, but if its output is scrambled it gets half the penalty points as well.
Please explain how you computed your score. The lowest score wins; ties are broken by length of the UTF-8 encoding of the source code.
Baseline/Example Input and Output
Below is my current best code: Python 2, with a score of 664 (166 UTF-32 codepoints, each 4 bytes, plus 0 for giving the same result every time and that result being in UTF-32 sorted order).
print''.join(map(chr,range(32,127)))+'¡¢£\§ ̈©a«¬® ̄°± ́μ¶· ̧o»¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜßàáâãäåæçèéêëìíîïñòóôõö÷øùúûüÿıŒœŸƒˆˇ ̆ ̇ ̊ ̨ ̃ ̋Ωπ–—‘’‚""„†‡•...‰‹›⁄€TM∂∆∏∑√∞∫≈≠≤≥◊fifl�'
It takes no input and provides as output the following string:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~¡¢£\§ ̈©a«¬® ̄°± ́μ¶· ̧o»¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜßàáâãäåæçèéêëìíîïñòóôõö÷øùúûüÿıŒœŸƒˆˇ ̆ ̇ ̊ ̨ ̃ ̋Ωπ–—‘’‚""„†‡•...‰‹›⁄€TM∂∆∏∑√∞∫≈≠≤≥◊fifl�
-
2\$\begingroup\$ Is there a reason you require this particular website to run Python programs? \$\endgroup\$Command Master– Command Master2024年04月03日 07:25:52 +00:00Commented Apr 3, 2024 at 7:25
-
5\$\begingroup\$ ato.pxeger.com and tio.run are often used in here \$\endgroup\$Command Master– Command Master2024年04月03日 09:21:14 +00:00Commented Apr 3, 2024 at 9:21
-
1\$\begingroup\$ So does an ASCII only solution score twice its byte count? (i.e. ASCII characters times four to get in UTF-32 then ceil divide by two) \$\endgroup\$Jonathan Allan– Jonathan Allan2024年04月03日 19:05:17 +00:00Commented Apr 3, 2024 at 19:05
-
1\$\begingroup\$ Also, if our code is actually bytes rather than characters then how should we score? Many golfing languages use custom code-pages and others use various standard code pages simply to make the code human-readable. Does each byte count for four points? Do we identify bytes 0-127 as "ASCII"? \$\endgroup\$Jonathan Allan– Jonathan Allan2024年04月03日 20:10:06 +00:00Commented Apr 3, 2024 at 20:10
-
1\$\begingroup\$ @JonathanAllan If your code is bytes rather than characters and it can be decoded with ASCII then it counts as "ASCII-only"; otherwise each byte is 4 points. An ASCII only solution will score twice its byte count as a baseline, but if its output is scrambled it gets half the penalty points as well. \$\endgroup\$Mel– Mel2024年04月03日 20:57:50 +00:00Commented Apr 3, 2024 at 20:57
5 Answers 5
Scala 3, 476 code points, 217 bytes in UTF-8
("ıŒœŸƒˆˇ ̆ ̇ ̊ ̨ ̃ ̋Ωπ–—‘’‚""„†‡•...‰‹›⁄€TM∂∆∏∑√∞∫≈≠≤≥◊fifl�".toSet++('!'to'~')++('¡'to'ÿ')×ばつÞýþ").mkString.sorted
The code contains an unprintable soft-hyphen (U+00ad) after the ¦, here is a hexdump:
00000000 28 22 c4 b1 c5 92 c5 93 c5 b8 c6 92 cb 86 cb 87 |("..............|
00000010 cb 98 cb 99 cb 9a cb 9b cb 9c cb 9d ce a9 cf 80 |................|
00000020 e2 80 93 e2 80 94 e2 80 98 e2 80 99 e2 80 9a e2 |................|
00000030 80 9c e2 80 9d e2 80 9e e2 80 a0 e2 80 a1 e2 80 |................|
00000040 a2 e2 80 a6 e2 80 b0 e2 80 b9 e2 80 ba e2 81 84 |................|
00000050 e2 82 ac e2 84 a2 e2 88 82 e2 88 86 e2 88 8f e2 |................|
00000060 88 91 e2 88 9a e2 88 9e e2 88 ab e2 89 88 e2 89 |................|
00000070 a0 e2 89 a4 e2 89 a5 e2 97 8a ef ac 81 ef ac 82 |................|
00000080 ef bf bd 22 2e 74 6f 53 65 74 2b 2b 28 27 21 27 |...".toSet++('!'|
00000090 74 6f 27 7e 27 29 2b 2b 28 27 c2 a1 27 74 6f 27 |to'~')++('..'to'|
000000a0 c3 bf 27 29 2d 2d 22 c3 b0 c3 9d c2 a4 c2 a6 c2 |..')--".........|
000000b0 ad c2 b2 c2 b3 c2 b9 c2 bc c2 bd c2 be c3 90 c3 |................|
000000c0 97 c3 9e c3 bd c3 be 22 29 2e 6d 6b 53 74 72 69 |.......").mkStri|
000000d0 6e 67 2e 73 6f 72 74 65 64 |ng.sorted|
000000d9
-
\$\begingroup\$ Shouldn't it be 219 UTF-8 bytes? \$\endgroup\$Mel– Mel2024年04月03日 17:21:23 +00:00Commented Apr 3, 2024 at 17:21
-
\$\begingroup\$ ATO and wc both say 217, and the hexdump also has 217 bytes, Why should it be 219? \$\endgroup\$corvus_192– corvus_1922024年04月03日 17:25:20 +00:00Commented Apr 3, 2024 at 17:25
-
\$\begingroup\$ The only way I can get it to be 476 points is if I copy your code and manually add a U+00AD after the ¦, which puts it at 219 UTF-8 bytes. \$\endgroup\$Mel– Mel2024年04月03日 17:29:28 +00:00Commented Apr 3, 2024 at 17:29
-
\$\begingroup\$ The code has a test case and works as-is. If you copy the
¦²and paste it intowc -c, it's 6 bytes, two per character. The 476 is the number I got fromiconv. \$\endgroup\$corvus_192– corvus_1922024年04月03日 17:33:10 +00:00Commented Apr 3, 2024 at 17:33 -
\$\begingroup\$ Okay that explains it. Thanks! \$\endgroup\$Mel– Mel2024年04月03日 17:37:11 +00:00Commented Apr 3, 2024 at 17:37
Python 3.8, 256 bytes, ASCII only, sorted: score = 512
c=31
J=''.join
print(J(J(chr(c:=c+dict(enumerate((54583,7251,308,869,204,1275,224),120)).get(j,j))for _ in'.'*m)for j,m in zip(b'''#2!%z|y
hv~ \x0d{x}''',b"_"+b''*22)))
(...there are many unprintable ASCII characters.)
Hex:
63 3d 33 31 0a 4a 3d 27 27 2e 6a 6f 69 6e 0a 70 |c=31.J=''.join.p|
72 69 6e 74 28 4a 28 4a 28 63 68 72 28 63 3a 3d |rint(J(J(chr(c:=|
63 2b 64 69 63 74 28 65 6e 75 6d 65 72 61 74 65 |c+dict(enumerate|
28 28 35 34 35 38 33 2c 37 32 35 31 2c 33 30 38 |((54583,7251,308|
2c 38 36 39 2c 32 30 34 2c 31 32 37 35 2c 32 32 |,869,204,1275,22|
34 29 2c 31 32 30 29 29 2e 67 65 74 28 6a 2c 6a |4),120)).get(j,j|
29 29 66 6f 72 20 5f 20 69 6e 27 2e 27 2a 6d 29 |))for _ in'.'*m)|
66 6f 72 20 6a 2c 6d 20 69 6e 20 7a 69 70 28 62 |for j,m in zip(b|
27 27 27 01 23 01 02 01 02 01 03 01 02 01 04 01 |'''.#...........|
02 01 02 01 03 01 02 01 03 32 21 01 25 1a 7a 01 |.........2!.%.z.|
11 01 7c 17 79 01 04 01 02 01 02 01 04 0a 09 01 |..|.y...........|
0a 68 76 7e 04 09 02 09 04 5c 78 30 64 1d 18 04 |.hv~.....\x0d...|
01 7b 78 01 7d 27 27 27 2c 62 22 5f 01 02 02 05 |.{x.}''',b"_....|
01 03 01 04 01 01 01 10 01 05 01 04 01 10 01 0b |................|
01 01 01 01 01 01 01 01 01 05 01 01 01 01 01 02 |................|
01 02 01 02 22 2b 62 27 01 27 2a 32 32 29 29 29 |...."+b'.'*22)))|
Vyxal 3, 147 bytes
"λʀ)0M1""bRJÞpṖ∨";ƛɸ−]⌊\:ꜝI$v8p:W∦ꜝv...pf"b†5%"ɸ2v82p"cam↑+ṫa"ɸ0p2v87p"b1|∦ỊṚỊ"ɸ−"f−["ɸ−v8p~5%~bɸ:ꜝ~≈ꜝWf⌊OkP1617R"fZ|ȧẋc±μ>Bfo&"ɸ2H1⁄2⌊f161+ṡO+"≥≤≠"W∑S
Output is sorted and only uses vyxal codepage. Took nearly 45 minutes to build... Uses the fact that most numbers are in a specific range, or are in ranges of length 2 or 3 with common prefixes.
explanation (old)
"λʀ)0M1""bRJÞpṖ∨";ƛɸ−]\⌊:ꜝI$v8p⌊:W∦ꜝv...pf"b†5%"ɸ2v82p⌊"cam↑+ṫa"ɸ0p2v87p"b1|∦ỊṚỊ"ɸ−⌊"f−["ɸ−v8p~5%~bɸ:ꜝ~≈ꜝWf⌊OkP1617R"fZ|ȧẋc±μ>Bfo&"ɸ2H1⁄2⌊f161+ṡO+"≥≤≠"W∑S
"λʀ)0M1" # compressed number 210216220224240
#
#
"bRJÞpṖ∨" # compressed number 338710728730732
; # pair the two
ƛɸ−] # stringify, split into chunks of 3
\ # push the two lists of three
⌊: # convert to number, duplicate,
ꜝI # increment and interleave
$v8p # swap top of stack and prepend an 8 to each
⌊: # convert to number and duplicate
W∦ # parallel apply to the bottom copy and wrap
v... # increment twice
ꜝ # increment once
pf # prepend to the other list, flatten
#
"b†5%" # compressed number 30495060
ɸ2v82p⌊ # split into pairs with an 82 prepended and converted to numbers
"cam↑+ṫa" # compressed 610192130344776
ɸ0p2 # prepend a zero, split into pairs
v87p # prepend 87 to each
"b1|∦ỊṚỊ" # 305376402937960 compressed
#
ɸ−⌊ # split into triplets as numbers
"f−[" # 364482 compressed
ɸ−v8p # split into thirds with an 8 prepended
~5% # 9674
~bɸ # 64257
:ꜝ # duplicated and incremented
~≈ꜝ # 65533
Wf⌊O # wrap the whole stack, flatten, floor, convert to character
kP # all printable ascii chars
⌊f161+ # convert to pairs and split
"fZ|ȧẋc±μ>Bfo&" # 351217182427282947546061799293 compressed
ɸ2H1⁄2 # split into pairs, split the first pair in half
161+ # add 161
1617R # range 161-256
ṡO # set difference, convert to characters
+ # add to ascii chars
"≥≤≠" # string "≥≤≠"
W∑S # wrap stack, sum and sort
💎
Created with the help of Luminespire.
-
\$\begingroup\$ "≠≥≤" can be put in as a string, as well as any other vyxal codepage chars that arent part of a range or make up the entire range... I personally won't do this tonight but maybe soon \$\endgroup\$pacman256– pacman2562024年04月03日 19:08:31 +00:00Commented Apr 3, 2024 at 19:08
-
\$\begingroup\$ I guess that this scores 600? \$\endgroup\$Jonathan Allan– Jonathan Allan2024年04月03日 19:49:30 +00:00Commented Apr 3, 2024 at 19:49
-
\$\begingroup\$ @JonathanAllan maybe? i'm not really sure how scoring works with sbcs \$\endgroup\$pacman256– pacman2562024年04月03日 20:02:10 +00:00Commented Apr 3, 2024 at 20:02
-
1\$\begingroup\$ Me neither really. The description starts with "take the length (in bytes) of the UTF-32(-LE) representation of the source code" which I would think applies to any encoding, including ASCII as per my question under the OP. Even if not then I think you'd be limited to the first 127 bytes to stick within ASCII (and then maybe that would still be multiplied by 2, again as per my question)... we shall see I suppose. \$\endgroup\$Jonathan Allan– Jonathan Allan2024年04月03日 20:06:18 +00:00Commented Apr 3, 2024 at 20:06
-
\$\begingroup\$ in theory i could use vyxal literate mode to make it ascii only but that would be kind of a pain? \$\endgroup\$pacman256– pacman2562024年04月03日 20:17:27 +00:00Commented Apr 3, 2024 at 20:17
Charcoal -v, 269 printable ASCII bytes, sorted, score 538
forMap"A-!?,!b-!d,!f,!h-!m,!o-!r,!u-!y,!{-!|,\"!-\"1,\"3-\"8,\":-\">,\"A-\"Q,\"S-\"^,\"a,#4,#U-#V,#{,6,ドル'M-'N,'_-'d,)r,**,vI-vJ,vN-vP,vR-vT,vV-vX,v,円vf,vo-vp,vz,x,ドルy;,{],{a,{j,{l,{u,{y,|',|D,|,円|`-|a,!&o,'+E-'+F,'8n"/","Mapi/"-"ChrBaseStringl,g:UpInclusiveRangeMiniMaxi
Try it online! Works by converting from base 95. Ungolfed:
for (Map(Split("A-!?,!b-!d,!f,!h-!m,!o-!r,!u-!y,!{-!|,\"!-\"1,\"3-\"8,\":-\">,\"A-\"Q,\"S-\"^,\"a,#4,#U-#V,#{,6,ドル'M-'N,'_-'d,)r,**,vI-vJ,vN-vP,vR-vT,vV-vX,v,円vf,vo-vp,vz,x,ドルy;,{],{a,{j,{l,{u,{y,|',|D,|,円|`-|a,!&o,'+E-'+F,'8n"),
","), Map(Split(i, "-"), Character(BaseString(l, g)))))
Print(:Up, InclusiveRange(Minimum(i), Maximum(i)));
Charcoal's parser doesn't like consecutive variable names so I need to leave a separator between l and g. Chr, Min and Max are just permitted abbreviations, while / is actually infix Divide, which is overloaded to be Split on strings.
Charcoal, 113 code points, sorted, score 452
Φγκ¡¢£\↑... ́§¦¦® ̄° ́±↑...· ́ ́¦ ̧¦o ́»↑... ́¿¦Ð¦ÑÒÓÔÕÖØÙÚÛÜ↑...ߦð↑...ñ¦ü¦ýıŒœŸƒˆˇ↑... ̆¦˞¦Ω ́π–—‘’‚ ́" ́""y„†‡•...‰‹›⁄€TM∂∆∏∑√∞∫≈≠≤≥◊fifl�
Attempt This Online! Explanation: Characters that are in Charcoal's code page need to be quoted with ́ to be interpreted as part of a string literal. This is the only way that " can be printed, but I do get to save two byte by using a "y quoted string literal at the end of the program as I can omit the closing quote. The five longest subranges (the individual characters need to be separated with ¦s except for the two adjacent subranges) are printed using ranges, and the initial printable ASCII is extracted from a predefined variable.