text:
Japanese pitch accent numbers

Your challenge is to turn a Japanese word and a dictionary pitch accent number into a new string where the rises and falls in pitch are marked: e.g. (2, ウシロ) → ウ/シ\ロ.
To help you out with this, I'll explain a little about Japanese phonology.

Background: on moras
For the purpose of this challenge, we will write Japanese words in katakana, the simplest Japanese syllabary. A word consists of one or more moras, each of which consists of

one of:
アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワンッガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポ

optionally followed by one of:
ャュョ

For example, シャッキン consists of 4 moras: シャ, ッ, キ, ン.
※ The three optional characters are small versions of katakana ヤユヨ (ya yu yo).　 For example, キャ is ki + small ya, pronounced kya (1 mora), whereas キヤ is kiya (2 moras).
Background: pitch accents
Japanese words are described by a certain contour of high and low pitches. For example, ハナス (hanasu, speak) is pronounced
   ナ
  /  \
ハ    ス–···

meaning the pitch goes up after ハ ha, then falls after ナ na, and stays low after ス su.(That is to say: Unaccented grammar particles after su will be low again).
We might describe this contour as “low-high-low-(low…)”, or LHL(L) for short.
In a dictionary, the pitch of this word would be marked as 2, because the pitch falls after the second mora. There are a few possible pitch patterns that occur in Tōkyō dialect Japanese, and they are all given a number:

0, which represents LHHH…HH(H). This is heibangata, monotone form.
   イ–バ–ン–···                ···
  /                  or       /
ヘ                          ナ

1, which represents HLLL…LL(H). This is atamadakagata, “head-high” form.
イ                          キ
  \                  or       \
   ノ–チ–···                   ···

n ≥ 2, which represents LHHH… (length n) followed by a drop to L…L(L).For example, センチメエトル has pitch accent number 4:
   ン–チ–メ
  /       \
セ         エ–ト–ル–···

Such a word must have ≥ n moras, of course.

※ Note the difference between ハシ [0] and ハシ [2]:
   シ–···                シ
  /            vs       /  \
ハ                    ハ     ···

You can hear the different pitch accent numbers demonstrated here ♪.
The challenge
Given an integer n ≥ 0 (a pitch accent number as above) and a valid word of at least n moras, insert / and \ into it at points where those symbols would occur in the diagrams above; i.e. at points in the word where the pitch rises or falls.
The output for (2, ハナス) would be:
ハ/ナ\ス

And the output for (0, ヘイバン) would be:
ヘ/イバン

Remember: you must correctly handle sequences like キョ or チャ as a single mora. The output for (1, キョウ) is キョ\ウ, not キ\ョウ.

Instead of / and \, you may pick any other pair of distinct, non-katakana Unicode symbols.

This is code-golf: the objective is to write the shortest solution, measured in bytes.
Test cases
One per line, in the format n word → expected_output:
0 ナ → ナ/
0 コドモ → コ/ドモ
0 ワタシ → ワ/タシ
0 ガッコウ → ガ/ッコウ
1 キ → キ\
1 キヤ → キ\ヤ
1 キャ → キャ\
1 ジショ → ジ\ショ
1 チュウゴク → チュ\ウゴク
1 ナニ → ナ\ニ
1 シュイ → シュ\イ
1 キョウ → キョ\ウ
1 キャンバス → キャ\ンバス
2 キヨカ → キ/ヨ\カ
2 キョカ → キョ/カ\
2 ココロ → コ/コ\ロ
2 ジテンシャ → ジ/テ\ンシャ
3 センセイ → セ/ンセ\イ
3 タクサン → タ/クサ\ン
4 アタラシイ → ア/タラシ\イ
4 オトウト → オ/トウト\
6 ジュウイチガツ → ジュ/ウイチガツ\

Generated by this reference solution.

So there's nothing like 8 ジュウイチガツ?

@l4m2 That's correct. ジュウイチガツ only has 6 moras, so there can't be a pitch drop "after the 8th mora of the word."

Retina 0.8.2, 68 bytes (UTF-8)
\d+(.[ャュョ]?)
$1/$&$*1\
/1\b

/.
/
+`1(1*.)(.[ャュョ]?)
$2$1

Try it online! Link includes test cases. Explanation:
\d+(.[ャュョ]?)
$1/$&$*1\

Convert the number to unary, wrap it in /\, and insert it after the first mora.
/1\b

If the number was 1, then delete it and the /, leaving the \.
/.
/

Subtract 1 from the number, but in the case of 0, this deletes the \, leaving the /.
+`1(1*.)(.[ャュョ]?)
$2$1

Move the \ one mora to the right for each remaining 1.

Jelly, 32 bytes
O%62ḟ€“579‘œṗ⁸Ḋ⁹‘+Ị$,2¤œṖżCØ.ḟƊ}

A full program accepting a list of characters and a non-negative integer which prints using 0 for / and 1 for \.
Try it online! Or see the test-suite.
How?
O%62ḟ€“579‘œṗ⁸Ḋ⁹‘+Ị$,2¤œṖżCØ.ḟƊ} - Main Link: list of characters S, integer N
O                                - convert to ordinals
 %62                             - modulo by 62
      “579‘                      - code-page indices list = [53,55,57]
                                 -   (representing the three optional characters)
     €                           - for each ordinal:
    ḟ                            -   filter discard if in [53,55,57]
             ⁸                   - chain's left argument, S
           œṗ                    - partition before truthy indices
                                 -   (so before the non optional character positions)
              Ḋ                  - dequeue (remove the leading empty list)
                       œṖ        - partition at indices...
                      ¤          - nilad followed by (links) as a nilad:
               ⁹                 -   chain's right argument, N
                ‘                -   increment
                   $             -   last two links as a monad:
                 +               -     add
                  Ị              -     insignificant? (1 if 1; 0 if 2+)
                    ,2           -   pair with 2
                               } - use right argument, N, for...
                              Ɗ  - last three links as a monad:
                          C      -   compliment = 1-N
                             ḟ   -   filter discard if in...
                           Ø.    -   bits = [0,1]
                                 -     (i.e. if N=0:[0], if N=1:[1], otherwise:[0,1])
                         ż       - zip together
                                 -   e.g. [[["ジュ"],0],[["ウ","イ","チ","ガ","ツ"],1]]
                                 - implicit (smashing) print
                                 -   e.g. ジュ0ウイチガツ1

APL (Dyalog), 45 characters / 51 bytes* / 83 bytes
{S←⍵⊂⍨~⍵∊'ャュョ'⋄S[⍺~0],←'\'⋄S[0~⍨⍺≠1],←'/'⋄∊S}

Try it online!
The second score only applies if the three Katakana characters in the code can be counted as a different encoding than the other portion of the code.

JavaScript (Node.js), 60 bytes
n=>s=>s.replace(/.[ャュョ]?/g,s=>i=--n-i?s+1:n?s:s+2,i=0)

Try it online!

Whoa, that's a lot shorter than I expected! Nice job.

Also, you can use other characters than \/ so you might be able to save bytes that way.

Perl 6, 63 60 bytes
-3 bytes thanks to Lynn's suggestion to use other separators than / \
->\n{&{S:g[.<[ャュョ]>?]=$/~7 x!$++*?+^-n~1 x(++$==n>0)}}

Try it online!
Curried function. Uses 7 1 instead of / \.
Explanation
->\n{     # Block taking argument n
  &{      # Return a block
    S:g   # Replace globally
    [.<[ャュョ]>?]  # regex for mora
    =$/            # with match
     ~7            # followed by 7
      x!$++*?+^-n  # if i==1 and n!=1
                   # should be read as (! $++) * (? +^ - n)
                   # +^ is bitwise negation like ~ in C
                   # ? converts to Bool like !! in C
                   # so ?+^-n is like !!~-n or !!(n-1) or n!=1
     ~1            # followed by 1
      x(++$==n>0)  # if i==n and n>0
  }
}

Cool solution! How should I be reading that !$++*?+^-n exactly?

Also, you can use other characters than \/ so you might be able to save bytes that way.


text:
Blind Random Sort
Here's a pretty common pattern for sorting algorithms:
def sort(l):
    while not is_sorted(l):
         choose indices i, j
         assert i < j
         if l[i] > l[j]:
             l[i], l[j] = l[j], l[i]

These algorithms work well because the indices i and j are chosen carefully, based on the state of the list l.
However, what if we couldn't see l, and just had to choose blindly? How fast could we sort the list then?

Your challenge is to write a function that outputs a random pair of indices, given only the length of l. Specifically, you must output two indices, i, j, with 0 <= i < j < len(l). Your function should work on any length of list, but it will be scored on a list of length 100.
Your score is the mean number of index choices necessary to sort a uniformly randomly shuffled list according to the above pattern, where the indices are chosen according to your function.
I will score submissions, taking the mean number of index choices over 1000 trials on a uniformly randomly shuffled list of length 100 with no repeated entries.
I reserve the right to run less trials if the submission is clearly non-competitive or does not terminate, and I will run more trials to differentiate the top competitors to find a single winner. If multiple top submissions remain within the margin of error at the limit of my computational resources, I will declare the earlier submission the winner, until further computational resources can be brought to bear.

Here's an example scoring program, in Python:
import random
def is_sorted(l):
    for x in range(len(l)-1):
        if l[x] > l[x+1]:
            return False
    return True

def score(length, index_chooser):
    steps = 0
    l = list(range(length))
    random.shuffle(l)

    while not is_sorted(l):
        i, j = index_chooser(length)
        assert (i < j)
        if l[i] > l[j]:
            l[i], l[j] = l[j], l[i]
        steps += 1
    return steps

Your function may not maintain any mutable state, interact with global variables, affect the list l, etc. Your function's only input must be the length of the list l, and it must output a ordered pair of integers in the range [0, len(l)-1] (or appropriate for your language's list indexing). Feel free to ask whether something's allowed in the comments.
Submissions may be in any free-to-use language. Please include a scoring harness if one has not already been posted for your language. You may post a provisional score, but I will leave a comment with the official score.
Scoring is the mean number of steps to a sorted list on a uniformly randomly shuffled list of length 100. Good luck.

If we can't maintain a mutable state, then is the submission just based on whatever distribution we implement?

@JoKing Indeed - your submission is a distribution

Why don't you allow mutable state?  Allowing it means that submissions can better fine-tune their algorithms, as opposed to hoping that the right items get picked.

@NathanMerrill If mutable state were allowed, the winner would just be a sorting network which is already a well studied problem.

Isn't finding efficient sorting networks of a large size a really hard problem?  As long as N > 20, I don't see that being an issue.

But a random number generator is a mutable state? Am I right?

@tsh A standard random number generator is allowed, as exception to the mutable state rule. Don't use this to transfer information between iterations.

@NathanMerrill If you want to post that question, feel free. It's not this question, however.

@isaacg I wasn't proposing you actually change the challenge, I was asking what your reasoning was :)

@NathanMerrill Oh, sure. The challenge "Design the best sorting network", while an interesting question, has been studied a lot in the CS research world. As a result, the best submissions would probably just consist of implementations of research papers, such as Batcher's bitonic sort. The question I've asked here is original as far as I know, and so should have more room for innovation.

@Lynn Switched, thanks.

Python, score = 4508
def half_life_3(length):
    h = int(random.uniform(1, (length / 2) ** -3 ** -0.5) ** -3 ** 0.5)
    i = random.randrange(length - h)
    return i, i + h

Half-Life 3 confirmed.
Python, score = 11009
def bubble(length):
    i = random.randrange(length - 1)
    return i, i + 1

Apparently a randomized bubble sort doesn’t do all that much worse than a normal bubble sort.
Optimal distributions for small length
There’s no way this could be extended to length 100, but it’s interesting to look at anyway.  I computed optimal distributions for small cases (length ≤ 7) using gradient descent and lots of matrix algebra.  The kth column shows the probability of each swap at distance k.
length=1
score=0.0000

length=2
1.0000
score=0.5000

length=3
0.5000 0.0000
0.5000
score=2.8333

length=4
0.2957 0.0368 0.0000
0.3351 0.0368
0.2957
score=7.5106

length=5
0.2019 0.0396 0.0000 0.0000
0.2279 0.0613 0.0000
0.2279 0.0396
0.2019
score=14.4544

length=6
0.1499 0.0362 0.0000 0.0000 0.0000
0.1679 0.0558 0.0082 0.0000
0.1721 0.0558 0.0000
0.1679 0.0362
0.1499
score=23.4838

length=7
0.1168 0.0300 0.0041 0.0000 0.0000 0.0000
0.1313 0.0443 0.0156 0.0000 0.0000
0.1355 0.0450 0.0155 0.0000
0.1355 0.0443 0.0041
0.1313 0.0300
0.1168
score=34.4257

Your score: 11009

Can you explain your half life 3 answer a bit?  Is the point just to bias the random number towards the front of the list?

The optimal distributions for small length are very interesting - I notice that biasing towards the center is useful, especially for larger swap distance.

@Max The entire problem is about biasing the random numbers in useful ways; this way happened to be useful. Note that h is the distance between the swapped elements; it doesn’t represent the front or the back.

Your half life score: 4508 on 10000 samples.

Score: 4627
def rand_step(n):
	step_size = random.choice([1, 1, 4, 16])

	if step_size > n - 1:
		step_size = 1

	start = random.randint(0, n - step_size - 1)
	return (start, start + step_size)

Try it online!
Outputs random indices whose distance apart is chosen uniformly from [1,1,4,16]. The idea is to have a mix of 1-step swaps with swaps at larger scales.
I hand-tweaked these values for lists of length 100, and they are likely far from optimal. Some machine search could probably optimize the distribution over distances for the random-pair-with-chosen-distance strategy.

Your score: 4627 on 10,000 samples. I'll run it again with more samples if you're among the leaders after a few days.

