Data update

This commit is contained in:
Ingy döt Net 2024-07-13 15:19:22 -07:00
parent 29a5eea0d4
commit 5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions

View file

@ -0,0 +1,36 @@
func sorted s[] .
for c in s[]
if c < last
return 0
.
last = c
.
return 1
.
func$ tostr s[] .
for s in s[]
res$ &= s & " "
.
return res$
.
proc shuffle . s[] .
for i = len s[] downto 2
swap s[i] s[randint i]
.
.
proc reverse n . s[] .
for i = 1 to n div 2
swap s[i] s[n - i + 1]
.
.
data[] = [ 1 2 3 4 5 6 7 8 9 ]
while sorted data[] = 1
shuffle data[]
.
while sorted data[] = 0
print tostr data[]
score += 1
nflip = number input
reverse nflip data[]
.
print "Score " & score