Data update

This commit is contained in:
Ingy döt Net 2024-03-06 22:25:12 -08:00
parent ed705008a8
commit 0df55f9f24
2196 changed files with 32999 additions and 3075 deletions

View file

@ -6,7 +6,7 @@ repeat
while substr s$ i 1 = " "
i += 1
.
s$ = "0 " & substr s$ i -1 & " 0"
s$ = "0 " & substr s$ i 999 & " 0"
b[] = number strsplit s$ " "
for i = 2 to len b[] - 1
b[i] = higher (b[i] + a[i - 1]) (b[i] + a[i])

View file

@ -27,10 +27,10 @@ public program()
int i := 0;
int j := 0;
input.splitBy(newLineConstant).forEach:(string line)
input.splitBy(newLineConstant).forEach::(string line)
{
j := 0;
line.trim().splitBy(" ").forEach:(string num)
line.trim().splitBy(" ").forEach::(string num)
{
list[i][j] := num.toInt();
@ -40,9 +40,9 @@ public program()
i += 1
};
for(int i := 16, i >= 0, i-=1)
for(int i := 16; i >= 0; i-=1)
{
for(int j := 0, j < 18, j += 1)
for(int j := 0; j < 18; j += 1)
{
list[i][j] := max(list[i][j] + list[i+1][j], list[i][j] + list[i+1][j+1])
}