Keep a shared okay of 0. The target is 11.
To inspect from value (a whole number). Set okay to 1. The written is format whole number value as text.
For every spot from 0 to the length of written minus 1.
The digit is the digit value of character spot of written. If digit is 0, set okay to 0.
For every first from 1 to target minus 1.
The second is target minus first. Inspect from first. The leftokay is okay. Inspect from second. If leftokay is 1 and okay is 1, Show first, Show second, stop.
The first is 2. The second is 6. The target is 5. The flips is 0.
Repeat while first is more than 0 or second is more than 0 or target is more than 0.
The firstbit is first modulo 2. The secondbit is second modulo 2. The targetbit is target modulo 2. The wanted is (1 minus firstbit) times (1 minus secondbit). Set first to first divided by 2. Set second to second divided by 2. Set target to target divided by 2. If targetbit is 0, Add firstbit to flips, Add secondbit to flips, otherwise Add wanted to flips.
Show flips.
Keep a shared starts as an empty list of whole numbers. Keep a shared edges as an empty list of whole numbers. Keep a shared counts as an empty list of whole numbers. Keep a shared seen as an empty list of whole numbers. Keep a shared queue as an empty list of whole numbers. Keep a shared tail of 0. Place 0 into starts. Place 2 into starts. Place 4 into starts. Place 6 into starts. Place 1 into edges. Place 2 into edges. Place 0 into edges. Place 2 into edges. Place 0 into edges. Place 1 into edges. Place 2 into counts. Place 2 into counts. Place 2 into counts. Place 0 into counts. For every node from 0 to 3, Place 0 into seen. For every cell from 0 to 15, Place 0 into queue.
To reach from node (a whole number).
For every offset from 0 to item node of counts minus 1.
The base is item node of starts. The target is item (base plus offset) of edges. If item target of seen is 0, Set item target of seen to 1, Set item tail of queue to target, Add 1 to tail.
To explore from source (a whole number). The head is 0. Set tail to 1. Set item 0 of queue to source. Set item source of seen to 1.
Repeat while head is less than tail.
The node is item head of queue. Add 1 to head. Reach from node.
The parts is 0. For every source from 0 to 3, if item source of seen is 0, Explore from source, add 1 to parts. The links is 3. The needed is 3. If links is less than needed, Show -1, otherwise Show parts minus 1.
Keep a shared word as empty text. Keep a shared seeds as an empty list of text. Keep a shared alphabet as empty text. Keep a shared letters as an empty list of text. Keep a shared gaps as an empty list of whole numbers. Keep a shared costs as an empty list of whole numbers. Keep a shared nexts as an empty list of whole numbers. Keep a shared key of 0. Place "CAKE" into seeds. Set word to item 0 of seeds. Place "ABCDEFGHIJKLMNOPQRSTUVWXYZ" into letters. Set alphabet to item 0 of letters. For every cell from 0 to 728, Place 0 into gaps. For every cell from 0 to 728, Place 1000000 into costs. For every cell from 0 to 728, Place 1000000 into nexts.
To locate from spot (a whole number). The symbol is character spot of word. Set key to 0.
For every look from 0 to 25.
The candidate is character look of alphabet. If candidate is symbol, Set key to look.
To improve from one (a whole number) with two (a whole number) and goal (a whole number). The here is one times 27 plus two. The value is item here of costs.
If value is less than 1000000.
The reach is value plus item (one times 27 plus goal) of gaps. The slot is goal times 27 plus two. If reach is less than item slot of nexts, Set item slot of nexts to reach.
To improveother from one (a whole number) with two (a whole number) and goal (a whole number). The here is one times 27 plus two. The value is item here of costs.
If value is less than 1000000.
The reach is value plus item (two times 27 plus goal) of gaps. The slot is one times 27 plus goal. If reach is less than item slot of nexts, Set item slot of nexts to reach.
To relax from one (a whole number) with two (a whole number) and goal (a whole number). Improve from one with two and goal. Improveother from one with two and goal.
To advance from goal (a whole number). For every cell from 0 to 728, Set item cell of nexts to 1000000.
For every one from 0 to 26.
For every two from 0 to 26.
Relax from one with two and goal.
To adopt.
For every cell from 0 to 728.
Set item cell of costs to item cell of nexts. Set item cell of nexts to 1000000.
For every one from 0 to 26.
For every two from 0 to 26.
The rowone is one divided by 6. The colone is one modulo 6. The rowtwo is two divided by 6. The coltwo is two modulo 6. The raw is the absolute value of (rowone minus rowtwo) plus the absolute value of (colone minus coltwo). If one is 26 or two is 26, Set item (one times 27 plus two) of gaps to 0, otherwise Set item (one times 27 plus two) of gaps to raw.
Locate from 0. Set item (key times 27 plus 26) of costs to 0. The start is 1.
Repeat while start is less than 4.
Locate from start. The goal is key. Advance from goal. Adopt. Increase start by 1.
The best is 1000000.
For every cell from 0 to 728.
The value is item cell of costs. If value is less than best, Set best to value.
Show best.
The number is 9669. The written is format whole number number as text. The result is 0. The changed is 0.
For every spot from 0 to the length of written minus 1.
The digit is the digit value of character spot of written. The chosen is digit. If changed is 0 and digit is 6, set chosen to 9, set changed to 1. Set result to result times 10 plus chosen.
Show result.
The source is "HOW ARE YOU". The words is split source by " ".
For every level from 0 to 2.
The line is empty text. For each word in words, Place character level of word into line. Show line.
Keep a shared values as an empty list of whole numbers. Keep a shared lefts as an empty list of whole numbers. Keep a shared rights as an empty list of whole numbers. Keep a shared newleft as an empty list of whole numbers. Keep a shared newright as an empty list of whole numbers. Keep a shared resultnode of 0. Keep a shared queue as an empty list of whole numbers. Keep a shared order as an empty list of text. Keep a shared tail of 0. Keep a shared target of 2. Place 1 into values. Place 2 into values. Place 3 into values. Place 2 into values. Place 2 into values. Place 3 into values. Place 4 into values. Place 1 into lefts. Place 3 into lefts. Place 5 into lefts. Place -1 into lefts. Place -1 into lefts. Place -1 into lefts. Place -1 into lefts. Place 2 into rights. Place 4 into rights. Place 6 into rights. Place -1 into rights. Place -1 into rights. Place -1 into rights. Place -1 into rights. For every node from 0 to 6, Place 0 into newleft. For every node from 0 to 6, Place 0 into newright. For every cell from 0 to 15, Place 0 into queue.
To prune from node (a whole number). If node is less than 0, set resultnode to -1, return. The left is item node of lefts. The right is item node of rights. Prune from left. The freshleft is resultnode. Prune from right. The freshright is resultnode. Set item node of newleft to freshleft. Set item node of newright to freshright. The piece is item node of values. If freshleft is less than 0 and freshright is less than 0 and piece is target, set resultnode to -1, otherwise set resultnode to node.
To spread from node (a whole number). The left is item node of newleft. The right is item node of newright. Set item tail of queue to left. Add 1 to tail. Set item tail of queue to right. Add 1 to tail.
To handlelive from node (a whole number). The piece is item node of values. The written is format whole number piece as text. Place written into order. Spread from node.
To handle from node (a whole number). If node is less than 0, Place "-1" into order, otherwise Handlelive from node.
Prune from 0. The root is resultnode. The head is 0. Set tail to 1. Set item 0 of queue to root.
Repeat while head is less than tail.
The node is item head of queue. Add 1 to head. Handle from node.
The mark is "-1". The cut is the last position of order.
Repeat while cut is at least 0.
The symbol is item cut of order. If symbol matches mark, set cut to cut minus 1, otherwise stop.
For every spot from 0 to cut, Show item spot of order.
Keep a shared ranges as an empty list of whole numbers. Keep a shared reach as an empty list of whole numbers. Keep a shared nextedge of 0. Place 3 into ranges. Place 4 into ranges. Place 1 into ranges. Place 1 into ranges. Place 0 into ranges. Place 0 into ranges. For every spot from 0 to 5, Place 0 into reach.
To offer from tap (a whole number). The span is item tap of ranges. The start is the larger of tap minus span and 0. The finish is the smaller of tap plus span and 5. If finish is more than item start of reach, Set item start of reach to finish.
To grow from low (a whole number) with high (a whole number). Set nextedge to 0.
For every spot from low to high.
The here is item spot of reach. If here is more than nextedge, set nextedge to here.
For every tap from 0 to 5, Offer from tap. The taps is 0. The edge is 0. The low is 0.
Repeat while edge is less than 5.
Grow from low with edge. If nextedge is more than edge, Add 1 to taps, Set low to edge plus 1, Set edge to nextedge, otherwise Set taps to -1, stop.
If taps is at least 0, Show taps.
Keep a shared word as empty text. Keep a shared seeds as an empty list of text. Keep a shared mark as empty text. Keep a shared lowercode of 0. Place "abccba" into seeds. Set word to item 0 of seeds. Set lowercode to character 0 of "a". Place character 0 of "a" into mark.
To replace at spot (a whole number). The head is the slice of word from 0 to spot. The tail is the slice of word from spot plus 1 to 6. The parts is a list of head, mark, and tail. The result is join parts with empty text. Show result.
The spot is 0. The changed is 0.
Repeat while spot is less than 3 and changed is 0.
The piece is character spot of word. The here is spot. Add 1 to spot. If piece is not lowercode, Replace at here, set changed to 1.
Keep a shared matrix as an empty list of whole numbers. Keep a shared pieces as an empty list of whole numbers. Place 3 into matrix. Place 3 into matrix. Place 1 into matrix. Place 1 into matrix. Place 2 into matrix. Place 2 into matrix. Place 1 into matrix. Place 2 into matrix. Place 1 into matrix. Place 1 into matrix. Place 1 into matrix. Place 2 into matrix.
To trimpieces.
Repeat while the last position of pieces is at least 0.
Remove the last item from pieces.
To collect from row (a whole number) with column (a whole number). The currentrow is row. The currentcolumn is column.
Repeat while currentrow is less than 3 and currentcolumn is less than 4.
The index is currentrow times 4 plus currentcolumn. The value is item index of matrix. Place value into pieces. Add 1 to currentrow. Add 1 to currentcolumn.
To restore from row (a whole number) with column (a whole number). The currentrow is row. The currentcolumn is column. The cursor is 0.
Repeat while currentrow is less than 3 and currentcolumn is less than 4.
The index is currentrow times 4 plus currentcolumn. Set item index of matrix to item cursor of pieces. Add 1 to cursor. Add 1 to currentrow. Add 1 to currentcolumn.
To fix from row (a whole number) with column (a whole number). Trimpieces. Collect from row with column. Sort pieces. Restore from row with column.
For every column from 0 to 3, Fix from 0 with column. For every row from 1 to 2, Fix from row with 0. For every spot from 0 to 11, Show item spot of matrix.
Keep a shared numbers as an empty list of whole numbers. Keep a shared total of 0. Keep a shared mapped of 0. Keep a shared best of 0. Place 2 into numbers. Place 3 into numbers. Place 1 into numbers. Place 5 into numbers. Place 4 into numbers.
To map from spot (a whole number) with left (a whole number) and right (a whole number). If spot is at least left and spot is at most right, Set mapped to left plus right minus spot, otherwise Set mapped to spot.
To measure from left (a whole number) with right (a whole number). Set total to 0.
For every edge from 0 to 3.
Map from edge with left and right. The first is mapped. Map from edge plus 1 with left and right. The second is mapped. The one is item first of numbers. The two is item second of numbers. The gap is the absolute value of (one minus two). Add gap to total.
To compare. If total is more than best, Set best to total.
For every left from 0 to 4.
For every right from left to 4.
Measure from left with right. Compare.
Show best.
Keep a shared numbers as an empty list of whole numbers. Keep a shared position of 0. Place 40 into numbers. Place 10 into numbers. Place 20 into numbers. Place 30 into numbers.
To rank from value (a whole number). Set position to 1.
For every other from 0 to 3.
The candidate is item other of numbers. If candidate is less than value, add 1 to position.
For each value in numbers.
Rank from value. Show position.
The word is "baabb". The left is 0. The right is 4. The mirror is 1.
Repeat while left is less than right.
The first is character left of word. The second is character right of word. Add 1 to left. Decrease right by 1. If first is not second, set mirror to 0.
If mirror is 1, Show 1, otherwise Show 2.
Keep a shared rows as an empty list of whole numbers. Keep a shared ids as an empty list of whole numbers. Keep a shared ratings as an empty list of whole numbers. Keep a shared total of 0. Keep a shared winner of 0. Place 1 into rows. Place 4 into rows. Place 1 into rows. Place 40 into rows. Place 10 into rows. Place 2 into rows. Place 8 into rows. Place 0 into rows. Place 50 into rows. Place 5 into rows. Place 3 into rows. Place 8 into rows. Place 1 into rows. Place 30 into rows. Place 4 into rows. Place 4 into rows. Place 10 into rows. Place 0 into rows. Place 10 into rows. Place 3 into rows. Place 5 into rows. Place 1 into rows. Place 1 into rows. Place 15 into rows. Place 1 into rows.
To consider from restaurant (a whole number). The base is restaurant times 5. The vegan is item (base plus 2) of rows. The price is item (base plus 3) of rows. The distance is item (base plus 4) of rows. If vegan is 1 and price is at most 50 and distance is at most 10, Place item base of rows into ids, Place item (base plus 1) of rows into ratings, Add 1 to total.
To better from other (a whole number) with best (a whole number). The rating is item other of ratings. The otherid is item other of ids. If rating is more than item best of ratings or rating is item best of ratings and otherid is more than item best of ids, set winner to other.
To settle from spot (a whole number). Set winner to spot. For every other from spot plus 1 to total minus 1, Better from other with winner. The best is winner. The holdid is item spot of ids. The holdrating is item spot of ratings. Set item spot of ids to item best of ids. Set item spot of ratings to item best of ratings. Set item best of ids to holdid. Set item best of ratings to holdrating.
For every restaurant from 0 to 4, Consider from restaurant. For every spot from 0 to total minus 2, Settle from spot. For every spot from 0 to total minus 1, Show item spot of ids.
The cities is 4, while the limit is 4. The links is a list of 0, 1, 3, 1, 2, 1, 1, 3, 4, 2, 3, and 1. The distance is a list of 16 zeros.
For every spot from 0 to 15.
Set item spot of distance to 1000000.
For every city from 0 to 3.
Set item (city times 4 plus city) of distance to 0.
For every link from 0 to 3.
The start is item (link times 3) of links. The finish is item (link times 3 plus 1) of links. The weight is item (link times 3 plus 2) of links. Set item (start times 4 plus finish) of distance to weight. Set item (finish times 4 plus start) of distance to weight.
For every middle from 0 to 3.
For every start from 0 to 3.
For every finish from 0 to 3.
The through is item (start times 4 plus middle) of distance plus item (middle times 4 plus finish) of distance. If through is less than item (start times 4 plus finish) of distance, set item (start times 4 plus finish) of distance to through.
The chosen is -1, while the fewest is 1000000.
For every city from 0 to 3.
The reach is 0.
For every other from 0 to 3.
If city is not other and item (city times 4 plus other) of distance is at most limit, add 1 to reach. If reach is at most fewest, set fewest to reach, set chosen to city.
Show chosen.
Keep a shared jobs holding 6, 5, 4, 3, 2, and 1. Keep a shared days of 0. Keep a shared size of 0. Set days to 2. Set size to 6. Keep a shared possible of 0. Keep a shared peak of 0. Keep a shared answer of 0. Set possible to 1. If days is more than size, set possible to 0.
To weigh from start (a whole number) with finish (a whole number). Set peak to 0.
For every job from start to finish.
If item job of jobs is more than peak, set peak to item job of jobs.
To plan. The width is size plus 1. The cells is (days plus 1) times width. The table is a list of cells zeros.
For every spot from 0 to the last position of table.
Set item spot of table to 1000000. Set item 0 of table to 0.
For every day from 1 to days.
For every finish from 1 to size.
For every split from day minus 1 to finish minus 1.
Weigh from split with finish minus 1. The prior is item ((day minus 1) times width plus split) of table. The candidate is prior plus peak. If candidate is less than item (day times width plus finish) of table, set item (day times width plus finish) of table to candidate. Set answer to item (days times width plus size) of table.
If possible is 0, show -1. If possible is 1, plan. If possible is 1, show answer.
The grid is a list of 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, and 1. The rows is 5, while the columns is 5, while the wanted is 3. Keep a shared strengths as an empty list of whole numbers. Keep a shared chosen as an empty list of whole numbers. Keep a shared best of 0. Keep a shared lowest of 0.
For every line from 0 to 4.
Place 0 into strengths. Place 0 into chosen.
For every line from 0 to 4.
The spot is line times 5.
Repeat while spot is less than (line plus 1) times 5 and item spot of grid is 1.
Increase item line of strengths by 1. Add 1 to spot.
To choose. Set best to -1. Set lowest to 1000000.
For every line from 0 to 4.
If item line of chosen is 0 and item line of strengths is less than lowest, set best to line, set lowest to item line of strengths.
For every pick from 1 to wanted.
Choose. Set item best of chosen to 1. Show best.
The items is a list of 3, 3, 3, 3, 5, 5, 5, 2, 2, and 7. The tally is a list of 8 zeros. The counts is an empty list of whole numbers.
For every which from 0 to 9.
The value is item which of items. Increase item value of tally by 1.
For every value from 0 to 7.
If item value of tally is more than 0, Place item value of tally into counts.
For every spot from 1 to the last position of counts.
The hold is item spot of counts. The prior is spot minus 1.
Repeat while prior is at least 0 and item prior of counts is less than hold.
Set item (prior plus 1) of counts to item prior of counts. Subtract 1 from prior. Set item (prior plus 1) of counts to hold.
The target is 5, while the removed is 0, while the answer is 0.
For every spot from 0 to the last position of counts.
Increase removed by item spot of counts. Add 1 to answer. If removed is at least target, stop.
Show answer.
Keep a shared values holding 1, 2, 3, 4, 5, and 6. Keep a shared lefts holding 1, 3, 5, -1, -1, and -1. Keep a shared rights holding 2, 4, -1, -1, -1, and -1. Keep a shared flow of 0. Keep a shared total of 0. Keep a shared best of 0.
To gather from node (a whole number). If node is less than 0, set flow to 0, return. Gather from item node of lefts. The leftsize is flow. Gather from item node of rights. The rightsize is flow. Set flow to item node of values plus leftsize plus rightsize.
To measure from node (a whole number). If node is less than 0, set flow to 0, return. Measure from item node of lefts. The leftsize is flow. Measure from item node of rights. The rightsize is flow. The whole is item node of values plus leftsize plus rightsize.
If whole is less than total.
The cut is whole times (total minus whole). If cut is more than best, set best to cut. Set flow to whole.
Gather from 0. Set total to flow. Measure from 0. Show best.
Keep a shared heights holding 6, 4, 14, 6, 8, 13, 9, 7, 10, 6, and 12. Keep a shared order as an empty list of whole numbers. Keep a shared lengths as an empty list of whole numbers. Keep a shared span of 0. Keep a shared best of 0. Keep a shared lowest of 0. Keep a shared clear of 0. Keep a shared record of 0. Set span to 2. Set record to 1.
For every slot from 0 to 10.
Place slot into order. Place 1 into lengths.
To choose from start (a whole number). Set best to start. Set lowest to item (item start of order) of heights.
For every which from start to the last position of order.
The spot is item which of order. If item spot of heights is less than lowest, set best to which, set lowest to item spot of heights.
To inspect from spot (a whole number) with low (a whole number) and high (a whole number). Set clear to 1.
For every probe from low plus 1 to high minus 1.
If item probe of heights is at least item spot of heights, set clear to 0.
For every place from 0 to the last position of order.
Choose from place. swap item place of order and item best of order.
For every rank from 0 to the last position of order.
The spot is item rank of order.
For every other from 0 to the last position of heights.
The gap is the absolute value of (other minus spot).
If item other of heights is less than item spot of heights and gap is at most span.
The low is the smaller of spot and other. The high is the larger of spot and other. Set clear to 1. If high is more than low plus 1, inspect from spot with low and high. If clear is 1 and item other of lengths plus 1 is more than item spot of lengths, set item spot of lengths to item other of lengths plus 1. If item spot of lengths is more than record, set record to item spot of lengths.
Show record.
The number is 14. The steps is 0.
Repeat while number is more than 0.
If number modulo 2 is 0, set number to number divided by 2, otherwise set number to number minus 1. Add 1 to steps.
Show steps.
The scores is a list of 2, 2, 2, 2, 5, 5, 5, and 8. The width is 3, while the threshold is 4, while the needed is 12. The total is 0, while the answer is 0.
For every spot from 0 to the last position of scores.
Increase total by item spot of scores. If spot is at least width, set total to total minus item (spot minus width) of scores. If spot is at least width minus 1 and total is at least needed, add 1 to answer.
Show answer.
The hour is 12, while the minutes is 30. The hourhand is (hour modulo 12) times 60 plus minutes. The minutehand is minutes times 12. The gap is the absolute value of (hourhand minus minutehand). The other is 720 minus gap. The answer is gap. If other is less than gap, set answer to other. Set answer to answer divided by 2.
Show answer.
The values is a list of 100, -23, -23, 404, 100, 23, 23, 23, 3, and 404. The distances is a list of 10 zeros. The queue is a list of 10 zeros.
For every spot from 0 to 9.
Set item spot of distances to -1. Set item spot of queue to 0.
Set item 0 of distances to 0. Set item 0 of queue to 0. The head is 0, while the count is 1, while the answer is -1.
Repeat while head is less than count and answer is less than 0.
The node is item head of queue. Add 1 to head. If node is 9, set answer to item node of distances, stop.
For every next from 0 to 9.
If item next of distances is less than 0.
The same is 0. If next is node minus 1 or next is node plus 1, set same to 1. If item next of values is item node of values, set same to 1.
If same is 1.
Set item next of distances to item node of distances plus 1. Set item count of queue to next. Add 1 to count.
Show answer.
The numbers is a list of 10, 2, 5, and 3. The found is 0.
For every first from 0 to the last position of numbers.
For every second from 0 to the last position of numbers.
If first is not second and item first of numbers is item second of numbers times 2, set found to 1, stop.
If found is 1, show true, otherwise show false.
Keep a shared subject as empty text. Keep a shared glyphs as empty text. Keep a shared mark of 0. Keep a shared counts as an empty list of whole numbers.
For every slot from 0 to 25.
Place 0 into counts.
Place "abcdefghijklmnopqrstuvwxyz" into glyphs. Place "bab" into subject.
To locate from spot (a whole number). Set mark to -1. The symbol is character spot of subject.
For every slot from 0 to 25.
If character slot of glyphs is symbol, set mark to slot, return.
For every spot from 0 to the last position of subject.
Locate from spot. The local is mark. Increase item local of counts by 1.
Set subject to empty text. Place "aba" into subject.
For every spot from 0 to the last position of subject.
Locate from spot. The local is mark. Decrease item local of counts by 1.
The surplus is 0.
For every slot from 0 to 25.
If item slot of counts is more than 0, set surplus to surplus plus item slot of counts.
Show surplus.
The seats is a list of "#", ".", "#", "#", ".", "#", ".", "#", "#", "#", "#", ".", "#", ".", "#", "#", ".", and "#". Keep a shared spots as an empty list of whole numbers. Keep a shared taken as an empty list of whole numbers. Keep a shared blocked of 0. Keep a shared best of 0.
For every spot from 0 to 17.
If item spot of seats matches ".", Place spot into spots.
For every spot from 0 to 17.
Place 0 into taken.
To inspect from spot (a whole number). Set blocked to 0.
For every other from 0 to 17.
If item other of taken is 1.
The line is other divided by 6. The column is other modulo 6. The hereline is spot divided by 6. The herecolumn is spot modulo 6. The down is the absolute value of (line minus hereline). The across is the absolute value of (column minus herecolumn). If down is at most 1 and across is at most 1, set blocked to 1, stop.
To choose from which (a whole number) with students (a whole number). If which is more than the last position of spots, set best to the larger of best and students. If which is more than the last position of spots, return. The spot is item which of spots. Choose from which plus 1 with students. Set blocked to 0. Inspect from spot.
If blocked is 0.
Set item spot of taken to 1. Choose from which plus 1 with students plus 1. Set item spot of taken to 0.
Choose from 0 with 0. Show best.
Keep a shared grid holding 4, 3, 2, -1, 3, 2, 1, -1, 1, 1, -1, -2, -1, -1, -2, and -3. Keep a shared first of 0. Keep a shared low of 0. Keep a shared high of 0. Keep a shared middle of 0.
To scan from line (a whole number). Set low to 0. Set high to 3. Set first to 4.
Repeat while low is at most high.
Set middle to (low plus high) divided by 2. The value is item (line times 4 plus middle) of grid. If value is less than 0, set first to middle, set high to middle minus 1. If value is at least 0, set low to middle plus 1.
The answer is 0.
For every line from 0 to 3.
Scan from line. Increase answer by 4 minus first.
Show answer.
Keep a shared starts holding 1, 2, and 3. Keep a shared finishes holding 2, 3, and 4. Keep a shared order holding 0, 1, and 2. Keep a shared best of 0. Keep a shared marks as an empty list of whole numbers.
For every day from 0 to 5.
Place 0 into marks.
Keep a shared answer of 0.
To choose from start (a whole number). Set best to start.
For every which from start to the last position of order.
The candidate is item which of order. The pick is best. The current is item pick of order. If item candidate of finishes is less than item current of finishes, set best to which. If item candidate of finishes is item current of finishes and item candidate of starts is less than item current of starts, set best to which.
For every place from 0 to the last position of order.
Choose from place. swap item place of order and item best of order.
For every rank from 0 to the last position of order.
The event is item rank of order. The begin is item event of starts. The end is item event of finishes.
For every day from begin to end.
If item day of marks is 0.
Set item day of marks to 1. Add 1 to answer. stop.
Show answer.
Keep a shared target holding 9, 3, and 5. Keep a shared size of 0. Keep a shared total of 0. Keep a shared top of 0. Keep a shared rest of 0. Keep a shared next of 0. Keep a shared possible of 0. Set size to 3. Set total to 17. Set possible to 1.
To highest. Set top to 0.
For every spot from 0 to the last position of target.
The place is top. If item spot of target is more than item place of target, set top to spot.
Repeat while total is more than size.
Highest. The place is top. Set rest to total minus item place of target. If item place of target is at most rest, set possible to 0, stop. Set next to item place of target minus rest. Set item place of target to next. Set total to rest plus next.
If possible is 0, show false, otherwise show true.
Keep a shared values holding 0, 1, 2, 3, 4, 5, 6, 7, and 8. Keep a shared weights as an empty list of whole numbers.
For every spot from 0 to 8.
Place 0 into weights.
Keep a shared bits of 0. Keep a shared best of 0. Keep a shared lowest of 0. Keep a shared lowbits of 0.
To weigh from value (a whole number). Set bits to 0. The left is value.
Repeat while left is more than 0.
If left modulo 2 is 1, add 1 to bits. Set left to left divided by 2.
To choose from start (a whole number). Set best to start. Set lowbits to item start of weights.
For every which from start to the last position of values.
The pick is best. If item which of weights is less than lowbits, set best to which, set lowbits to item which of weights. If item which of weights is lowbits and item which of values is less than item pick of values, set best to which.
For every spot from 0 to the last position of values.
Weigh from item spot of values. Set item spot of weights to bits.
The last is the last position of values.
For every place from 0 to last minus 1.
Choose from place. swap item place of values and item best of values. swap item place of weights and item best of weights.
For every value in values.
Show value.
The text is "abcabc". The lastplaces is a list of 3 zeros. Set item 0 of lastplaces to -1. Set item 1 of lastplaces to -1. Set item 2 of lastplaces to -1. The answer is 0.
For every spot from 0 to the last position of text.
The symbol is character spot of text. If symbol is "a", set item 0 of lastplaces to spot. If symbol is "b", set item 1 of lastplaces to spot. If symbol is "c", set item 2 of lastplaces to spot.
If item 0 of lastplaces is at least 0 and item 1 of lastplaces is at least 0 and item 2 of lastplaces is at least 0.
The low is the smaller of item 0 of lastplaces and item 1 of lastplaces. The low is the smaller of low and item 2 of lastplaces. Increase answer by low plus 1.
Show answer.
The orders is 3, while the modulus is 1000000007. The answer is 1.
For every step from 1 to orders.
Set answer to answer times step times (step times 2 minus 1) modulo modulus.
Show answer.
Keep a shared first as empty text. Keep a shared second as empty text. Keep a shared parts as an empty list of text. Keep a shared months holding 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, and 31. Place "2020-01-15" into first. Place "2019-12-31" into second. Keep a shared amount of 0. Keep a shared leaps of 0. Keep a shared daysbefore of 0. Keep a shared yearone of 0. Keep a shared monthone of 0. Keep a shared dayone of 0. Keep a shared yeartwo of 0. Keep a shared monthtwo of 0. Keep a shared daytwo of 0.
To absorb from which (a whole number). Set amount to 0. The part is item which of parts.
For every spot from 0 to the last position of part.
The digit is the digit value of character spot of part. Set amount to amount times 10 plus digit.
To count leaps with year (a whole number). Set leaps to 0.
If year is more than 0.
Set leaps to (year minus 1) divided by 4 minus (year minus 1) divided by 100 plus (year minus 1) divided by 400.
To count days from month (a whole number) with year (a whole number). Set daysbefore to 0.
For every which from 1 to month minus 1.
Increase daysbefore by item (which minus 1) of months. If which is 2 and year modulo 4 is 0 and (year modulo 100 is not 0 or year modulo 400 is 0), add 1 to daysbefore.
Set parts to split first by "-". Absorb from 0. Set yearone to amount. Absorb from 1. Set monthone to amount. Absorb from 2. Set dayone to amount. Set parts to split second by "-". Absorb from 0. Set yeartwo to amount. Absorb from 1. Set monthtwo to amount. Absorb from 2. Set daytwo to amount.
Count leaps with yearone. Count days from monthone with yearone. The start is yearone times 365 plus leaps plus daysbefore plus dayone. Count leaps with yeartwo. Count days from monthtwo with yeartwo. The finish is yeartwo times 365 plus leaps plus daysbefore plus daytwo. The gap is the absolute value of (start minus finish).
Show gap.
Keep a shared lefts holding 1, -1, 3, and -1. Keep a shared rights holding 2, -1, -1, and -1. Keep a shared indegree as an empty list of whole numbers.
For every node from 0 to 3.
Place 0 into indegree.
Keep a shared bad of 0.
To note from child (a whole number). If child is -1, return. If item child of indegree is more than 0, set bad to 1. Increase item child of indegree by 1.
For each child in lefts.
Note from child.
For each child in rights.
Note from child.
The root is -1. The roots is 0.
For every node from 0 to 3.
If item node of indegree is 0, set root to node, add 1 to roots.
Keep a shared visited as an empty list of whole numbers.
For every node from 0 to 3.
Place 0 into visited.
Keep a shared reached of 0.
To walk from node (a whole number). If node is less than 0, return. If item node of visited is 1, return. Set item node of visited to 1. Add 1 to reached. Walk from item node of lefts. Walk from item node of rights.
If roots is 1, Walk from root. If bad is 0 and roots is 1 and reached is 4, show true, otherwise show false.
Keep a shared low of 0. Keep a shared high of 0. Keep a shared bestgap of 1000000.
To consider from factor (a whole number) with value (a whole number). The other is value divided by factor. The gap is other minus factor. If factor is at most other and gap is less than bestgap, set bestgap to gap, set low to factor, set high to other.
To inspect from value (a whole number).
For every factor from 1 to value.
If value modulo factor is 0, Consider from factor with value.
Inspect from 9. Inspect from 10. Show low. Show high.
The digits is a list of 8, 1, and 9. Keep a shared counts as an empty list of whole numbers.
For every digit from 0 to 9.
Place 0 into counts.
The total is 0.
For each digit in digits.
Increase item digit of counts by 1. Add digit to total.
The remainder is total modulo 3. Keep a shared taken of 0. Keep a shared line as empty text.
To removeone from kind (a whole number). Set taken to 0. The digit is 0.
Repeat while digit is at most 9.
If item digit of counts is more than 0 and digit modulo 3 is kind, set item digit of counts to item digit of counts minus 1, set taken to 1, stop. Add 1 to digit.
To drop from kind (a whole number). Removeone from kind. Removeone from kind.
To emit from digit (a whole number). The many is item digit of counts.
Repeat while many is more than 0.
Place format whole number digit as text into line. Subtract 1 from many.
If remainder is 1, Removeone from 1. If remainder is 1 and taken is 0, Drop from 2. If remainder is 2, Removeone from 2. If remainder is 2 and taken is 0, Drop from 1.
The high is -1.
For every digit from 0 to 9.
If item digit of counts is more than 0, set high to digit.
If high is more than 0.
For every step from 0 to 9.
The digit is 9 minus step. Emit from digit.
If high is more than 0, show line.
If high is 0, show 0.
Keep a shared numbers holding 8, 1, 2, 2, and 3. Keep a shared smaller of 0. Keep a shared target of 0.
To tally. Set smaller to 0.
For each other in numbers.
If other is less than target, add 1 to smaller.
The answers is an empty list of whole numbers.
For each value in numbers.
Set target to value. Tally. Place smaller into answers.
The line is empty text.
For each count in answers.
If the length of line is more than 0, Place "," into line. Place format whole number count as text into line.
Show line.
Keep a shared alphabet as empty text. Place "ABCDEFGHIJKLMNOPQRSTUVWXYZ" into alphabet. Keep a shared width of 0. Keep a shared last of 0. Keep a shared counts as an empty list of whole numbers. Keep a shared teams as an empty list of whole numbers. Keep a shared used as an empty list of whole numbers. Keep a shared index of 0. Keep a shared wanted as empty text. Keep a shared earlier of 0. Keep a shared best of 0.
The votes is a list of "ABC", "ACB", "ABC", "ACB", and "ACB". The firstvote is item 0 of votes. Set last to the last position of firstvote. Set width to last plus 1.
For every cell from 0 to 676 minus 1.
Place 0 into counts.
To locate. The spot is 0.
Repeat while spot is at most 25.
If the slice of alphabet from spot to spot plus 1 matches wanted, set index to spot, return. Add 1 to spot.
For each vote in votes.
The spot is 0.
Repeat while spot is less than width.
The symbol is the slice of vote from spot to spot plus 1. Set wanted to symbol. Locate. Increase item (index times width plus spot) of counts by 1. Add 1 to spot.
For every spot from 0 to width minus 1.
The symbol is the slice of firstvote from spot to spot plus 1. Set wanted to symbol. Locate. Place index into teams.
For every spot from 0 to 25.
Place 0 into used.
To compare with first (a whole number) and second (a whole number). Set earlier to 0. If first is less than second, set earlier to 1. The spot is 0.
Repeat while spot is less than width.
The one is item (first times width plus spot) of counts. The two is item (second times width plus spot) of counts. If one is more than two, set earlier to 1, return. If one is less than two, set earlier to 0, return. Add 1 to spot.
To consider with candidate (a whole number). If item candidate of used is 1, return. If best is less than 0, set best to candidate, return. Compare with candidate and best. If earlier is 1, set best to candidate.
To choose. Set best to -1.
For each candidate in teams.
Consider with candidate.
The order is an empty list of whole numbers.
For every slot from 0 to width minus 1.
Choose. Set item best of used to 1. Place best into order.
The line is empty text.
For each choice in order.
The symbol is the slice of alphabet from choice to choice plus 1. Place symbol into line.
Show line.
Keep a shared heads holding 4, 2, and 8. Keep a shared values holding 1, 4, 4, 2, 2, 1, 6, 8, 1, and 3. Keep a shared lefts holding 1, -1, 4, 5, 6, -1, -1, 8, -1, and -1. Keep a shared rights holding 2, 3, -1, -1, 7, -1, -1, 9, -1, and -1. Keep a shared found of 0. Keep a shared last of 0.
Set last to the last position of heads.
To match from node (a whole number) with depth (a whole number). If node is less than 0, return. If found is 1, return. If item node of values is not item depth of heads, return. If depth is last, set found to 1, return. Match from item node of lefts with depth plus 1. Match from item node of rights with depth plus 1.
For every node from 0 to 9.
Match from node with 0.
If found is 1, show true, otherwise show false.
Keep a shared grid holding 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, and 2. Keep a shared distance as an empty list of whole numbers.
For every spot from 0 to 15.
Place 1000 into distance.
Set item 0 of distance to 0. Keep a shared here of 0.
To relax from target (a whole number) with cost (a whole number). If target is less than 0, return. If target is more than 15, return. If item target of distance is more than here plus cost, set item target of distance to here plus cost.
Repeat 40 times.
For every cell from 0 to 15.
The row is cell divided by 4. The column is cell modulo 4. Set here to item cell of distance. The rightcost is 1. The leftcost is 1. The downcost is 1. The upcost is 1. If item cell of grid is 1, set rightcost to 0. If item cell of grid is 2, set leftcost to 0. If item cell of grid is 3, set downcost to 0. If item cell of grid is 4, set upcost to 0. If column is less than 3, Relax from cell plus 1 with rightcost. If column is more than 0, Relax from cell minus 1 with leftcost. If row is less than 3, Relax from cell plus 4 with downcost. If row is more than 0, Relax from cell minus 4 with upcost.
Show item 15 of distance.
Keep a shared alphabet as empty text. Place "abcdefghijklmnopqrstuvwxyz" into alphabet. Keep a shared counts as an empty list of whole numbers.
For every letter from 0 to 25.
Place 0 into counts.
Keep a shared wanted as empty text. Keep a shared slot of 0. Keep a shared left of 0. Keep a shared line as empty text.
To rank. The spot is 0.
Repeat while spot is at most 25.
If the slice of alphabet from spot to spot plus 1 matches wanted, set slot to spot, return. Add 1 to spot.
The word is "aaaabbbbcccc". The last is the last position of word. Set left to last plus 1.
For every spot from 0 to last.
The symbol is the slice of word from spot to spot plus 1. Set wanted to symbol. Rank. The at is slot. Increase item at of counts by 1.
To lift.
For every letter from 0 to 25.
The many is item letter of counts.
If many is more than 0.
The symbol is the slice of alphabet from letter to letter plus 1. Place symbol into line. Set item letter of counts to many minus 1. Subtract 1 from left.
To lower.
For every step from 0 to 25.
The letter is 25 minus step. The many is item letter of counts.
If many is more than 0.
The symbol is the slice of alphabet from letter to letter plus 1. Place symbol into line. Set item letter of counts to many minus 1. Subtract 1 from left.
Repeat while left is more than 0.
Lift. Lower.
Show line.
Keep a shared alphabet as empty text. Place "abcdefghijklmnopqrstuvwxyz" into alphabet. Keep a shared masks as an empty list of whole numbers.
For every letter from 0 to 25.
Place 0 into masks.
Set item 0 of masks to 1. Set item 4 of masks to 2. Set item 8 of masks to 4. Set item 14 of masks to 8. Set item 20 of masks to 16. Keep a shared earliest as an empty list of whole numbers.
For every state from 0 to 31.
Place -2 into earliest.
Keep a shared wanted as empty text. Keep a shared slot of 0.
To rank. The spot is 0.
Repeat while spot is at most 25.
If the slice of alphabet from spot to spot plus 1 matches wanted, set slot to spot, return. Add 1 to spot.
The word is "eleetminicoworoep". The last is the last position of word. Set item 0 of earliest to -1. Keep a shared state of 0. The best is 0.
For every position from 0 to last.
The symbol is the slice of word from position to position plus 1. Set wanted to symbol. Rank. The at is slot. The bit is item at of masks. The current is state. Set state to exclusive or of current and bit. The fresh is state. The start is item fresh of earliest. If start is less than -1, set item fresh of earliest to position. If start is at least -1, The span is position minus start, If span is more than best, set best to span.
Show best.
Keep a shared values holding 1, 1, 1, 1, 1, 1, 1, and 1. Keep a shared lefts holding -1, 2, -1, 4, -1, -1, -1, and -1. Keep a shared rights holding 1, 3, -1, 5, 6, -1, 7, and -1. Keep a shared best of 0.
To walk from node (a whole number) with direction (a whole number) and length (a whole number). If node is less than 0, return. If length is more than best, set best to length. The left is item node of lefts. The right is item node of rights. The leftlength is 1. If direction is 1, set leftlength to length plus 1. The rightlength is 1. If direction is 0, set rightlength to length plus 1. Walk from left with 0 and leftlength. Walk from right with 1 and rightlength.
Walk from 0 with 0 and 0. Show best.
Keep a shared values holding 1, 4, 3, 2, 4, 2, 5, 4, and 6. Keep a shared lefts holding 1, 3, 5, -1, -1, -1, 7, -1, and -1. Keep a shared rights holding 2, 4, 6, -1, -1, -1, 8, -1, and -1. Keep a shared valid as an empty list of whole numbers.
For every node from 0 to 8.
Place 0 into valid.
Keep a shared lows as an empty list of whole numbers.
For every node from 0 to 8.
Place 0 into lows.
Keep a shared highs as an empty list of whole numbers.
For every node from 0 to 8.
Place 0 into highs.
Keep a shared sums as an empty list of whole numbers.
For every node from 0 to 8.
Place 0 into sums.
Keep a shared value of 0. Keep a shared good of 0. Keep a shared low of 0. Keep a shared high of 0. Keep a shared total of 0. Keep a shared best of 0.
To inspectleft from child (a whole number). If child is less than 0, return. If item child of valid is 0, set good to 0, return. If item child of highs is at least value, set good to 0, return. Set low to item child of lows. Increase total by item child of sums.
To inspectright from child (a whole number). If child is less than 0, return. If item child of valid is 0, set good to 0, return. If item child of lows is at most value, set good to 0, return. Set high to item child of highs. Increase total by item child of sums.
To score from node (a whole number). If node is less than 0, return. Score from item node of lefts. Score from item node of rights. Set value to item node of values. Set good to 1. Set low to value. Set high to value. Set total to value. Inspectleft from item node of lefts. Inspectright from item node of rights. Set item node of valid to good. Set item node of lows to low. Set item node of highs to high. Set item node of sums to total. If good is 1 and total is more than best, set best to total.
Score from 0. Show best.
The size is 4. The amount is 4. Keep a shared extra as empty text. Place "z" into extra. If size modulo 2 is 1, set extra to empty text. If size modulo 2 is 0, set amount to size minus 1. The line is empty text.
For every spot from 1 to amount.
Place "p" into line.
Place extra into line. Show line.
The flips is a list of 3, 2, 4, 1, and 5. The size is 5. Keep a shared seen as an empty list of whole numbers.
For every spot from 0 to 5.
Place 0 into seen.
The highest is 0. The moments is 0.
For every step from 0 to size minus 1.
The flip is item step of flips. Set item flip of seen to 1. If flip is more than highest, set highest to flip. If highest is step plus 1, add 1 to moments.
Show moments.
Keep a shared manager holding 2, 2, -1, 2, 2, and 2. Keep a shared informTime holding 0, 0, 1, 0, 0, and 0. Keep a shared total of 0. Keep a shared best of 0.
To measure from employee (a whole number). Set total to 0. The current is employee.
Repeat while item current of manager is not -1.
The boss is item current of manager. Increase total by item boss of informTime. Set current to boss.
For every employee from 0 to 5.
Measure from employee. If total is more than best, set best to total.
Show best.
Keep a shared links as an empty list of whole numbers.
For every cell from 0 to 63.
Place 0 into links.
To join from first (a whole number) with second (a whole number). Set item (first times 8 plus second) of links to 1. Set item (second times 8 plus first) of links to 1.
Join from 1 with 2. Join from 1 with 3. Join from 1 with 7. Join from 2 with 4. Join from 2 with 6. Join from 3 with 5. Keep a shared nodes as an empty list of whole numbers. Place 1 into nodes. Keep a shared parents as an empty list of whole numbers. Place 0 into parents. Keep a shared depths as an empty list of whole numbers. Place 0 into depths. Keep a shared chances as an empty list of decimals. Place 1.0 into chances. Keep a shared kids of 0. Keep a shared count of 0. Keep a shared limit of 0. Keep a shared target of 0. Keep a shared result as a decimal. Keep a shared chance as a decimal. Keep a shared share as a decimal.
To countkids from node (a whole number) with parent (a whole number). Set kids to 0.
For every neighbor from 1 to 7.
If item (node times 8 plus neighbor) of links is 1 and neighbor is not parent, add 1 to kids.
To spread from node (a whole number) with code (a whole number). The parent is code divided by 100. The depth is code modulo 100. If depth is at least limit, return. If kids is 0, return. Set share to chance divided by kids as a decimal.
For every neighbor from 1 to 7.
If item (node times 8 plus neighbor) of links is 1 and neighbor is not parent.
Place neighbor into nodes. Place node into parents. Place depth plus 1 into depths. Place share into chances. Add 1 to count.
Set limit to 2. Set target to 4. The head is 0. Set count to 1.
Repeat while head is less than count.
The node is item head of nodes. The parent is item head of parents. The depth is item head of depths. Set chance to item head of chances. Countkids from node with parent. If node is target and depth is limit, add chance to result. If node is target and depth is less than limit and kids is 0, add chance to result. The code is parent times 100 plus depth. Spread from node with code. Add 1 to head.
Show result.
Keep a shared cloned holding 7, 4, 3, 6, and 19. Keep a shared clonelefts holding 1, -1, 3, -1, and -1. Keep a shared clonerights holding 2, -1, 4, -1, and -1. Keep a shared target of 3. Keep a shared found of 0.
To seek from node (a whole number). If node is less than 0, return. If item node of cloned is target, set found to node, return. Seek from item node of clonelefts. Seek from item node of clonerights.
Seek from 0. The at is found. Show item at of cloned.