From 1e4324fc92b863de1f52e4c5a7f2a45c4c0289fb Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Fri, 5 Dec 2025 00:06:58 +0100 Subject: Day 3 --- day3/solution.TXT | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 day3/solution.TXT (limited to 'day3/solution.TXT') diff --git a/day3/solution.TXT b/day3/solution.TXT new file mode 100644 index 0000000..52fcc0b --- /dev/null +++ b/day3/solution.TXT @@ -0,0 +1,31 @@ +\START92\ +\COMMENT=Single file dated Fri Dec 5 00:04:24 20 +\NAME=solution +\FILE=day3.solution.92f +(s,l) +Func +Local ds,p1,p2,curr,result +0\->\result +1\->\p1 +dim(s)\->\ds +While p1\<=\ds + inString(s," ",p1)\->\p2 + If p2\<=\0 Then + mid(s,p1)\->\curr + ds+1\->\p2 + ElseIf p2=p1 Then + p1+1\->\p1 + Goto continue + Else + mid(s,p1,p2-p1)\->\curr + EndIf + p2\->\p1 + + result+maxj(curr,l)\->\result + Lbl continue +EndWhile + +Return result +EndFunc + +\STOP92\ -- cgit v1.2.3