Score: 28493
def x_and_y(l):
    x = random.choice(range(l))
    y = random.choice(range(l))
    while y == x and l != 1: y = random.choice(range(l))
    return sorted([x,y])

Try it online!
This solution just selects distinct values for x and y randomly from the range and returns them in sorted order. As far as I can tell, this performs better than choosing x then choosing y from the remaining values.

Your score: 28493

Python, score: 39525
def get_indices(l):
    x = random.choice(range(l-1))
    y = random.choice(range(x+1,l))
    return [x,y]

First it chooses a random value in the range \$[0, l-1)\$ for the \$x\$-index.
After that it will choose another random value larger than \$x\$ in the range \$[x+1, l)\$ for the \$y\$-index.
Try it online.

Your score: 39525

Python, score ≈ 5000
def exponentialDistance(n):
    epsilon = 0.25
    for dist in range(1, n):
        if random.random() < epsilon:
            break
    else:
        dist = 1
    low = random.randrange(0, n - dist)
    high = low + dist
    return low, high

Tried with a bunch of epsilon values, 0.25 seems to be the best.
Score ≈ 8881
def segmentedShuffle(n):
    segments = 20
    segmentLength = (n - 1) // segments + 1

    if random.random() < 0.75:
        a = b = 0
        while a == b or a >= n or b >= n:
            segment = random.randrange(segments)
            a = random.randrange(segmentLength) + segment * segmentLength
            b = random.randrange(segmentLength) + segment * segmentLength
        return sorted([a, b])

    highSegment = random.randrange(1, segments)
    return highSegment * segmentLength - 1, highSegment * segmentLength

A different approach.  Not as good, and it dies horribly with length not divisible by the number of segments, but still fun to build.

Your scores: Exponential distance: 5055. Segmented shuffle: 8901

Score: 4583
def rand_shell(l):
    steps = [1, 3, 5, 9, 17, 33, 65, 129]
    candidates = [(left, left + step)
            for (step, nstep) in zip(steps, steps[1:])
            for left in range(0, l - step)
            for i in range(nstep // step)
    ]
    return random.choice(candidates)

Try it online!
I've no idea why. I just tried sequences listed on wikipedia artical for shellsort. And this one seem works best. It get similar score with the one xnor posted.

Your score: 4583 on 10,000 samples. I'll run it again with more samples if you're among the leaders in a few days.

Also, I'm running a faster program that samples the same distribution, so I can get more samples.

@isaacg For better testing performance, moving candidates out of the function as a global variable should work.

Thanks, that's much faster than what I was doing.

Python 2, 4871
import random
def index_chooser(length):
    e= random.choice([int(length/i) for i in range(4,length*3/4)])
    s =random.choice(range(length-e))
    return [s,s+e]
def score(length, index_chooser):
    steps = 0
    l = list(range(length))
    random.shuffle(l)
    while True:
        for x in range(length-1):
            if l[x] > l[x+1]:
                break
        else:
            return steps
        i, j = index_chooser(length)
        assert(i < j)
        if l[i] > l[j]:
            l[i], l[j] = l[j], l[i]
        steps += 1

print sum([score(100, index_chooser) for t in range(100)])

Try it online!

Your score: 4871 on 10000 samples

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
String analyser
Use any programming language to display "AWSALILAND" in such a way, so that each letter is in a new line and repeated as many times as its position in the English alphabet. For example letter, (A) should be displayed just once because it is the first letter of the alphabet. Letter D should be displayed 4 times because it is the 4th letter of the alphabet.
So, the output should be this:
A
WWWWWWWWWWWWWWWWWWWWWWW
SSSSSSSSSSSSSSSSSSS
A
LLLLLLLLLLLL
IIIIIIIII
LLLLLLLLLLLL
A
NNNNNNNNNNNNNN
DDDD

Are lower-case letters OK?

IMHO, this challenge would have been more interesting if the text was given as input/argument.

@Adám IMHO that wouldn't even be a very interesting challenge anyway.

@PostLeftGhostHunter At least it would omit the unrelated challenge of compressing AWSALILAND.

somewhat related, but for string abcdefghi...xyz.

Is a leading linebreak ok?

is a list of lines an acceptable output format?

I swear I've seen a challenge like this, but where the string is taken as input. (might've been horizontal rather than vertical, though)

C# (Visual C# Interactive Compiler), 61 59 bytes
foreach(var s in"AWSALILAND")WriteLine(new string(s,s-64));

Try it online!
@Kevin Cruijssen Thanks, 2 bytes saved by removing { }

You can remove the brackets ({})

Linq version is 63 bytes

@aloisdg Thanks, I tried this before also, but it got also more bytes

Abuse LINQ and is (this optimization seems to be almost always applicable to foreach loops) for 57 bytes. Try it online! (I guess being slightly late is okay?)

Japt, 18 17 bytes
-1 byte from @Shaggy
`awÑ¢Ó€`u ¬®pIaZc

`awÑ¢Ó€`u ¬®pIaZc   Full program
`awÑ¢Ó€`            Compressed "awasiland"
        u           uppercase
          ¬®        split and map each letter
            p         repeat the letter this many times:
              a         absolute difference of
               Zc         get charcode
             I            and 64

Try it online!

Zc uH -> IaZc to save a byte.

Pyth, 20 bytes
jm*d-Cd64"AWSALILAND

Try it online here.
jm*d-Cd64"AWSALILAND
         "AWSALILAND   String literal "AWSALILAND"
 m                     Map each character of the above, as d, using:
     Cd                  Get character code of d
    -  64                Subtract 64
  *d                     Repeat d that many times
j                      Join on newlines, implicit print

19 byte alternative, which outputs lower case: jm*dhxGd"awsaliland - link

PowerShell, 34 bytes
"AWSALILAND"|% t*y|%{"$_"*($_-64)}

Try it online!
Takes the string toCharArray, then multiplies each letter out the corresponding number of times. Implicit Write-Output gives us newlines for free.
Ho-hum.

brainfuck, 112 bytes
+++++++[->++>>++>+>++>>+++>+++[<<<]<<]++++>>+>-->++>-->+>-->++>+[[->+>+<<]----[>+<----]>+>[-<.>]++++++++++.<,<<]

Try it online!
The actual word generation can probably be optimised further.

Scala (51 bytes):
"AWSALILAND"map(c=>s"$c"*(c-64)mkString)map println

Scala (41 bytes):
for(c<-"AWSALILAND")println(s"$c"*(c-64))

Try it online

This is a code golf question. So you should include your score.

Very good answer, welcome to PPCG!

Python 3,41 bytes
for i in'AWSALILAND':print(i*(ord(i)-64))

Python 2,40 bytes
for i in'AWSALILAND':print i*(ord(i)-64)

39 bytes

05AB1E, 17 bytes
.•DθîRI§•ʒAyk>×u,

Try it online!
Explanation
.•DθîRI§•           # push compressed string "awsaliland"
         ʒ          # filter
          Ayk       # get the index of the current letter in the alphabet
             >      # increment
              ×     # repeat it that many times
               u    # upper-case
                ,   # print

We only use filter here to save a byte over other loops due to ac implicit copy of the element on the stack. Filter works here since we print in the loop and don't care about the result of the filter.

Stax,  16  15 bytes
êôM▄╬æ♠ª+ç█○==.

Run and debug it
Explanation
`'YHu~{YX#`m64-_]*      #Full program, unpacked,
`'YHu~{YX#`             #Compressed "AWSALILAND"
           m            #Use the rest of the program as the block. Print each mapped element with a new-line.
            64          #Put 64 on stack
              -         #Subtract current element by 64
               _        #Get current index
                ]       #Make a 1 element array
                 *      #Duplicate that many times

Saved one byte by figuring out that the "*" command works with [arr int] and [int arr].

Impressive that Stax can compress a string and then compress the entire program again...

Thanks.  String literal compression works with huffman tree-type stuff, but the output alphabet is 94 printable ascii characters.  The whole-program packing doesn't attempt to use character frequency or order, and (approximately) just converts from base-95 (printable ascii) to base-256 (stax encoding)

@ETHproductions Which is probably not shorter than directly compressing it once to base 256. Anyway the disadvantage with Stax's packed mode is that it's hard to  put restrictions on the source code.

Charcoal, 17 bytes
ＥAWSALILAND×ι⊕⌕αι

Try it online! Link is to verbose version of code. Explanation:
 AWSALILAND         Literal string
Ｅ                   Map over characters
                ι   Current character
               α    Uppercase alphabet
              ⌕     Find
             ⊕      Increment
            ι       Current character
           ×        Repeat
                    Implicitly print each entry on its own line

R, 64 61 bytes
R's clunky string handling characteristics on full display...
-3 thanks to @Giuseppe, who noticed it's actually shorter to convert a string from utf8 to int and back again than using R's native string splitting function...
write(strrep(intToUtf8(s<-utf8ToInt("AWSALILAND"),T),s-64),1)

Try it online!

Before looking at your answer, I would have used match against LETTERS or utf8ToInt, so strtoi is a neat trick!

oh, wait utf8ToInt is shorter! Try it online

57 bytes using LETTERS.

APL (Dyalog Classic), 22 bytes
A more elegant, tacit solution thanks to Adám!
(↑⎕A∘⍳⍴¨⊢)'AWSALILAND'

Try it online!
Initial solution:
↑a⍴¨⍨⎕A⍳a←'AWSALILAND'

Try it online!

You shouldn't count ⎕←. Btw, ↑⎕A∘⍳⍴¨⊢ is the generalised function — at no extra byte cost: (↑⎕A∘⍳⍴¨⊢)'AWSALILAND'

Java 11, 89 83 82 81 bytes
v->"AWSALILAND".chars().forEach(c->System.out.println(((char)c+"").repeat(c-64)))

-1 byte thanks to @OlivierGrégoire.
Try it online.
Explanation:
v->                      // Method with empty unused parameter and no return-type
  "AWSALILAND".chars().forEach(c->
                         //  Loop over the characters as integer unicode values
    System.out.println(  //   Print with trailing newline:
      ((char)c+"")       //    The current character converted to char and then String
       .repeat(c-64)))   //    repeated the unicode value minus 64 amount of times

81 bytes

@OlivierGrégoire Ah, didn't realize it was shorter that way. I think tried chars().mapToObj(c->((char)c)+"").repeat(c-64).forEach(System.out::prinln) initially somewhere, but obviously it made it longer.. EDIT: Actually, I think I created a tip once about s.chars().forEach(c-> being shorter than a regular for(int c:s.getBytes()) once.. If only I would follow my own tips.. ;)

Perl 5, 35 bytes
say$_ x(31&ord)for AWSALILAND=~/./g

Try it online!

Why do you add the command line option? would it work if it is removed? What is its purpose?

@Monolica The option sets the Perl version to 5.10 to make say work.

what is the exact version of Perl you used? What version will run this code exactly without any declaration of what version should be used?

K (ngn/k), 23 22 bytes
(32!r)#'r:"AWSALILAND"

Try it online!
         r:"AWSALILAND"  // set variable r to the string
(32!r)                   // mod 32 each string in r, the operation will use ASCII number
       #'                // for each value in the array, take that amount of the corresponding character in the string

1 byte shorter: 64_'r#'r:"AWSALILAND"

J, 31 bytes
echo(#&>~_64+a.i.])'AWSALILAND'

Try it online!
Explanation:
echo(#&>~_64+a.i.])'AWSALILAND' - print
     #  ~                       - copy (arguments reversed)
      &>                        - each character (can be "0)
               i.               - the index of
                 ]              - the characters in
             a.                 - the alphabet
         _64+                   - minus 64 (times)

SNOBOL4 (CSNOBOL4), 88 bytes
	S ='AWSALILAND'
L	S LEN(1) . X REM . S :F(END)
	&UCASE X @Y
	OUTPUT =DUPL(X,Y)	:(L)
END

Try it online!

MATL, 20 bytes
'AWSALILAND'"@@64-Y"

Try it online!
Explanation
'AWSALILAND'   % Push this string
"              % For each character in this string
  @            %   Push current character
  @            %   Push current character
  64-          %   Implicitly convert to codepoint and subtract 64
  Y"           %   Repeat that many times. Gives a string with the repeated character
               % Implicit end
               % Implicit display

Red, 59 bytes
foreach c"AWSALILAND"[print pad/with c to-integer c - 64 c]

Try it online!

Z80Golf, 30 bytes
00000000: 2114 007e d640 477e ff10 fd23 3e0a ff7e  !..~.@G~...#>..~
00000010: b720 f076 4157 5341 4c49 4c41 4e44       . .vAWSALILAND

Try it online!
Assembly:
ld hl,str			;load address of str
start:
	ld a,(hl)		;get current char
	sub 64 		;get letter num in alphabet
	ld b,a			;store in b
	ld a,(hl)		;get current char
	print_char:
		rst 38h 	;print letter
		djnz print_char	;repeat print loop b times
	inc hl			;increment index of str, to get next char
	ld a,10
	rst 38h 		;print newline
	ld a,(hl)		;get current char
	or a
	jr nz, start		;if current char!=0, keep looping
end:
	halt			;end program (if current char==0)
str:
	db 'AWSALILAND'

Try it online!

JavaScript (Node.js), 65 63 bytes
i=>[...'AWSALILAND'].map(c=>c.repeat(parseInt(c,36)-9)).join`
`

Try it online!
Explanation:
i=>                         // Prints the result of this function
  [...'AWSALILAND'].map(c=> // Loop over the characters
    c.repeat(               // Repeat the current character
      parseInt(c,36)-9)))   // Character to alphabetical position
        .join`
        `                   // Prints a newline after every new char

Edit: -2 bytes thanks to @BrianH.

by using an anonymous function you can save 2 bytes: i=>[...'AWSALILAND'].map(c=>c.repeat(parseInt(c,36)-9)).join` `  (there's a literal newline in the join argument)

Haskell, 43 bytes
mapM(putStrLn. \c->c<$['A'..c])"AWSALILAND"

Try it online!

SOGL V0.12, 16 bytes
i|╚┌ž′ø¹‘U{Z⁴W*P

Try it Here!

T-SQL, 83 bytes
SELECT REPLICATE(value,ASCII(value)-64)FROM STRING_SPLIT('A-W-S-A-L-I-L-A-N-D','-')

STRING_SPLIT is supported by SQL 2016 and later.

Pip -l, 21 bytes
_X A_-64M"AWSALILAND"

Try it online!
         "AWSALILAND"  Literal string
        M              to the characters of which we map this function:
   A_                   ASCII value of character
     -64                minus 64 (= 1-based index in alphabet)
_X                      String-repeat character that many times
                       Autoprint, with each item on its own line (-l flag)

C (clang), 96 95 77 73 bytes
*s=L" AWSALILAND";main(i){for(;*++s;puts(""))for(i=*s-63;--i;printf(s));}

Try it online!
-18 bytes thanks to @ErikF
-5 bytes thanks to @ceilingcat

@ceilingcat So wide characters are good for something! ;-)

good use of wide chars

Julia, 41 bytes
[println(l^(l-'@')) for l∈"AWSALILAND"]

Try it online!

Swift, 95 bytes
"AWSALILAND".unicodeScalars.forEach{print(String(repeating:String($0),count:Int($0.value)-64))}

Try it online!
How?
"AWSALILAND"                             // Starting string
    .unicodeScalars                      // Convert into a list of unicode values
    .forEach {                           // Loop over each number
        print(String(                    // Create a string
            repeating: String($0),       //   that repeats each character
            count: Int($0.value) - 64))  //   the unicode value minus 64 (the offset)
}

><>, 40 bytes
"DNALILASWA"v
 oa~~<v-*88:<
-:0=?^>$:o$1

Try it online!

JavaScript, 74 68 bytes
for(i in s="AWSALILAND")console.log(s[i].repeat(s.charCodeAt(i)-64))

74->68, -6B for changing for loop to for...in, saving bytes on loop statement, removed increment, and removing statement to save the character.

for(i of"AWSALILAND")console.log(i.repeat(i.charCodeAt()-64))

Vyxal j, 18 16 bytes
`AWSALILAND`ƛøA*

Try it Online!
Explained
`AWSALILAND`ƛøA*
            ƛ    # mapping lambda
             øA  # string to number in alphabet
               * # times the character

j flag to print with newlines

Jelly, 20 bytes
“AWSALILAND”ẋ"O_64ƊY

Try it online!

I'd suggest “µɗỊ²ẋ_’ṃØA to save a byte on the string, but that seems to throw an error when placed in the program...

@ETHproductions You need to append a ¤ to that, therefore no bytes are saved. Same luck with compressed strings... :-(

MBASIC, 86 bytes
 1 S$="AWSALILAND":FOR I=1 TO LEN(S$):P$=MID$(S$,I,1):PRINT STRING$(ASC(P$)-64,P$):NEXT

Output:
A
WWWWWWWWWWWWWWWWWWWWWWW
SSSSSSSSSSSSSSSSSSS
A
LLLLLLLLLLLL
IIIIIIIII
LLLLLLLLLLLL
A
NNNNNNNNNNNNNN
DDDD

PHP, 93 bytes
<?=!array_walk(str_split("AWSALILAND",1),function(&$v){echo str_repeat($v,ord($v)-64)."
";});

Try it online!

PHP, 81 bytes
<?php for(;$i++<10;)echo str_repeat(($s=AWSALILAND)[$i-1],ord($s[$i-1])-64)."
";

Try it online!

Try <?=! - the "not" will negate the true; and false is printed empty. Or omit the php tag and run with -r (that flag is free). 2) 89 byte version: save four bytes with $i<strlen()...str_repeat($s[$i],ord($s[$i++])...

And: as this is Kolgomorov Complexity, you could hardcode the length - saving another four bytes.

Dart, 83 bytes
'AWSALILAND'.runes.forEach((r)=>print(String.fromCharCodes(List.filled(r-64, r))));

Try it online!

PHP, 71 bytes
<? for($i=0;$c="AWSALILAND"[$i++];)echo str_repeat($c,ord($c)-64)."\n";

Try it online!

You can save 2 bytes by removing the space after the opening tag and replacing \n with a literal newline.

Common Lisp, 96 bytes
(defun x(s)(dotimes(i(length s))(dotimes(j(-(char-int(char s i))96))(princ(char s i)))(terpri)))

Try it online!

Jelly, 17 bytes
“þ⁷ʂ:ñ⁵1»O_96×ŒuY

Try it online!
How?
“þ⁷ʂ:ñ⁵1»O_96×ŒuY - Main Link: no arguments
“þ⁷ʂ:ñ⁵1»         - compressed list of characters (using words aws, ali & land = awsaliland)
         O        - cast to ordinals = [97,119,115,97,108,105,108,97,110,100]
          _96     - subtract 96 = [1,23,19,1,12,9,12,1,14,4]
              Œu  - upper-case the chain's argument = "AWSALILAND"
             ×    - multiply = ["A","W...W","S...S","A","L...L","I...I","L...L","A","N...N","DDDD"]
                Y - join with newline characters = ["A",'\n',"W...W",'\n',"S...S",'\n',"A",'\n',"L...L",'\n',"I...I",'\n',"L...L",'\n',"A",'\n',"N...N",'\n',"DDDD"]
                  - implicit (smashing) print

Also @ 17 bytes: “þ⁷ʂ:ñ⁵1»ØaiⱮ×ŒuY, and “þ⁷ʂ:ñ⁵1»O%32×ŒuY

C++ (gcc), 90 83 bytes
#include<map>
int main(){for(auto c:"AWSALILAND")c&&puts(&std::string(c-64,c)[0]);}

Try it online!
Thanks to movatica for shaving off 7 bytes!

Don’t need c&&

@ceilingcat: but then it will crash when it hits the terminating NUL byte.

&std::string(c-64,c)[0] saves three bytes against std::string(c-64,c).c_str()
#include<map> instead of #include<string> saves another 3 bytes.

Go, 100 bytes
import(."fmt"
."strings")
func a(){for _,c:=range"AWSALILAND"{Println(Repeat(string(c),int(c)-64))}}

Try it online!

QBasic, 57 bytes
FOR i=1TO 10
c=ASC("AWSALILAND",i)
?STRING$(c-64,c)
NEXT

I'm so glad I was able to avoid using MID$() for this challenge!
How it works

Run a FOR loop over (1-based) indices of the characters in the string
Store the ASCII code of the current character as c
Create a string of c-64 repetitions of character c and print it

PHP, 58 bytes
while($c=AWSALILAND[$i++])echo str_pad("
",ord($c)-63,$c);

prints a leading linebreak. Run with -nr or try it online.

Python 2, 38 bytes
for c in'AWSALILAND':print ord(c)%64*c

Try it online!

I like that str_repeat operator. I sometimes wish that PHP had it - but with another character, so we can go on using strings as numbers. And for <char> in <string> ... I just love it!

Bubblegum, 29 bytes
00000000: 73e4 0ac7 0eb8 8231 0197 2397 0f12 e0f2  s......1..#.....
00000010: 8401 1461 a02a 3f14 c0e5 0204 00         ...a.*?......

Try it online!
I'm sorry...

F# (.NET Core), 66 bytes
"AWSALILAND"|>Seq.iter(fun x->printfn"%s"(new string(x,int x-64)))

Try it online!
Same logic than @pocki_c's answer
I am not used to F# golfing. All inputs are welcome :)

Ruby, 39 bytes
"AWSALILAND".chars{|x|x.*x.ord-64}

Try it offline!

Java (JDK), 162 bytes
static void m(){String n="AWSALILAND";for(int i=0;i<n.length();i++){char c=n.charAt(i);int v=c;for(int z=0;z<v-64;z++)System.out.print(c);System.out.println("");}

Try it online!

Sure, I will review and edit answer.

Please check i have update my code.

Seems to be valid now. Possible 124 bytes.

104 Bytes using a foreach loop

APL(NARS), 22 chars, 44 bytes
⊃a/¨⍨⎕A⍳a←'AWSALILAND'

test
A
WWWWWWWWWWWWWWWWWWWWWWW
SSSSSSSSSSSSSSSSSSS
A
LLLLLLLLLLLL
IIIIIIIII
LLLLLLLLLLLL
A
NNNNNNNNNNNNNN
DDDD

///, 82 bytes
/$/NN//#/SSS//"/WWW//!/LLLL/A
"""""""WW
######S
A
!!!
IIIIIIIII
!!!
A
$$$$$$$
DDDD

Try it online!

Turing Machine But Way Worse - 4349 bytes
0 0 0 1 1 0 0
0 1 1 1 2 0 0
0 2 0 1 3 0 0
0 3 0 1 4 0 0
0 4 0 1 5 0 0
0 5 0 1 6 0 0
0 6 0 1 7 0 0
0 7 1 0 8 1 0
0 8 1 1 0 0 0
1 0 0 0 1 0 0
1 1 1 0 9 0 0
0 9 0 0 10 0 0
0 10 1 0 11 0 0
0 11 0 0 12 0 0
0 12 0 0 2 0 0
1 2 0 0 13 1 0
0 13 0 1 14 0 0
0 14 1 0 15 0 0
0 15 0 1 3 0 0
1 3 1 1 16 0 0
0 16 0 1 17 0 0
0 17 1 0 18 0 0
0 18 0 1 4 0 0
1 4 1 1 5 0 0
1 5 0 0 6 0 0
1 6 1 1 19 0 0
0 19 0 1 20 0 0
0 20 1 1 7 0 0
1 7 1 1 21 0 0
0 21 1 0 8 1 0
1 8 1 0 9 1 0
1 9 1 0 22 1 0
0 22 0 0 10 1 0
1 10 1 1 23 1 0
0 23 0 0 11 1 0
1 11 1 1 24 1 0
0 24 0 0 12 1 0
1 12 1 1 25 1 0
0 25 0 0 13 1 0
1 13 1 1 26 1 0
0 26 0 0 14 1 0
1 14 1 1 27 1 0
0 27 0 0 15 1 0
1 15 1 1 28 1 0
0 28 0 0 16 1 0
1 16 1 1 29 1 0
0 29 0 0 17 1 0
1 17 1 1 30 1 0
0 30 0 0 18 1 0
1 18 1 1 31 1 0
0 31 0 0 19 1 0
1 19 1 1 32 1 0
0 32 1 1 20 0 0
1 20 0 1 21 0 0
1 21 1 1 22 0 0
1 22 0 0 23 0 0
1 23 1 0 33 0 0
0 33 0 0 24 0 0
1 24 1 0 25 0 0
1 25 0 0 34 0 0
0 34 0 0 26 0 0
1 26 0 0 35 1 0
0 35 0 1 36 0 0
0 36 1 0 37 0 0
0 37 0 1 27 0 0
1 27 1 1 38 0 0
0 38 0 1 39 0 0
0 39 1 0 40 0 0
0 40 0 1 28 0 0
1 28 1 1 29 0 0
1 29 0 1 41 0 0
0 41 0 1 30 0 0
1 30 1 1 42 0 0
0 42 1 0 31 1 0
1 31 1 0 43 1 0
0 43 0 0 44 1 0
0 44 0 0 32 1 0
1 32 1 1 45 1 0
0 45 0 0 33 1 0
1 33 1 1 46 1 0
0 46 0 0 34 1 0
1 34 1 1 47 1 0
0 47 0 0 35 1 0
1 35 1 1 48 1 0
0 48 0 0 36 1 0
1 36 1 1 49 1 0
0 49 0 0 37 1 0
1 37 1 1 50 1 0
0 50 0 0 38 1 0
1 38 1 1 51 1 0
0 51 0 0 39 1 0
1 39 1 1 52 1 0
0 52 1 1 53 0 0
0 53 0 1 40 0 0
1 40 1 1 41 0 0
1 41 0 0 42 0 0
1 42 1 0 54 0 0
0 54 0 0 43 0 0
1 43 1 0 44 0 0
1 44 0 0 55 0 0
0 55 0 0 45 0 0
1 45 0 0 56 1 0
0 56 0 1 57 0 0
0 57 1 0 58 0 0
0 58 0 1 46 0 0
1 46 1 1 59 0 0
0 59 0 1 60 0 0
0 60 0 1 47 0 0
1 47 0 0 61 0 0
0 61 0 1 62 0 0
0 62 0 1 63 0 0
0 63 0 1 48 0 0
1 48 0 1 64 0 0
0 64 1 0 65 1 0
0 65 1 1 49 0 0
1 49 0 0 50 0 0
1 50 1 0 66 0 0
0 66 0 0 67 0 0
0 67 1 0 68 0 0
0 68 0 0 69 0 0
0 69 0 0 51 0 0
1 51 0 0 70 1 0
0 70 0 1 71 0 0
0 71 1 0 72 0 0
0 72 0 1 52 0 0
1 52 1 1 73 0 0
0 73 0 1 74 0 0
0 74 0 1 53 0 0
1 53 1 1 75 0 0
0 75 1 1 54 0 0
1 54 0 0 55 1 0
1 55 1 0 56 1 0
1 56 1 0 76 1 0
0 76 0 1 57 1 0
1 57 1 0 77 1 0
0 77 0 1 58 1 0
1 58 1 0 78 1 0
0 78 0 1 59 1 0
1 59 1 0 79 1 0
0 79 0 1 60 1 0
1 60 1 0 80 1 0
0 80 0 1 61 1 0
1 61 1 1 62 0 0
1 62 0 1 81 0 0
0 81 1 0 82 0 0
0 82 0 0 63 0 0
1 63 1 0 83 0 0
0 83 0 0 84 0 0
0 84 0 0 64 0 0
1 64 0 0 85 1 0
0 85 0 1 86 0 0
0 86 1 0 87 0 0
0 87 0 1 65 0 0
1 65 1 1 88 0 0
0 88 0 1 89 0 0
0 89 0 1 66 0 0
1 66 1 1 90 0 0
0 90 0 1 67 0 0
1 67 0 1 91 0 0
0 91 1 0 92 1 0
0 92 0 0 93 1 0
0 93 0 0 68 1 0
1 68 1 0 94 1 0
0 94 0 1 69 1 0
1 69 1 0 95 1 0
0 95 0 1 70 1 0
1 70 1 0 96 1 0
0 96 0 1 71 1 0
1 71 1 1 97 0 0
0 97 0 1 98 0 0
0 98 1 1 72 0 0
1 72 0 0 73 0 0
1 73 1 0 99 0 0
0 99 0 0 74 0 0
1 74 1 0 100 0 0
0 100 0 0 101 0 0
0 101 0 0 75 0 0
1 75 0 0 102 1 0
0 102 0 1 103 0 0
0 103 1 0 104 0 0
0 104 0 1 76 0 0
1 76 1 1 105 0 0
0 105 0 1 106 0 0
0 106 0 1 77 0 0
1 77 1 1 107 0 0
0 107 1 1 78 0 0
1 78 0 0 79 1 0
1 79 1 0 80 1 0
1 80 1 0 108 1 0
0 108 0 1 81 1 0
1 81 1 0 109 1 0
0 109 0 1 82 1 0
1 82 1 0 110 1 0
0 110 0 1 83 1 0
1 83 1 0 111 1 0
0 111 0 1 84 1 0
1 84 1 0 112 1 0
0 112 0 1 85 1 0
1 85 1 1 86 0 0
1 86 0 1 113 0 0
0 113 1 0 114 0 0
0 114 0 0 87 0 0
1 87 1 0 115 0 0
0 115 0 0 116 0 0
0 116 0 0 88 0 0
1 88 0 0 117 1 0
0 117 0 1 118 0 0
0 118 1 0 119 0 0
0 119 0 1 89 0 0
1 89 1 1 120 0 0
0 120 0 1 121 0 0
0 121 0 1 90 0 0
1 90 0 0 122 0 0
0 122 0 1 123 0 0
0 123 0 1 124 0 0
0 124 0 1 91 0 0
1 91 0 1 125 0 0
0 125 1 0 126 1 0
0 126 1 1 92 0 0
1 92 0 0 93 0 0
1 93 1 0 127 0 0
0 127 0 0 128 0 0
0 128 1 0 129 0 0
0 129 0 0 130 0 0
0 130 0 0 94 0 0
1 94 0 0 131 1 0
0 131 0 1 132 0 0
0 132 1 1 133 0 0
0 133 0 1 134 0 0
0 134 0 1 95 0 0
1 95 1 1 135 0 0
0 135 1 0 96 1 0
1 96 1 0 136 1 0
0 136 0 1 97 1 0
1 97 1 0 137 1 0
0 137 0 1 98 1 0
1 98 1 0 138 1 0
0 138 0 1 99 1 0
1 99 1 0 139 1 0
0 139 0 1 100 1 0
1 100 1 0 140 1 0
0 140 0 1 101 1 0
1 101 1 0 141 1 0
0 141 0 1 102 1 0
1 102 1 0 142 1 0
0 142 0 1 103 0 0
1 103 1 1 104 0 0
1 104 0 0 105 0 0
1 105 1 0 143 0 0
0 143 0 0 144 0 0
0 144 0 0 106 0 0
1 106 0 0 145 1 0
0 145 0 1 146 0 0
0 146 1 0 147 0 0
0 147 0 1 107 0 0
1 107 1 1 148 0 0
0 148 0 1 149 0 0
0 149 0 1 108 0 0
1 108 0 0 150 0 0
0 150 0 1 151 0 0
0 151 0 1 152 0 0
0 152 1 1 109 0 0
1 109 0 0 110 1 0
1 110 1 0 153 1 0
0 153 0 0 154 1 0
0 154 0 1 155 1 1

Made with the help of ASCII_only's program generator

Tcl, 88 bytes
lmap x [split AWSALILAND ""] {set s ""
time {set s $s$x} [expr [scan $x %c]-64]
puts $s}

Try it online!

Also 88 bytes: https://tio.run/##K0nO@f8/JzexQKFCIbq4ICezRMExPNjRx9PH0c9FQUkpVqG6JDM3VaE6saAgNS9FoVhBpaJWITq1oqAIqD45MQ/IV1BNjtU1M4nlKigtAcoXc5XmFaeWKBTX/v8PAA

Perl 6, 37 bytes
say .chr x$_-64 for "AWSALILAND".ords

Try it online!

VBA (Excel), 70 bytes
using Immediate window
a="AWSALILAND":For x=1To Len(a):b=Mid(a,x,1):?String(Asc(b)-64,b):Next

8088 machine code, IBM PC DOS, 40 bytes
Listing:
B4 02       MOV  AH, 2          ; DOS API display char function
B1 0A       MOV  CL, 10         ; CL length of string
BE 011E     MOV  SI, OFFSET S   ; point SI to AWSALILAND string
    LOOP_CHAR:
AC          LODSB               ; load next byte into AL
8A D0       MOV  DL, AL         ; put in DL for display
2C 40       SUB  AL, 'A'-1      ; convert ASCII char to 1-based counter
8A D8       MOV  BL, AL         ; move to BL for repeat loop
    LOOP_REP:
CD 21       INT  21H            ; display char in DL
4B          DEC  BX             ; decrement repeat counter
75 FB       JNZ  LOOP_REP       ; repeat char loop
B2 0D       MOV  DL, 0DH        ; display CR
CD 21       INT  21H
B2 0A       MOV  DL, 0AH        ; display LF
CD 21       INT  21H
E2 EA       LOOP LOOP_CHAR      ; next char loop
C3          RET                 ; return to DOS

S   DB      'AWSALILAND'        ; define static string in memory

Actually turned out to be longer than I thought.  Of course, it doesn't help that it costs 8 bytes to display a newline using the DOS console API.
Output

Download and test AWA.COM.

Deadfish~, 192 bytes
{i}ddsic{{d}}{i}cs{d}dddccc{cc}{{d}}{i}cdsii{c}ccccccccc{{d}}{i}cddsic{{d}}{i}cdsddddd{c}cc{{d}}{i}cdds{i}dccccccccc{{d}}{i}cdsddddd{c}cc{{d}}{i}cddsic{{d}}{i}cdsddd{c}cccc{{d}}{i}cddsiiiicccc

Try it online!
Frankly, I'm just stoked it's below 200 bytes.

Ahead, 34 bytes
Contains trailing newline.
"AWSALILAND"u$l<
~dW:k-A':\N\0<~n@

Try it online!

Retina, 56 bytes
K`AWSALILAND
L`.
W
23*W
S
19*S
L
22*L
I
9*I
D
4*D
N
14*N

Explanation:
K`AWSALIAND

Sets the working string to AWSALIAND
L`.

Puts each character onto a new line. L is a list, and each item is found by the regex /./.
character
n*character

Replace all occurences of character with n lots of the character.
Try it online!

Poetic, 470 bytes
any days i wish i could&i say i could,i can not
still at the age where,a lot of times,i can not raise my own money
guess i got myself overly exhausted,or spent
no pun is meant
i was a child of ten,a child of ten
a thing i know:i saved a buck a month
m-one-y,m-one-y,m-ones-y
still,i had a dream,i had a vision
oh my god,what a dream
i had a vision i was rich
at first im like:o,i have a payoff,o
however,truly i am not especially pleased
indeed,o,i see i am scared of it

Try it online!
I don't especially like the fact that I have to hardcode AWSALILAND (mostly because I don't know what that means). But at least this works.

Husk, 19 bytes
mSRo-64c"AWSALILAND

Try it online!

Deadfish~, 284 bytes
{iiiiii}iiiiic{ddddd}dddddc{{i}dd}ddd{cc}ccc{{d}ii}iiic{{i}ddd}iii{c}ccccccccc{{d}iii}dddc{iiiii}iiiiic{ddddd}dddddc{iiiiii}iiiiii{c}cc{dddddd}ddddddc{iiiiii}iiiccccccccc{dddddd}dddc{iiiiii}iiiiii{c}cc{dddddd}ddddddc{iiiii}iiiiic{ddddd}dddddc{{i}ddd}dd{c}cccc{{d}iii}iic{iiiiii}ddcccc

Try it online!

CSASM v2.2.1.2, 162 bytes
func main:
lda 0
sta $1
lda "AWSALILAND"
.lbl a
push $a
conv ~arr:char
ldelem $1
dup
conv i32
push 64
sub
pop $2
conv str
push $2
mul
print.n
inc $1
push $1
push 10
sub
brtrue a
ret
end

Commented and ungolfed:
func main:
    ; Initialize $1 to zero and $a to the string "AWSALILAND"
    lda 0
    sta $1
    lda "AWSALILAND"

    .lbl loop
        ; Get the iteration char in the string
        push $a
        conv ~arr:char
        ldelem $1

        ; Duplicate it.  The first will be used as the string to print and the
        ;   second will be used for the string repetitions with "mul"
        dup

        ; Get the index in the alphabet (1..26) and put it in $2
        conv i32
        push 64
        sub
        pop $2

        ; Convert the character to a string, then perform the built-in string
        ;   repetitions with "mul"
        conv str
        push $2
        mul

        ; Print it with a newline appended
        print.n

        ; Truthy is non-zero, so the loop ends when ($1 + 1) - 10 == 0
        inc $1
        push $1
        push 10
        sub
        brtrue loop
    ret
end

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Convert an ASCII art table to a UTF-8 table
When I write documentation, comments, etc. I love making ASCII tables. They usually end up looking pretty good, but I always feel that they could look even better - especially since UTF-8/Unicode includes the box drawing characters. However, these characters are very burdensome to use, requiring several key presses to insert. Your task? Write a program or a function that can automatically convert ASCII tables to the UTF-8/Unicode equivalent.
This challenge was sandboxed.
Challenge
Write a program, that given an ASCII table as an input string, outputs the table redrawn with the Unicode/UTF-8 box drawing characters. Specifically, the characters that are a part of the table should be translated as follows:
(Unicode, 3 bytes each in UTF-8)
- to ─ (\u2500)
| to │ (\u2502)
= to ═ (\u2550)

and + to one of:
   ┌ (\u250C), ┐ (\u2510), └ (\u2514), ┘ (\u2518),
   ├ (\u251C), ┤ (\u2524), ┬ (\u252C), ┴ (\u2534),
   ┼ (\u253C)
or, if '=' on either side:
   ╒ (\u2552), ╕ (\u2555), ╘ (\u2558), ╛ (\u255D),
   ╞ (\u255E), ╡ (\u2561), ╤ (\u2564), ╧ (\u2567),
   ╪ (\u256A)

Details
I/O:

Default I/O is allowed
You may take input in any reasonable format, including the table as a string, or a path to a file containing the table.
You may output to a file and take the file name as an additional argument.

However, you may not modify the input file. (It should be retained for ease of future editing)

Input:

You may assume that every row of input has been padded to be the same length with .
You may not assume that the first character after a newline is a part of the table borders (as it may be whitespace).
Input is considered a valid table if all characters (that are a part of the table) -=| are connected to exactly two characters and + are connected to at least one character both horizontally and vertically.
Your program may not produce any errors with valid inputs.
If the input is not valid the behavior is undefined and you may produce any output.
The input may contain any UTF-8 characters, including the box drawing characters.

Output:

Any of the characters -=|+ that are not a part of the table must be left as-is.
Similarly, any other characters must be left as-is.
A single leading and/or trailing newline is allowed.

Other:

Standard loopholes are forbidden, as per usual.
If your preferred language has a built-in that solves this problem, you may not use it.

This means programs, functions, subroutines or instructions that would be valid submissions for this challenge with no additions.

Each of the characters needed in this challenge are three bytes long when they're encoded in UTF-8.

Connected characters:
A character is connected to another, if:

It is | and is directly above or below + or |;
It is - and is directly before or after + or -;
It is = and is directly before or after + or =;
It is + and is directly above or below | or +, or is directly before or after -, = or +.

A character is considered a part of the table, if it is connected to any character that is a part of the table. By definition, the first + in the input is a part of the table.
Examples
Examples available here as a copy-pastable version.
 Input:                    Output:
+------------------+      ┌──────────────────┐
|   Hello+World!   |      │   Hello+World!   │
+==================+      ╞══════════════════╡
| This is+my first |  ->  │ This is+my first │
|+-+ code|golf  +-+|      │+-+ code|golf  +-+│
|+-+chall|enge! +-+|      │+-+chall|enge! +-+│
+------------------+      └──────────────────┘

     +===+===+===+             ╒═══╤═══╤═══╕
     | 1 | 2 | 3 |             │ 1 │ 2 │ 3 │
 +---+===+===+===+         ┌───╪═══╪═══╪═══╡
 | 1 | 1 | 2 | 3 |         │ 1 │ 1 │ 2 │ 3 │
 +---+---+---+---+    ->   ├───┼───┼───┼───┤
 | 2 | 2 | 4 | 6 |         │ 2 │ 2 │ 4 │ 6 │
 +---+---+---+---+         ├───┼───┼───┼───┤
 |-3 |-3 |-6 |-9 |         │-3 │-3 │-6 │-9 │
 +===+---+---+---+         ╘═══╧───┴───┴───┘

      +-----+         ->      <Undefined>

      +-----+         ->      ┌─────┐
      +-----+                 └─────┘

+-----------------+
|  Hello, World!  |
| This is invalid |   ->      <Undefined>
|      input      |
 -----------------+

       ++++                      ┌┬┬┐
       ++++           ->         ├┼┼┤
       ++++                      └┴┴┘

       +--+
       ++++           ->      <Undefined>
       +--+

Finally...
This is code-golf, so the least amount of bytes wins. Happy golfing!

In the first example, why are the consecutive +-+ excerpts not considered to form a connected table?

If a maybe 16-bit function use a single byte to represent ╡, how's the byte count?

@recursive If you mean the first Hello World table, the inner tables are not considered to form a table because the text inside the table must stay unchanged, and they are not considered a part of the outer table borders as they are not connected to them properly.

If you mean the first +----+ example, it would be because the direction of the corners would be ambiguous.

Oh, the "no tables within tables unless they connect to extend the outermost possible table" requirement makes this a lot tougher.

...although it is eased by "By definition, the first + in the input is a part of the table."

@l4m2 According to Wikipedia, these UTF-8 characters occupy 3 bytes of memory each. I'll add a mention of that.

@l4m2 The rule is "the byte count is the file size when the program is stored on disk". If it correctly outputs the table (on a 16-bit machine?) then it should be fine.

(this is ascii-art, it suffices if the output looks correct. right?)

Can the input contain any of the Unicode box drawing characters?

@RootTwo I'm going to go with yes, since both of the existing answers already handle them fine.

Python 3, 392 281 bytes
Golfed it quite a bit more and converted to a recursive solution instead of an iterative one:
def h(a):
 def g(i):
  k=-3;d=a[i]=='=';z[i]=''
  for p,j,r in zip((1,2,4,8),(i+1,i+w,i-1,i-w),('+-=','+|')*2):
   if 0<=j<len(a)and{a[i],a[j]}<={*r}:k+=p;d|=a[j]=='=';z[j]and g(j)
  z[i]="┌╒!!─═┐╕┬╤@@└╘││├╞┘╛┴╧┤╡┼╪"[2*k+d]
 w=a.find('\n')+1;z=[*a];g(a.find('+'))
 return''.join(z)

Takes a string of equal length rows separated by newlines, and returns a string in the same format.  May throw an exception on invalid input.
Previous solution:
def h(a):
 i=a.find('+');q=[i];w=a.find('\n')+1;z=[*a]
 while q:
  i=q.pop();c=a[i];k=-5
  for p,j in enumerate((i+1,i-1,i+w,i-w)):
   r='++-|='[p>1::2]
   if 0<=j<len(a)and a[i]in r and a[j]in r:
    k+=1<<p;q+=[j][:z[j]<'─']
  z[i]='│'if c>'='else'─═'[a[i]>'-']if c>'+'else"┌╒┐╕┬╤@@└╘┘╛┴╧##├╞┤╡┼╪$$"['='in a[abs(i-1):i+2]::2][k]
 return''.join(z)

Ungolfed version:
def h(a):
    i = a.find('+')         # find index of first '+'. It is first node
    q = [i]                 # in the queue of indexes to convert to unicode
    w = a.find('\n')+1      # width of the table
    z = [*a]                # strings are immutable, so copy it to a list

    while q:                # while the queue isn't empty
        i=q.pop()           # get the next index to process
        c=a[i]              # and the associated character

        k=-5                # 'k' is the index into the unicode string, U.  The way they
                            # are encoded, the first unicode value is at index 5.

                 # directions  E   W   S   N
        for p,j in enumerate((i+1,i-1,i+w,i-w)):  # j is the index of an adjacent cell

            # r='++-|='[p>1::2] is equivalent to:
            if p > 1:
                r = '+|'    # compatible symbols for vertical connections
            else:
                r = '+-='   # compatible symbols for horizontal connections

            # if adjacent cell index is valid and the characters are compatible
            if 0 <= j < len(a) and a[i] in r and a[j] in r:
                k += 1<<p                 # update the unicode symbol index

                # q += [j][:z[j]<'─'] is equivalent to:
                if z[j] < '-':            # if the adjacent cell hasn't been converted already
                    q.append(j)           #  append it's index to the queue

            if c > '=':
                z[i] = '│'                # replace a '|' with a '│'

            elif c > '+':
                z[i] = '─═'[a[i]>'-']     # replace a '-' or '=' with '─' or '═' respectively

            else:                                      # it's a '+'
                U = "┌╒┐╕┬╤@@└╘┘╛┴╧##├╞┤╡┼╪$$"         # even indexes are single horizontal line,
                                                       # double horizontal lines are at odd indexes

                z[i] = U['='in a[abs(i-1):i+2]::2][k]  # '='in a[abs(i-1):i+2] is true if there is an '=' to the left or right
                                                       # so this selects the odd chars from U
                                                       #  then [k] selects the correct char

 return''.join(z)

Python 3, 914 898 827 823 594 587 569 540 469 bytes
Edit: significantly changed strategy, now making a bitfield of neighbors (similar to dead-possum's answer). I've left the earlier version below.
H='─│═-|=└╘++++┌╒├╞++┘╛++┴╧┐╕┤╡┬╤┼╪'
def n(l):
 def j(r,c,t=0):O=(0,r-1,c),(1,r,c+1),(2,r+1,c),(3,r,c-1);v=f(r,c);b=t|any(f(Y,X)=='='for i,Y,X in O);l[r][c]={'+':H[b+2*sum((f(Y,X)in H)<<x for x,Y,X in O)],**dict(zip(H[3:6],H))}.get(v,v);[f(Y,X)!=';'and v in'+++-|='[i%2::2]and j(Y,X,v=='=')for i,Y,X in O]
 for i,I in enumerate(l):
  if'+'in I:f=lambda r,c:l[r][c]if len(l)>r>=0and 0<=c<len(l[r])else';';j(i,I.index('+'));break

Try it online!
Input is in the form of a list of lists of characters, which is modified in place. Recurses from the first + that it finds.
x=range
C='┌┐└┘','╒╕╘╛'
D='┬┤┴├','╤╡╧╞'
A='┼╪'
H,V,T='─│═'
J={'-':H,'|':V,'=':T}
K=C[1]+D[1]+A[1]+'='+T
E=('+|','+-=')*2
F=['+|'+V,'+-='+H+T]*2
O=(0,-1,0),(1,0,1),(2,1,0),(3,0,-1)
for i in x(4):
 for j in{0,1,2,3}-{i}:F[i+2&3]+=D[0][j]+D[1][j]
 h=C[0][i]+C[1][i];F[i&2]+=h;F[3-2*(i&1)]+=h
def n(l):
 for i,I in enumerate(l):
  if'+'in I:r=i;c=I.index('+');break
 else:return l
 def f(r,c):
  try:assert c>=0 and r>=0;return l[r][c]
  except:return'\0'
 def j(r,c):
  v=f(r,c)
  l[r][c]=J.get(v,v)
  if v=='+':
   X=[f(r+Y,c+X)for i,Y,X in O];B=any(x in K for x in X);X=[X[x]in F[x]for x in x(4)];L=sum(X)
   if L in(2,3,4):l[r][c]=D[B][X.index(False)]if L==3 else C[B][X[0]*2+X[3]]if L==2 else A[B]
  for i,Y,X in O:
   if v in E[i]and f(r+Y,c+X)in E[i]:j(r+Y,c+X)
 j(r,c);return l

Try it online!
Here's the closest thing I have to an ungolfed version:
def tr(s):
    t='┌┐└┘','╒╕╘╛'
    t2='┬┤┴├','╤╡╧╞'
    A = '┼','╪'
    H,V,T = '─│═'
    Th = ''.join(x[1]for x in (t,t2,A))+'='+T
    ps = ['+|'+V, '+-='+H+T, '+|'+V, '+-='+H+T]
    ps2 = ('+|', '+-=')*2
    for i in range(4):
        for j in {0,1,2,3}-{i}:
            ps[(i+2)%4] += t2[0][j]+t2[1][j]
        h=t[0][i] + t[1][i]
        ps[i & 2] += h
        ps[3 - 2 * (i & 1)] += h

    l = [list(x) for x in s.split('\n')]
    r = 0
    for i,I in enumerate(l):
        if'+'in I:
            r=i;c=I.index('+')
            break
    def g(r,c): return l[r][c]
    def G(r,c):
        if r >= 0 and r < len(l) and c >= 0 and c < len(l[r]):
            return g(r,c)
        return '\0'
    def process(r,c):
        v = g(r,c)
        if v == '-': l[r][c] = H
        elif v == '|': l[r][c] = V
        elif v == '=': l[r][c] = T
        elif v == '+':
            all=[G(r-1,c),G(r,c+1),G(r+1,c),G(r,c-1)]
            bold=any(x in Th for x in all)
            for i in range(4):all[i] = all[i] in ps[i]
            N,E,S,W=all
            tt=sum(all)
            if tt == 3:
                l[r][c]=t2[bold][all.index(False)]
            elif tt == 2:
                l[r][c]=t[bold][N*2+W]
            elif tt == 4:
                l[r][c]=A[bold]
            else: return
        for i,(dy,dx) in enumerate(((-1,0),(0,1),(1,0),(0,-1))):
            if v in ps2[i] and G(r+dy,c+dx) in ps2[i]:
                process(r+dy,c+dx)
    process(r,c)
    return l

Minor improvements to save 9 bytes (down to 814)  https://bit.ly/2NOu7HF

Few more for another 9 bytes (805 bytes now) https://bit.ly/2pYom0x

Down to 763: https://bit.ly/2OxErsJ

JavaScript, 311 307 bytes
X=>(O=[...X],P=(I,j=0,_=0)=>!P[I]&&(P[I]=1,['-─1','|│','=═1'].map(([a,b,n=X.indexOf('\n')+1])=>[-n,+n].map(n=>{for(i=I;X[i+=n]==a;)O[i]=b
if(X[i]=='+')j|=[1,2,4,8,I-i>1&&17,i-I>1&&18][_],P(i)
_++})),O[I]='┘└┴ ┐┌┬ ┤├┼     ╛╘╧ ╕╒╤ ╡╞╪'[j-5]),P(X.indexOf`+`),O.join``)

f=
X=>(W=X.indexOf('\n')+1,O=[...X],P=(I,j=0,_=0)=>!P[I]&&(P[I]=1,['-─1','|│','=═1'].map(([a,b,n=W])=>[-n,+n].map(n=>{for(i=I;X[i+=n]==a;O[i]=b);if(X[i]=='+')j|=[1,2,4,8,I-i>1&&17,i-I>1&&18][_],P(i);_++})),O[I]='┘└┴ ┐┌┬ ┤├┼     ╛╘╧ ╕╒╤ ╡╞╪'[j-5]),P(X.indexOf`+`),O.join``)

console.log(
f(
`+------------------+
|   Hello+World!   |
+==================+
| This is+my first |
|+-+ code|golf  +-+|
|+-+chall|enge! +-+|
+------------------+`
))

console.log(
f(
`     +===+===+===+
     | 1 | 2 | 3 |
 +---+===+===+===+
 | 1 | 1 | 2 | 3 |
 +---+---+---+---+
 | 2 | 2 | 4 | 6 |
 +---+---+---+---+
 |-3 |-3 |-6 |-9 |
 +===+---+---+---+`
))

console.log(
f(
`+-----+
+-----+`))

console.log(
f(
`++++
++++
++++`))

Explanation
Starting at the first found + junction, the program attempts to find paths to other junctions in every direction, performing replacements as it goes. It stores the found directions and the "double-bordered" state in a bitmap, which then determines the appropriate junction character.
// Take an input string X
f = X => {
    // Copy the input string into an array so characters can be overwritten and eventually output
    O = [...X]

    // Define a function that processes a junction ("+" symbol) at index I in the input string X:
    P = I => {
        // Make a bitmap to keep track of the direction coming out of the junction and double borders
        // Bits from right to left: west, east, north, south, double border
        // E.g. a double-bordered south/east junction corresponds to the binary number 11010 ("╒")
        let j = 0

        // A counter
        let _ = 0

        // Ensure this junction hasn't already been processed
        if(!P[I]){
            P[I] = 1,

            // We'll walk away from the junction in each of the four directions, then west and east again to check for double borders
            // i.e. walk along `a`, replace with `b`, move index `i` by `n`
            // 1st pass: walk along "-", replace with "─", move index by 1
            // 2nd pass: walk along "|", replace with "│", move index by the width of the input (plus 1 for the newline) to traverse vertically
            // 3rd pass: walk along "=", replace with "═", move index by 1
            ['-─1','|│','=═1'].map(([a, b, n = X.indexOf('\n') + 1])=>
                // We'll walk in the negative and positive directions for each pass
                [-n,+n].map(n=>{
                    // Start the walk
                    i=I
                    // Keep walking (incrementing by n) as long as we're on a "path" character, "a"
                    while(i += n, X[i] == a)
                        // Replace the corresponding character in the output with "b"
                        O[i] = b

                    // Upon reaching another junction at index i:
                    if(X[i] == '+'){
                        // OR the bitmap according to the direction we walked
                        j |= [
                            // Pass 1: Horizontal
                            1, // west
                            2, // east

                            // Pass 2: Vertical
                            4, // north
                            8, // south

                            // Pass 3: Double Horizontal (only if we've walked more than 1 step)
                            I-i > 1 && 17, // west, double border
                            i-I > 1 && 18 // east, double border
                        ][_]

                        // Process the junction we walked to
                        P(i)
                    }
                    _++
                })
            )

            // Finally, replace the "+" with a proper junction character based on the bitmap value
            O[I] = '     ┘└┴ ┐┌┬ ┤├┼     ╛╘╧ ╕╒╤ ╡╞╪'[j]
        }
    }

    // Process the first junction to kick off the recursion
    P(X.indexOf`+`)

    // Return our modified character array as a joined string
    return O.join``
}

Fixed - I must have looked at the character count and not the byte count.

Python 3, 599 bytes
I'm not really good at golfing in Python 3, but (to my shame) I couldn't get normal output of UTF-8 chars in Python 2. So here we are.
I guess the only interesting trick here is deciding of + tranformation.
I've encoded all possible variants with 4-bit adresses. Each bit of adress resembles connection to neightbour cell. So 0 - no connection and 1 - connection.
1111 is ┼
0011 is ┐
etc
Some configurations of connections are invalid and replaced with dummy values: '012┐45┌┬8┘0┤└┴├┼'
If any neightbour cell contains =, second list will be used with doubled lines.
['012┐45┌┬8┘0┤└┴├┼','012╕45╒╤8╛0╡╘╧╞╪']['='in r]

Adress is combined here.
r=''.join([str(int(V(y,x)))+W(y,x)for y,x in[(Y-1,X),(Y,X+1),(Y+1,X),(Y,X-1)]])

r contains string lenght 8, where every two chars are 1/0 and actuals neightbour char.
For example: 1+0y1-1|.
This is used to choose list of substitutions as shown before. And then contracted to adress: int(r[0::2],2)
This lambda used to verify that cell coordinates are valid and cell's char is one of '+-|='
V=lambda y,x:~0<x<len(I[0])and~0<y<len(I)and I[y][x]in'+-|='

This lambda used to receive char from cell. Returns ' ' if coordinates are invalid. (definately can be golfed away)
W=lambda y,x:V(y,x)and I[y][x]or' '

Conditions for recursion. Might be golfable too.
if Z in'+-=':F(Y,X+1);F(Y,X-1)
if Z in'+|':F(Y-1,X);F(Y+1,X)

I=eval(input())
J=[i[:]for i in I]
V=lambda y,x:~0<x<len(I[0])and~0<y<len(I)and I[y][x]in'+-|='
W=lambda y,x:V(y,x)and I[y][x]or' '
def F(Y,X):
 if V(Y,X)and I[Y][X]==J[Y][X]:
  Z=I[Y][X]
  if','>Z:
   r=''.join([str(int(V(y,x)))+W(y,x)for y,x in[(Y-1,X),(Y,X+1),(Y+1,X),(Y,X-1)]])
   J[Y][X]=['012┐45┌┬8┘0┤└┴├┼','012╕45╒╤8╛0╡╘╧╞╪']['='in r][int(r[0::2],2)]
  else:J[Y][X]=dict(zip('|-=','│─═'))[Z]
  if Z in'+-=':F(Y,X+1);F(Y,X-1)
  if Z in'+|':F(Y-1,X);F(Y+1,X)
e=enumerate
F(*[(y,x)for y,r in e(I)for x,c in e(r)if'+'==c][0])
for r in J:print(''.join(r))

Try it online!


text:
Find an array that fits a set of sums
Consider an array A of length n. The array contains only positive integers.  For example A = (1,1,2,2).  Let us define f(A) as the set of sums of all the non-empty contiguous subarrays of A. In this case f(A) = {1,2,3,4,5,6}.  The steps to produce f(A)  are as follows:
The subarrays of A are (1), (1), (2), (2), (1,1), (1,2), (2,2), (1,1,2), (1,2,2), (1,1,2,2). Their respective sums are 1,1,2,2,2,3,4,4,5,6. The set you get from this list is therefore {1,2,3,4,5,6}.
Task
Given a set of sums S given in sorted order containing only positive integers and an array length n, your task is to output at least one array X such that f(X) = S.
For example, if S = {1,2,3,5,6} and n = 3 then a valid output is X = (1,2,3).
If there is no such array X your code should output any constant value.
Examples
Input: n=4, S = (1, 3, 4, 5, 6, 8, 9, 10, 13), possible output: X = (3, 5, 1, 4)
Input: n=6, S = (2, 3, 4, 5, 7, 8, 9, 10, 12, 14, 17, 22), possible output: X = (5, 3, 2, 2, 5, 5)
Input: n=6, S = (2, 4, 6, 8, 10, 12, 16), possible output: X = (4, 2, 2, 2, 2, 4)
Input: n=6, S = (1, 2, 3, 4, 6, 7, 8, 10, 14), possible output: X = (4, 2, 1, 1, 2, 4)
Input: n=10, S = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25), possible output: X = (1, 1, 3, 1, 2, 1, 2, 5, 4, 5).
Input: n=15, S = (1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31), possible output: X = (1, 2, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 2, 1, 3).
Input and output format
Your code can take input and give output in any easily human read format you find convenient. However, please show the output of testing it on the examples in the question.
Running time
You must be able to run the code to completion for all the examples in the question. It should in principle be correct for n up to 15 but you do not need to prove it would be fast enough for all inputs.

Comments are not for extended discussion; this conversation has been moved to chat.

Should probably have a test case with a 2-digit number.

Husk, 20 bytes
ḟȯ⁰¦ṁ∫ṫ!¡Sof~Λ€∫×:¹g

Try it online!
Returns one solution, or an empty list if it doesn't exist.
The last test case (n=15) finishes in 3.8 seconds on TIO.
Explanation
The program has two parts.
In the first part (¡ and to the right of it), we construct an infinite list whose kth element is a list containing all length-k lists whose slice sums are in S.
We do this inductively, starting from the 1-element slices of S, and at each step prepending each element of S to each list, and keeping those whose prefix sums are in S.
In the second part (! and to the left of it), we take the nth element of the list, which contains length-n lists.
Of these, we select the first one whose slice sums actually contain every element of S.
In the code, let's first replace o and ȯ (which compose two and three functions into one) by parentheses for clarity.
¡S(f~Λ€∫)×:¹g  First part. Input is a list, say S=[1,2,3]
            g  Group equal adjacent elements: [[1],[2],[3]]
¡              Iterate function:
                Argument is a list of lists, say [[1,1],[1,2],[2,1]]
         ×      Mix (combine two lists in all possible ways)
          :     by prepending
           ¹    with the list S: [[1,1,1],[1,1,2],[2,1,1],[1,2,1],[2,1,2],[3,1,1],[2,2,1],[3,1,2],[3,2,1]]
   f            Filter by condition:
        ∫        Cumulative sums: [[1,2,3],[1,2,4],[2,3,4],[1,3,4],[2,3,5],[3,4,5],[2,4,5],[3,4,6],[3,5,6]]
     ~Λ          All of the numbers
 S     €         are elements of S: [[1,1,1]]
                 Only this list remains, since the other cumulative sums contain numbers not from S.
               Result of iteration: [[[1],[2],[3]],[[1,1],[1,2],[2,1]],[[1,1,1]],[],[],[]...

ḟ(⁰¦ṁ∫ṫ)!      Second part. Implicit input, say n=2.
        !      Take nth element of above list: [[1,1],[1,2],[2,1]]
ḟ              Find first element that satisfies this:
                Argument is a list, say [1,2]
      ṫ         Tails: [[1,2],[2]]
    ṁ           Map and concatenate
     ∫          cumulative sums: [1,3,2]
 ȯ ¦            Does it contain all elements of
  ⁰             S? Yes.
               Result is [1,2], print implicitly.

There are some parts that need more explanation.
In this program, the superscripts ⁰¹ both refer to the first argument S.
However, if α is a function, then α¹ means "apply α to S", while ⁰α means "plug S to the second argument of α".
The function ¦ checks whether its first argument contains all elements of the second (counting multiplicities), so S should be its second argument.
In the first part, the function that ¡ uses can be interpreted as S(f~Λ€∫)(×:)¹.
The combinator S behaves like Sαβγ -> (αγ)(βγ), which means that we can simplify it to (f~Λ€∫¹)(×:¹).
The second part, ×:¹, is "mix with S by prepending", and its result is passed to the first part.
The first part, f~Λ€∫¹, works like this.
The function f filters a list by a condition, which in this case is ~Λ€∫¹.
It receives a list of lists L, so we have ~Λ€∫¹L.
The combinator ~ behaves like ~αβγδε -> α(βδ)(γε): the first argument is passed to β, the second to γ, and the results are combined with α.
This means that we have Λ(€¹)(∫L).
The last part ∫L is just the cumulative sums of L, €¹ is a function that checks membership in S, and Λ takes a condition (here €¹) and a list (here ∫L), and checks that all elements satisfy it.
Put simply, we filter the results of the mixing by whether their cumulative sums are all in S.

I am looking forward to the explanation!

@Anush I added a code breakdown.

I really like this solution. It's sort of beautiful.

Ruby, 135 bytes
->a,n{r=w=1;r+=1until w=(s=a[0,r]).product(*[s]*~-n).find{|x|x.sum==a.max&&a==[]|(1..n).flat_map{|r|x.each_cons(r).map(&:sum)}.sort};w}

Try it online!
Use a breadth-first search. n=10 works on TIO, n=15 takes longer than a minute, but works on my machine.
Ruby, 147 bytes
->a,n{r=w=1;r+=1until w=([a[-1]-a[-2]]).product(*[s=a[0,r]]*~-n).find{|x|x.sum==a.max&&a==[]|(1..n).flat_map{|r|x.each_cons(r).map(&:sum)}.sort};w}

Try it online!
Optimized version, works on TIO for n=15 (~20 sec)
Actually, this is the beginning of a non-brute-force approach. I hope somebody will work on it and find a complete solution.
First ideas:

The sum of the output array is the last element (max) of the input array.
The sum of the output array minus the first (or the last) element, is the second last element of the input array.
If an array is a solution, then the reverse array is a solution too, so we can assume the first element is the difference between the last 2 elements of the input array.
The second element can be the difference between second and third or second and fourth last element of the input array.

Which brings us to the next optimization:
Ruby, 175 bytes
->a,n{r=w=1;r+=1until w=([a[-1]-a[-2]]).product([a[-2]-a[-3],a[-2]-a[-4]],*[s=a[0,r]]*(n-2)).find{|x|x.sum==a.max&&a==[]|(1..n).flat_map{|r|x.each_cons(r).map(&:sum)}.sort};w}

Try it online!
~8.5 seconds on TIO. Not bad...
...and so on (to be implemented)

This looks very nice!

I am excited by your new non-brute force algorithms. If you would like more examples to test on I can add them to a new section of the question.

@Anush Actually it's still brute force (exponential time), but with some (polynomial factor) optimization.

For me you forget that the first element (the element more small) it is always in solution: so we have 1 and the last (the sum of all); and you say the second last but this for me is not clear... possible there is a way of find all others in this way...

Haskell, 117 111 bytes
6 bytes saved thanks to @nimi!
f r i n s|n<1=[r|r==[]]|1<2=[y:z|y<-s,t<-[y:map(y+)i],all(`elem`s)t,z<-f[a|a<-r,all(a/=)t]t(n-1)s]
n&s=f s[]n s

Try it online!
This computes all solutions. The helper function f builds them incrementally, the r argument contains the values of \$ S \$ that were not yet seen, the i argument contains the sums that include the newest element, n is the remaining number of elements that are needed, and s is always the given set.
When n is zero (golfed to n<1) the list must be ready, so we check if all values have been seen. If not, we return an empty list to indicate no solutions, else we return a singleton list containing an empty list, to which the chosen elements will be prepended. This case could also have been handled with the additional equations
f [] _ 0 _=[[]]
f _ _ 0 _=[]

If n is not zero, we return
[y:z|y<-s,t<-[y:map(y+)i],all(`elem`s)t,z<-f[a|a<-r,all(a/=)t]t(n-1)s]
 ^1^ ^2^^ ^......3......^ ^.....4.....^ ^.............5.............^

This is the list of (1) lists where the first element (2) comes from s and the rest (5) comes from the recursive call, under the condition (4) that all new sums are in s. The new sums are computed in (3) - note that t is drawn from a singleton list, an ugly golfing hack for what in idiomatic Haskell would be let t=y:map(y+)i. The recursive call (5) gets as new r set the old one without those elements that appear among the new sums t.
The main function & calls the helper function saying that we still have to see all values (r=s) and that there are no sums yet (i=[]).
For seven more bytes, we can restrict the computation to only give the first result (if any), which is much faster and handles all test cases in less than 2 seconds.
Try it online! (this is the first result only variation of the old version)

This is amazingly fast.  If you could explain the algorithm that would be great.

111 bytes

I am thinking of posing a fastest code version of this problem. Do you think there might be a poly time solution?

@nimi Thanks! Ah, good old map, I only tried <$> but that needed extra parens... @Anush I have no idea for a polynomial time solution

Clean, 177 bytes
import StdEnv,Data.List
$s n=find(\a=sort(nub[sum t\\i<-inits a,t<-tails i|t>[]])==s)(?{#u\\u<-s|u<=(last s)-n}(last s)n)
?e s n|n>1=[[h:t]\\h<-:e|h<=s-n,t<- ?e(s-h)(n-1)]=[[s]]

Try it online!
Takes about 40 seconds on my machine for the n=15 test case, but it times out on TIO.
Clean, 297 bytes
import StdEnv,Data.List
$s n=find(\a=sort(nub[sum t\\i<-inits a,t<-tails i|t>[]])==s)(~[u\\u<-s|u<=(last s)-n](last s)n(reverse s))
~e s n a|n>4=let u=a!!0-a!!1 in[[u,h:t]\\h<-[a!!1-a!!2,a!!1-a!!3],t<- ?e(s-u-h)(n-2)]= ?e s n
?e s n|n>1=[[h:t]\\h<-e,t<- ?(takeWhile((>=)(s-n-h))e)(s-h)(n-1)]=[[s]]

Try it online!
This one includes some optimisations made by G B as well as some of my own.
I think a few of them can be made more generic, so I'll add an explanation once that's done.
It takes about 10 seconds on my machine, 40 seconds on TIO.

Could you spell out the optimisations you used please? I am very interested.

@Anush I'll edit the answer with them and @mention you tomorrow when they're up, don't have time today unfortunately.

Python 3, 177 bytes
from itertools import*
s,n=eval(input())
for[*t]in combinations(s[:-2],n-2):
  a=[*map(int.__sub__,t+s[-2:],[0,*t,s[-2]])];
  {sum(a[p//n:p%n+1])for p in range(n*n)}^{0,*s}or-print(a)

Try it online!
(some newlines/spaces added to avoid readers having to scroll the code)
A direct port of my Jelly answer (with some modifications, see "note" section below)
Local run result:
[user202729@archlinux golf]$ printf '%s' "from itertools import*
s,n=eval(input())
for[*t]in combinations(s[:-2],n-2):a=[*map(int.__sub__,t+s[-2:],[0,*t,s[-2]])];{sum(a[p//n:p%n+1])for p in range(n*n)}^{0,*s}or-print(a)" > a.py
[user202729@archlinux golf]$ wc -c a.py
177 a.py
[user202729@archlinux golf]$ time python a.py<<<'([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25], 10)' 2>/dev/null
[1, 4, 1, 1, 1, 1, 1, 7, 7, 1]

real    0m3.125s
user    0m3.119s
sys     0m0.004s
[user202729@archlinux golf]$ time python a.py<<<'([1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31], 15)' 2>/dev/null
[3, 1, 2, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 2, 1]

real    11m36.093s
user    11m33.941s
sys     0m0.387s
[user202729@archlinux golf]$

I heard that itertools is verbose, but my best combinations implementation is even more verbose:
c=lambda s,n,p:s and c(s[1:],n-1,p+s[:1])+c(s[1:],n,p)or[]if n else[p]

Note.

Using division/modulo in a[p//n:p%n+1] takes about 2x longer, but saves some bytes.
This is a bit different from the Jelly answer -- the Jelly answer iterates backwards.
Thanks to combinations returning an iterator, this is more memory-friendly.

Jelly, 35 bytes
Ẇ§QṢ⁼³
;³ṫ-¤0;I
ṖṖœcƓ_2¤¹Ṫ©ÇÑ¬Ʋ¿ṛ®Ç

Try it online!
Run locally: (n=15 takes more than 1 GB of RAM)
aaa@DESKTOP-F0NL48D MINGW64 ~/jellylanguage (master)
$ time python scripts/jelly fu z '[1,2,3,4,5,6,7,8,9,10,11,12,14,15,16,17,18,19,20,23,24,25]'<<<10
[8, 6, 2, 1, 1, 1, 1, 3, 1, 1]
real    0m1.177s
user    0m0.000s
sys     0m0.015s

aaa@DESKTOP-F0NL48D MINGW64 ~/jellylanguage (master)
$ time python scripts/jelly fu z '[1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 2
6, 27, 28, 30, 31]'<<<15
[3, 1, 2, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 2, 1]
real    12m24.488s
user    0m0.000s
sys     0m0.015s

(actually I ran the UTF8-encoded version, which takes more than 35 bytes, but the result is the same anyway)
This solution uses short-circuit to reduce the run-time.
Without short-circuiting, this code takes roughly \$\binom {|S|-2}{n-2} \times \left( \frac {n^3}6 + n^2\log{n^2} \right)\$ operations, which evaluates to \$\binom {26-2}{15-2} \times \left( \frac {15^3}6 + 15^2\log{15^2} \right) \approx 5.79 \times 10^9\$, however due to the inefficiency of Python and Jelly, it takes forever to complete. Thanks to short-circuiting, it can finish much sooner.
Explanation
We note that the sums of all non-empty prefixes are present in the input, and they are strictly increasing. We can also assume that the largest and second-largest element is a prefix sum.
Therefore, we can consider all ways to choose \$n-2\$ distinct elements from first \$|S|-2\$ elements (there are \$\binom {|S|-2}{n-2}\$ such lists), compute the consecutive differences to recover the elements; then check if it's valid naively (get all \$n^2\$ subarrays, compute the sum, uniquify. Total length of the subarrays is about \$n^3 \over 6\$)

Untested (but should have identical performance)
Jelly, 32 bytes
Ṫ©ÑẆ§QṢ⁻³
;³ṫ-¤ŻI
ṖṖœcƓ_2¤¹Ñ¿ṛ®Ç

Try it online!

More inefficient version (without short circuit):
Jelly, 27 bytes
Ẇ§QṢ⁼³
ṖṖœcƓ_2¤µ;³ṫ-¤0;I)ÑƇ

Try it online!
For the n=15 test, it takes up to 2GB RAM and does not terminate after ~37 minutes.

note: Ẇ§ may be replaced with ÄÐƤẎ. It may be more efficient.

APL(NARS), chars 758, bytes 1516
r←H w;i;k;a;m;j
   r←⊂,w⋄→0×⍳1≥k←↑⍴w⋄a←⍳k⋄j←i←1⋄r←⍬⋄→C
A: m←i⊃w⋄→B×⍳(i≠1)∧j=m⋄r←r,m,¨∇w[a∼i]⋄j←m
B: i+←1
C: →A×⍳i≤k

G←{H⍵[⍋⍵]}

r←a d w;i;j;k;b;c
   k←↑⍴w ⋄b←⍬⋄r←0 ⋄j←¯1
A: i←1⋄j+←1⋄→V×⍳(i+j)>k
B: →A×⍳(i+j)>k⋄c←+/w[i..(i+j)]⋄→0×⍳∼c∊a⋄→C×⍳c∊b⋄b←b,c
C: i+←1⋄→B
V: →0×⍳∼a⊆b
   r←1

r←a F w;k;j;b;m;i;q;x;y;c;ii;kk;v;l;l1;i1;v1
   w←w[⍋w]⋄r←a⍴w[1]⋄l←↑⍴w⋄k←w[l]⋄m←8⌊a-2⋄b←¯1+(11 1‼m)⋄j←2⋄i←1⋄x←↑⍴b⋄i1←0⋄v1←⍬
I: i1+←1⋄l1←w[l]-w[l-i1]⋄v1←v1,w[1+l-i1]-w[l-i1]⋄→I×⍳(l1=i1)∧l>i1⋄→B
E: r←,¯1⋄→0
F: i←1⋄q←((1+(a-2)-m)⍴0),(m⍴1),0⋄r+←q
A:   i+←1⋄j+←1⋄→E×⍳j>4000
B:   →F×⍳i>x⋄q←((1+(a-2)-m)⍴0),b[i;],0⋄q+←r⋄v←q[1..(a-1)]⋄→A×⍳0>k-y←+/v
   q[a]←k-y⋄→A×⍳l1<q[a]⋄→A×⍳∼q⊆w⋄→A×⍳∼l1∊q⋄→A×⍳∼v1⊆⍦q⋄c←G q∼⍦v1⋄ii←1⋄kk←↑⍴c⋄→D
C:   →Z×⍳w d v1,ii⊃c⋄ii+←1
D:   →C×⍳ii≤kk
   →A
Z: r←v1,ii⊃c

The function G in G x (with the help of H function) would find all the permutations of x.
The function d in x d y find if the y array generate following the exercise array x returning a Boolean value.
The function F in x F y would return the array r of length x, such that y d r is true (=1)
A little long as implementation, but it is this one that calculate all case in test less time...
The last case for n=15 it run 20 second only... i have to say this not find many solutions, return
just one solution (at last it seems so) in less time (not explored  test for different inputs...)
16+39+42+8+11+11+18+24+24+54+11+12+7+45+79+69+12+38+26+72+79+27+15+6+13(758)
  6 F (2, 3, 4, 5, 7, 8, 9, 10, 12, 14, 17, 22)
5 3 2 2 5 5
  6 F (2, 4, 6, 8, 10, 12, 16)
4 2 2 2 2 4
  6 F (1, 2, 3, 4, 6, 7, 8, 10, 14)
4 2 1 1 2 4
  10 F (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25)
1 1 3 1 2 3 5 1 3 5
  15 F (1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31)
1 2 1 3 3 1 3 3 1 3 3 1 2 1 3
  ww←(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25)
  ww≡dx 1 1 3 1 2 3 5 1 3 5
1


text:
Is this a BST pre-order traversal?
Background
A binary tree is a rooted tree whose every node has at most two children.
A labelled binary tree is a binary tree whose every node is labelled with a positive integer; moreover, all labels are distinct.
A BST (binary search tree) is a labelled binary tree in which the label of each node is greater than the labels of all the nodes in its left subtree, and smaller than the labels of all the nodes in its right subtree. For instance, the following is a BST:

The pre-order traversal of a labelled binary tree is defined by the following pseudo-code.
function preorder(node)
    if node is null then
        return
    else
        print(node.label)
        preorder(node.left)
        preorder(node.right)

See the following image to get a better intuition:

The vertices of this binary tree are printed in the following order:
F, B, A, D, C, E, G, I, H

You can read more about BSTs here, and more about pre-order traversal here.
Challenge
Given a list of integers \$a\$, your task is to determine whether there is a BST whose pre-order traversal prints exactly \$a\$.
Input

A non-empty list of distinct positive integers \$a\$.
Optionally, the length of \$a\$.

Output

A truthy value if \$a\$ is the pre-order traversal of some BST.
A falsey value otherwise.

Rules

Standard rules for valid submissions, I/O, loopholes apply.
This is code-golf, so shortest solution (in bytes) wins. As usual, don't let ridiculously short solutions in golfy languages discourage you from posting a longer answer in your language of choice.
This is not a rule, but your answer will be better received if it includes a link to test the solution and an explanation of how it works.

Examples
Input                   ---->   Output

[1]                     ---->   True
[1,2,3,4]               ---->   True
[5,1,4,2,3]             ---->   True
[5,4,3,2,1,6,7,8,9]     ---->   True
[4,2,1,3,6,5,7]         ---->   True
[8,3,1,6,4,7,10,14,13]  ---->   True
[2,3,1]                 ---->   False
[6,3,2,4,5,1,8,7,9]     ---->   False
[1,2,3,4,5,7,8,6]       ---->   False
[3,1,4,2]               ---->   False

Check out this link (courtesy of Kevin Cruijssen) to have a visual look at the examples.

Here a pastebin of the test cases to have a more visual look as to how they are truthy/falsey. Nice challenge btw, +1 from me.

JavaScript (Node.js), 49 bytes
a=>!a.some((p,i)=>a.some((q,j)=>q>p&a[j+=j>i]<p))

Try it online!
Using the fact that for array \$a_0 ... a_{n-1}\$, \$a\$ is the pre-order traversal of some BST iff \$ \forall 0\le i<j<n; a_i<a_{j-1} \implies a_i<a_j \$ holds.
Thanks to Arnauld, save 1 byte.

Jelly, 7 bytes
ŒPŒ¿€4ḟ

Try it online!
Returns [4] for traversals, otherwise [].
Essentially uses tsh's algorithm: the "disqualifying" condition for a pre-order traversal is a subsequence of 3 elements that looks like [mid, high, low]. (For example, [20, 30, 10].)
We equivalently check for any subsequences of any length that have index 4 in their permutation lists, which are all lists sorted like [a1 … ak c d b] where the ai are sorted and ai < b < c < d. (Each such list is disqualifying if we look at the last three elements, and each disqualifying list is obviously of this form.)
ŒP          All subsequences.
  Œ¿€       Permutation index of each.
     4ḟ     Set difference of {4} and this list.

Proof

A pre-order traversal contains no disqualifying subsequences
Base case: traversal(•) is the empty list. ✓
Induction: traversal(t) is: t.root ++ traversal(t.left) ++ traversal(t.right).
Let [a, b, c] be a subsequence hereof. We'll show c < a < b is impossible.

If t.root = a, then c < a < b requires c ∈ t.left and b ∈ t.right, so [a, b, c] is the wrong order.
If a, b, c ∈ t.left or a, b, c ∈ t.right, use the induction hypothesis.
If a ∈ t.left and c ∈ t.right then c > a.

A list of distinct integers without disqualifying subsequences is the pre-order traversal of a BST
If the list is empty, it's the traversal of the trivial BST •.
If the list is head followed by tail:

Let less be the longest prefix of tail of elements less than head, and let more be the rest of the list.
Then more[1] > head, and all other more[i] are greater than head too (otherwise [head, more[1], more[i]] would be a disqualifying subsequence).
Recurse: turn less and more into BSTs.
Now our list is the traversal of
                 head
                /    \
         BST(less)   BST(more),

and this tree is a valid BST.

Nice proof. Actually I didn’t proved the formula when I post the answer. I just felt that it is correct after some attempts to construct the BST from input.

Java 10, 94 bytes
a->{var r=0>1;for(int j=a.length-1,i;j-->0;)for(i=0;i<j;)r|=a[j]>a[i]&a[j+1]<a[i++];return!r;}

Port of @tsh' JavaScript answer.
Try it online.
Explanation:
a->{                      // Method with integer-array parameter and boolean return-type
  var r=0>1;              //  Result-boolean, starting at false
  for(int j=a.length-1,i;j-->0;)
                          //  Loop `j` in the range (length-1, 0]:
    for(i=0;i<j;)         //   Inner loop `i` in the range [0, j):
      r|=                 //    If any are true, change the result to true as well:
         a[j]>a[i]        //     The `j`'th item is larger than the `i`'th item
         &a[j+1]<a[i++];  //     And the `j+1`'th item is smaller than the `i`'th item
  return!r;}              //  After the nested loop, check if the boolean is still false

TIL that Java booleans can be reassigned with |=. I assume &= would also work?

@J.Sallé Yep, both |= and &= work as shortcuts for b = b | condition and b = b & condition (where the & and | are shortcuts for && and || in most cases of course).

Ruby, 46 40 38 bytes
f=->r{a,*b=r;!a||b==b&[*0..a]|b&&f[b]}

Try it online!
This works by recursively taking the first element a as a pivot, and checking if the rest of the array can be split in two (using intersection and union: first remove all elements >a, then add them again on the right and check if something has changed).

Retina 0.8.2, 31 bytes
\d+
$*
M`\b((1+)1+,).*\1\2\b
^0

Try it online! Link includes test cases. Uses @tsh's algorithm. Explanation:
\d+
$*

Convert to unary.
M`\b((1+)1+,).*\1\2\b

Find numbers that lie between two subsequent consecutive descending numbers.
^0

Check that the number of matches is zero.

05AB1E, 15 10 bytes
ŒεD{3.IÊ}P

Port of @Lynn's Jelly answer.
-5 bytes thanks to @Emigna.
Try it online or verify all test cases.
Explanation:"
Œ             # Take all sublists of the (implicit) input-list
              #  i.e. [2,3,1] → [[2],[2,3],[2,3,1],[3],[3,1],[1]]
              #  i.e. [1,2,3,4]
              #   → [[1],[1,2],[1,2,3],[1,2,3,4],[2],[2,3],[2,3,4],[3],[3,4],[4]]
 ε      }     # Map each to:
  D           #  Duplicate the current sublist on the stack
   {          #  Sort the copy
              #   i.e. [2,3,1] → [1,2,3]
              #   i.e. [2,3,4] → [2,3,4]
    3.I       #  Get the 4th (3rd 0-indexed) permutation of this list
              #   i.e. [1,2,3] → [2,3,1]
              #   i.e. [2,3,4] → [3,4,2]
       Ê      #  Check that the lists are NOT equal
              #   i.e. [2,3,1] and [2,3,1] → 0 (falsey)
              #   i.e. [2,3,4] and [3,4,2] → 1 (truthy)
         P    # Check whether all are truthy (and output implicitly)
              #  i.e. [1,1,0,1,1,1] → 0 (falsey)
              #  i.e. [1,1,1,1,1,1,1,1,1,1] → 1 (truthy)

How about ŒεD{3.IÊ}P ?

@Emigna Yeah, that would be indeed a lot easier... >.> Thanks! :) (And have a nice weekend.)

Perl 6, 38 bytes
!*.combinations(3).grep:{[>] .[1,0,2]}

Try it online!
Explanation
 *.combinations(3)  # All combinations of 3 elements a,b,c
!                 .grep:{            }  # Return false if check succeeds for any combination
                         [>] .[1,0,2]   # Check whether b>a>c, that is b>a and c<a

Haskell, 50 bytes
f[]=1<3
f(x:r)|(a,b)<-span(<x)r=all(>x)b&&f a&&f b

Try it online!

Scala (68 67 Bytes)
def%(i:Seq[Int])= !i.combinations(3).exists(c=>c(0)<c(1)&c(0)>c(2))

Try it online
Port of @nwellnhof's answer.
Scala (122 103 bytes)
def f(i:Seq[Int]):Boolean=if(i.size<1)1>0 else{val(s,t)=i.tail.span(_<i(0));t.forall(_>i(0))&f(s)&f(t)}

Thanks to @Laikoni for the suggestions to make both solutions shorter.
Try it online
Explanation:

slice (using Scala's span) the array using array's head as the slicing criteria.
Confirm that the first slice of the array is less than the head and the second slice is greater than the head.
recursively check that each slice also satisfies (2)

I think you don't need the space in val (s,t), true can be 1>0 and you can drop s.forall(_<i(0))& as this should already be insured by span.

You can call the function % and drop the space: def%(i:Seq[Int])=

Your solutions contain declaration of the function unlike some other. Pure expressions are quite shorter. ;)

I was trying to port tsh's answer, but did not manage to get it short enough. Version 1. l.zipWithIndex.foldLeft(1>0){case(r,v,i)=>r&l.zip(l.tail).slice(i+1,l.length).forall(x=>l(i)>x._1|l(i)<x._2)}. Version 2. (for(i<-l.indices)yield l.zip(l.tail).slice(i+1,l.length).forall(x =>l(i)>x._1|l(i)<x._2)).forall(x=>x). Any ideas how to make these shorter?

Algorithm in plain English: for each element do a check with all the pairs of elements going next to each other.

Correction case(r,v,i) should be case(r,(v,i)).

Last try is 100 byte long expression l.indices.foldLeft(1>0)((r,i)=>r&(l.zip(l.tail).slice(i+1,l.length).forall(x=>l(i)>x._1|l(i)<x._2))). Sorry for spam. :)

@DrYWit, nice one. I am not 100% sure if I should include the function declaration or not in the character count. I think either some form of reading input (a full program) or a function with the full body should be used for the count.

Why simply not def%(i:Seq[Int])={val(s,t)=i.tail.span(_<i(0));t.forall(_>i(0))&f(s)&f(t)}? It works fine for empty lists as well as for lists shorter than 3 elems.

@DrYWit, because Scala needs result type for recursive functions or it won't compile.

Sorry, yup result type is required but not an if expression.

Haskell, 41 bytes
f(h:t)=t==[]||all(>h)(snd$span(<h)t)&&f t

Try it online!
Uses Lynn's observation that it suffices to check that there's no subsequence of the for mid..high..low. This means that for each element h, the list of elements t that comes after is a block of elements <h followed by a block of elements >h (both blocks may be empty). So, the code checks that after we drop the prefix of elements <h in t, the remaining elements are all >h. Recursing checks this for each initial element h until the list is length 1.
A potential simplification is that it suffices to check for subpatterns mid..high,low where the last two are consecutive. Unfortunately, Haskell's doesn't have an short way to extract the last two elements, as can be done from the front with a pattern match a:b:c. I found a shorter solution that checks for mid,high..low, but this fails to reject inputs like [3,1,4,2].
Formatted test cases taken from Laikoni.

Japt, 14 bytes
d@sY ð_§XÃxÈ-Y

Japt Interpreter
Outputs false for BST, true for no BST.
Explanation:
d@                Run on each item X, return true if any aren't 0:
  sY                  Ignore the numbers before this index
     ð_§XÃ            Get the indexes of numbers less than or equal to X
                          If it is a BST, this list will be e.g. [0,1,2...]
            -Y        Subtract the position within the index list from each index
                          eg. [0,1,2] -> [0,0,0] , [0,1,4] -> [0,0,2]
          xÈ          Sum the resulting array

Scala
All approaches are implementations of the rule shown by tsh.
109
l.zipWithIndex.foldLeft(1>0){case(r,(v,i))=>r&l.zip(l.tail).slice(i+1,l.size).forall(x=>l(i)>x._1|l(i)<x._2)}

101
(for(i<-l.indices)yield l.zip(l.tail).slice(i+1,l.size).forall(x =>l(i)>x._1|l(i)<x._2)).forall(x=>x)

98
l.indices.foldLeft(1>0)((r,i)=>r&(l.zip(l.tail).slice(i+1,l.size).forall(x=>l(i)>x._1|l(i)<x._2)))

78
(for(i<-l.indices;j<-i+1 to l.size-2)yield l(i)>l(j)|l(i)<l(j+1)).forall(x=>x)

If it must be a function and not just an expression then each line have to start with (17 bytes)
def%(l:Seq[Int])=

Husk, 10 bytes
Λo≠4Ṡ€oPOQ

Try it online!
Same idea as Kevin Cruijssen's answer.

Oracle SQL, 177 bytes
with r(i,v)as(select rownum,value(t)from table(a)t)
select nvl(min(case when r.v<p.l and r.v>p.v then 0end),1)from r,(select i,lag(v)over(order by i)l,v from r)p where r.i+1<p.i

Since there is no boolean type in Oracle SQL, query returns either 1 or 0.
Oracle SQL 12c, 210 bytes
with function f(n ku$_objnumset,i int)return int as begin return n(i);end;
select min(case when f(c,1)>f(c,2)or f(c,1)<f(c,3)then 1else 0end)from(select value(t)c from table(powermultiset_by_cardinality(a,3))t)

It's not possible access element of the array in SQL the same way as in PL/SQL - i.e. a(i), thus function f was declared in with clause for that purpose. Otherwise solution would have been much shorter.
Other limitations

throws an exception for arrays shorter than 3 elements (instead of returning 1)
there is an assumption that powermultiset_by_cardinality preserves order even though it's not explicitly stated in the documentation

sqlplus listing
SQL> set heading off
SQL> with r(i,v)as(select rownum,value(t)from table(ku$_objnumset(6,3,2,4,5,1,8,7,9))t)
  2  select nvl(min(case when r.v<p.l and r.v>p.v then 0end),1)from r,
  3  (select i,lag(v)over(order by i)l,v from r)p where r.i+1<p.i
  4  /

                                            0

SQL> with function f(n ku$_objnumset,i int)return int as begin return n(i);end;
  2  select min(case when f(c,1)>f(c,2)or f(c,1)<f(c,3)then 1else 0end)
  3  from(select value(t)c from table(powermultiset_by_cardinality(ku$_objnumset(6,3,2,4,5,1,8,7,9),3))t)
  4  /

                                                     0

SQL> with r(i,v)as(select rownum,value(t)from table(ku$_objnumset(8,3,1,6,4,7,10,14,13))t)
  2  select nvl(min(case when r.v<p.l and r.v>p.v then 0end),1)from r,
  3  (select i,lag(v)over(order by i)l,v from r)p where r.i+1<p.i
  4  /

                                            1

SQL> with function f(n ku$_objnumset,i int)return int as begin return n(i);end;
  2  select min(case when f(c,1)>f(c,2)or f(c,1)<f(c,3)then 1else 0end)
  3  from(select value(t)c from table(powermultiset_by_cardinality(ku$_objnumset(8,3,1,6,4,7,10,14,13),3))t)
  4  /

                                                     1

Online verification apex.oracle.com
Update
Oracle SQL, 155 bytes
with r(i,v)as(select rownum,value(t)from table(a)t)select nvl(min(case when a.v<b.v and a.v>c.v then 0end),1)r from r a,r b,r c where a.i<b.i and b.i+1=c.i

C, 823 bytes (not counting whitespace characters); 923 bytes (including whitespace)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct tree
{struct tree * left;struct tree * right;int val;}tree;static int * test_p = 0;
void insert_root(tree ** root, int in)
{if (*root == NULL){*root = (tree *)calloc(1,sizeof(tree));(*root)->val = in;return;}else if (in < (*root)->val){insert_root(&((*root)->left),in);}else{insert_root(&((*root)->right),in);}}
void preorder(tree * root)
{if ( root == 0x0 ) { return; }*test_p++ = root->val;preorder(root->left);preorder(root->right);}
int main(int argc, char ** argv)
{int test_list[argc-1];memset(test_list,0,argc*sizeof(int));test_p = test_list;tree * root = (tree *)calloc(1,sizeof(tree));root->val = strtol(argv[1],0x0,10);int i = 1;while ( argv[++i] != 0x0 ){insert_root(&root,strtol(argv[i],0x0,10));}preorder(root);test_p = test_list;i = 1;while ( ( i < argc ) ){if ( *test_p != strtol(argv[i],0x0,10) ){return 0;}test_p++;i++;}return 1;}

The readable version of the program is below:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct tree
{
    struct tree * left;

    struct tree * right;

    int val;

} tree;

static int * test_p = 0;

void insert_root(tree ** root, int in)
{
  if (*root == NULL)
  {
    *root = (tree *)calloc(1,sizeof(tree));

    (*root)->val = in;

    return;
  }

  else if (in < (*root)->val)
  {
    insert_root(&((*root)->left),in);
  }

  else
  {
    insert_root(&((*root)->right),in);
  }
}

void preorder(tree * root)
{
    if ( root == 0x0 ) {  return; }

        *test_p++ = root->val;

        preorder(root->left);

        preorder(root->right);

}

int main(int argc, char ** argv)
{
    int test_list[argc-1];

    memset(test_list,0,argc*sizeof(int));

    test_p = test_list;

    tree * root = (tree *)calloc(1,sizeof(tree));

    root->val = strtol(argv[1],0x0,10);

    int i = 1;

    while ( argv[++i] != 0x0 )
    {
        insert_root(&root,strtol(argv[i],0x0,10));
    }

    preorder(root);

    test_p = test_list;

    i = 1;

    while ( ( i < argc ) )
    {
        if ( *test_p != strtol(argv[i],0x0,10) )
        {
            return 0;
        }

        test_p++;

        i++;
    }

    return 1;
}

The main method in this program reads the list of numbers that are (allegedly) a legitimate preorder traversal.
The function insert_root that is called inserts the integers into a binary search tree where previous nodes contain lesser values and next nodes contain larger int values.
The function preorder(root) traverses the tree in a preorder traversal and simultaneously concatenates each integer the algorithm comes across to the int array test_list.
A final while loop tests if each of the int values in the stdin list and those in test_list are equivalent at each index. If there is a list element from stdin that fails to match the corresponding element in test_list at the respective index, the main function returns 0. Else the main method returns 1.
To determine what main returned, type echo $status into the bash terminal. BASH will either print out a 1 or a 0.

Your score is the one counting whitespace.

337 bytes

Husk, 9 bytes
¬ṁ§=Oṙ2Ṗ3

Try it online!
Uses 'disqualifying condition' of any subsequence mid...high...low from tsh's and Lynn's answers.
¬ṁ§=Oṙ2Ṗ3
       Ṗ3   # consider all subsequences of length 3:
     ṙ2     # check whether rotating 2 to the left
  §=O       # is the same as sorting;
¬ṁ          # total of subsequences that satisfy this should be zero