Overview › Models › deepseek-r1:14b
Model profile

deepseek-r1:14b

LocalBrain cluster
170/174answered (R6–R180)
4DNF / no usable answer
18.4 smedian latency
2.07avg. score · 14 scored rounds

Low participation: this average comes from only 14 of 174 rounds (8%). Not directly comparable to models with fuller participation.

Rounds & answers 174

▶ R6 · Extraction → JSON9.3 s Open round →
Alright, so the user wants me to extract product data and turn it into strict JSON following a specific schema. Let me break down what I need to do here.

First, let's look at the product listing they provided. It's in German, so I'll have to translate some parts or figure out the relevant info from context.

The product is the AquaPur X2 Trinkbrunnen by PetFlow. So, "name" should be "AquaPur X2 Trinkbrunnen". The brand is clearly stated as PetFlow.

Next, the price: it says "Statt 39,99 jetzt nur 29,99!". So the original price was €39,99, but it's discounted to €29,99. But looking at the schema, "price_eur" is a number or null. Since it's currently on sale, should I use the discounted price? Or maybe keep both prices? Hmm, but the user only asks for one price, probably the current selling price, which is 29,99. So I'll put that as 29.99.

Weight is given as …

Excerpt — the full answer is on the round page.

▶ R7 · Sentiment classification9.1 s Open round →
Alright, I need to classify the sentiment of each customer review as positive, negative, or neutral. The output should be a JSON array with IDs from 1 to 10 and their corresponding sentiments.

Let me go through each review one by one:

1. "Absolut begeistert, kaufe ich sofort wieder!" – This translates to being absolutely thrilled and that they will buy again immediately. The sentiment here is clearly positive.

2. "Nach zwei Wochen kaputt. Nie wieder." – After two weeks it's broken; they won't buy again. Definitely negative because the product failed early.

3. "Tut was es soll." – It does what it should. This sounds neutral as there's no strong emotion, just stating functionality.

4. "Na toll, schon wieder ein Kratzer beim Auspacken. Danke für nichts." – Expressing frustration with a scratch upon arrival and thanks nothing. Negative sentiment here.

5. "Preis-Leistung …

Excerpt — the full answer is on the round page.

▶ R8 · Translation DE↔EN13.2 s Open round →
Okay, I've got this translation task. Let's break it down step by step.

First, for part A, I need to translate some German text into English while keeping the tone and idioms natural. The original says:

"Das ist doch ein alter Hut — wer zu spät kommt, den bestraft das Leben. Wir haben den Karren aus dem Dreck gezogen, aber jetzt dürfen wir nicht den zweiten Schritt vor dem ersten machen."

Alright, breaking it down piece by piece.

"Das ist doch ein alter Hut" – I know "ein alter Hut" is an idiom meaning something like "an old hat" or "nothing new." So translating that as "That's nothing new—"

Next part: "wer zu spät kommt, den bestraft das Leben." This seems like a saying. "Whoever comes late gets punished by life." It's a bit formal, maybe I can make it more colloquial: "he who is late pays the piper."

Moving on: "Wir haben den Karren aus dem Dreck gezogen," – & …

Excerpt — the full answer is on the round page.

▶ R9 · One-liner code28.1 s Open round →
Okay, let me try to work through each of these coding tasks one by one.

Starting with the first task, I need a regex that matches ISO dates in the format YYYY-MM-DD where the month is between 01 and 12. So the year can be any four digits, so something like \d{4}. The month should be from 01 to 12, which means it needs to accept single-digit months as well but leading zeros are required because in ISO format, months are two digits. Wait, no—if I'm using YYYY-MM-DD, the month is always two digits. So single-digit months wouldn't appear, right? Hmm, actually, no, because if it's like 2023-5-04, that would be invalid, but wait no—ISO requires two digits for each part, so the correct format is four digits, hyphen, two digits (month), hyphen, two digits (day). So for the month part, I need to ensure it's between 01 and 12. How do I write a regex that enforces that? Well, p …

Excerpt — the full answer is on the round page.

▶ R10 · Facts quiz6.2 s Open round →
Okay, I have to answer these 10 questions concisely. Let's go through them one by one.

1. The capital of Australia is Canberra. I remember that from school.
2. Berlin Wall fell in 1989, I think. Yes, it was a significant event in history.
3. Tungsten's symbol is W because it starts with the same letter and comes from Wolfram.
4. HTTP status code 418 sounds familiar—it's an error. Oh right, "I'm a teapot" reference.
5. Franz Kafka wrote "Der Prozess," which I think translates to The Process.
6. Jupiter has the most moons. That makes sense since it's the largest planet and has many satellites.
7. Converting 42 to binary. Let's see: 32 is 1, so 32+8+2=42, so binary would be 101010.
8. Default HTTPS port is 443, I recall that from networking basics.
9. Linus Torvalds created the Linux kernel; he's a well-known figure in open-source.
10. The smallest prime …

Excerpt — the full answer is on the round page.

▶ R11 · Micro-copy & slogans18.4 s Open round →
Okay, let's see. I need to come up with five advertising slogans, each 8 words or fewer. The products given are a stainless-steel cat water fountain, a small family bakery, an AI model comparison website, noise-cancelling headphones, and a password manager. Hmm.

Starting with the first one: Stainless-steel cat water fountain. I want to highlight durability since it's made of stainless steel. Also, it's for cats, so maybe emphasize freshness or health. Maybe something like "Durable & Refreshing" but that's not catchy. Maybe think about how cats interact with their environment.

Second is the small family bakery. I should focus on tradition and warmth. Words like "homemade," "fresh," "authentic." Maybe link it to creating happy moments, like baking brings joy. Something like "Baking happiness since..." but needs to be concise.

Third, an AI model comparison website. Th …

Excerpt — the full answer is on the round page.

▶ R13 · Image prompts4.2 s Open round →
Alright, I need to come up with three separate image-generation prompts for photorealistic hero images. Each prompt should be no more than 40 words and each needs to clearly convey high-quality visuals.

Let me brainstorm ideas that are both appealing and unique. First, maybe something from the tech or gaming niche—like an ergonomic gaming chair in a neon-lit streaming room. That sounds vibrant and captures the essence of modern gaming setups.

Next, for a different vibe, perhaps craft gin with a moody bar setting using evening light. This would highlight craftsmanship and create a cozy, inviting atmosphere appealing to those who appreciate mixology or fine spirits.

Lastly, an e-scooter against an urban backdrop—maybe leaning against a graffiti-covered wall in the morning. This would blend urban culture with eco-friendly transportation, giving it a fresh and energetic feel.

I should ma …

Excerpt — the full answer is on the round page.

▶ R14 · Product names6.7 s Open round →
Alright, let's tackle this query about inventing product names for a smart water bottle that reminds you to drink. So the user wants exactly five numbered lines, each with a name and a tagline. The name should be one or two words and the tagline up to six words.

First, I need to think about what makes a smart water bottle unique. It's supposed to remind users to drink water, so functionality is key. But it also needs an appealing name that's catchy and easy to remember.

Maybe start by brainstorming keywords associated with hydration and technology—words like 'Hydra', 'Thirst', 'Drip', 'Sip'. These could form the basis of some names.

Next, for each name, I need a tagline that highlights its unique feature. The tagline should be concise, maybe something about reminders or staying hydrated automatically.

Let me think of more keyword …

Excerpt — the full answer is on the round page.

▶ R15 · CSS spinner12.7 s Open round →
Alright, I need to create a CSS-only loading spinner using a single div with the class "spinner" and include the style block. The user specified that it should be modern, have a smooth animation, and the total CSS lines shouldn't exceed 15.

First, I'll consider the HTML part. It should be simple: a div element with the class "spinner". That's straightforward.

Next, for the CSS, I want the spinner to appear centered on the page. So, in the body, I'll use flexbox properties: display: flex, justify-content: center, and align-items: center. This centers the spinner both vertically and horizontally.

I'll also set the body's margin to 0 to remove any default spacing. The height should be 100vh to cover the entire viewport. The background color is optional, but adding a light gray (#f0f0f0) gives a clean look.

Now, the spinner itself needs to look modern and sm …

Excerpt — the full answer is on the round page.

▶ R16 · Explain it to a child (German)3.7 s Open round →
Okay, let me tackle this query. The user wants to explain how a battery works to a 10-year-old using four sentences and a comparison from everyday life.

First, I need to simplify the concept of an accumulator (电池/蓄电池). Using a water balloon analogy could work well because it's something kids understand. 

I should break down the process into charging and discharging. Think of charging as filling the balloon when it's empty and discharging as letting the water out slowly.

Convey that the battery stores energy, just like the balloon holds water until it's used. Make sure the language is simple and relatable.

Putting it all together in four concise sentences to keep it clear and easy for a child to grasp.
▶ R17 · Logic riddle7.4 s★ 4/10 Open round →
Alright, so I have this puzzle about three crates labeled "Äpfel" (apples), "Birnen" (pears), and "Gemischt" (mixed). The catch is that all three labels are wrong. I need to figure out which crate to pick a fruit from in order to correctly relabel all of them.

Hmm, let me think. Since all the labels are incorrect, the crate labeled " Gemischt" can't actually contain mixed fruits. It must have either only apples or only pears. If I pick a fruit from that crate, whatever I get will tell me exactly what's inside. For example, if I pull out an apple, then I know the "Gemischt" crate is actually just apples. 

Wait, but once I know one crate correctly, how does that help with the others? Once I've identified what "Gemischt" truly contains, say apples, then the crate labeled "Äpfel" can't be apples anymore because all labels are wrong. So it must be either pears or mixed. …

Excerpt — the full answer is on the round page.

▶ R18 · German registers & tone6.3 s★ 1.5/10 Open round →
Alright, so I'm trying to figure out how to help this user who wants to express the statement "Wir können den Liefertermin nicht halten" in three different registers. The user has specified that each version should be one sentence: (1) formal email to a business customer, (2) neutral status message in a team chat, and (3) a casual message to a long-term colleague.

First, I need to break down what each register entails. For the formal email, I want it to sound professional and apologetic. The user would be addressing a business partner, so respect and formality are key. Maybe starting with "Haben Sie..." which is polite and sets the tone for an apology.

Next, the neutral status message. This should be concise and matter-of-fact, suitable for internal communication within a team. Using "Leider..." indicates that the news isn't positive but it's just a straightforward updat …

Excerpt — the full answer is on the round page.

▶ R19 · Table QA8.7 s★ 7/10 Open round →
Okay, I need to answer the five questions based on the given table. Let me go through each question one by one and make sure I understand them correctly.

1. **Which product is the most expensive?**
   I'll look at the "Preis (EUR)" column. Aqua One is 24.90, Hydro Max is 39.50, PureFlow is 19.99, and VitaSip is 54.00. So, the highest price here is 54.00 euros for VitaSip. That's clear.

2. **What is the combined weight of Aqua One and PureFlow in grams?**
   I need to add the weights from both products. Aqua One weighs 480g and PureFlow weighs 350g. Adding them together gives me 830 grams.

3. **Which product, that's in stock, is the cheapest?**
   First, identify which products are in stock by checking "Auf Lager". Aqua One, PureFlow, and VitaSip are marked as "ja" (yes). Hydro Max is out of stock ("nein"). Now, look at their prices. Aqua One is 24.90, PureFlow is 19.99, …

Excerpt — the full answer is on the round page.

▶ R20 · JSON repair4.8 s★ 2/10 Open round →
Okay, I need to help the user by fixing their broken JSON. Let me look at what they provided.

The original JSON they gave is: {'name': "Trinkflasche Pro", price: 29.90, "tags": ["outdoor", "sport",], "stock": {"berlin": 12, 'muenchen': 7, "hamburg": None}, "active": True.

Hmm, I notice a few issues here. First, the keys are in single quotes which is not standard JSON; usually, they should be in double quotes or without any quotes if using JavaScript object notation, but since it's supposed to be valid JSON, all keys need to be in double quotes.

Looking at "tags": ["outdoor", "sport",], I see an extra comma after "sport". In JSON, trailing commas are not allowed and can cause syntax errors. So I should remove that comma.

Also, the last value "active": True doesn't have a closing bracket. The object should end with a closing brace, so I need to add that at …

Excerpt — the full answer is on the round page.

▶ R21 · Sorting race bubble/insertion/selection35.2 s★ 1/10 Open round →
```html
<!DOCTYPE html>
<html><head><style>.c{position:absolute}#a{left:0;width:33%;}#b{left:34%;width:32%;}#c{left:67%;width:31%;}.t{l:5px;top:5px;}</style></head>
<body style="margin:0"><canvas id=c size=800 height=400 width=800""></canvas>
<script>let c=document.getElementById(&#x27;c&#x27;),ctx=c.getContext(&#x27;2d&#x27;);let w=c.width/3,h=w-6,HW=Math.min(window.innerHeight,100*h)/window.devicePixelRatio;let maxVal=Math.floor(40*1.5+1),arr=[...Array(40)].map(_=>Math.random()*maxVal|0);let scales=[[0,0], [20,80],[92,36]];let swaps=[[],[],[]];let i=0;const start = (a,r,g) => {scales[i]= [Math.max(...arr),H=a.length?H=arr.slice().sort((x,y)=>x-y)[arr.length/2|0]:1];for(let j in a)scales[j].push(a[j]);i++;},anim=[];function bS(i,u){let s=i;while(i<u-1)if(arr[i]>arr[i+1]) [arr[i],arr[i+1]] = [arr[i+1],arr[i]],s=i--.else i++}.function insert(x){x=0;while(x < arr.length - 1 && arr[x] > arr …

Excerpt — the full answer is on the round page.

▶ R22 · Hexagon balls56.9 s★ 1/10 Open round →
<!DOCTYPE html>
<html><body style="background:black;margin:0;display:flex;justify-content:center;height:100vh">
<canvas id=c width=640 height=480></canvas>
<script>
const canvas=document.getElementById(&#x27;c&#x27;);const ctx=canvas.getContext(&#x27;2d&#x27;);
const balls=[];for(let i=0;i<8;i++){balls.push({x:320,y:240,v:[Math.random()-0.5*3,Math.random()-0.5*3],a:[0,0.1],size:10,radius:sqrt(50)})}

for(let b of balls){b.original=[]}let angle=0.5;
function hex(x,y,s,r){return[x+s*r*cos(radians(60*(r))),y+s*sin(radians(60*(r)))]}
function render(){drawHexagon();updateBalls();}
function radians(d){return d*Math.PI/180;}function clamp(v,min,max){return v<=min?min:v>=max?max:v;}
function vectorMag([x,y]){return Math.sqrt(x*x+y*y);}
const gravity=0.4;
function updateBalls(){for(let i=0;i<balls.length;i++){let b=balls[i];b.a[1]=vectorMag(b.v)*0.5;b.v[0]+=b.a[0];b.v[1]+=gravity*0.02;[x,y]=b.v. …

Excerpt — the full answer is on the round page.

▶ R23 · Pendulum wave24.1 s★ 1/10 Open round →
```html
<!DOCTYPE html>
<html><head><canvas id="c"></canvas><style>canvas{position:fixed;top:-20;left:0;width:100vw;height:95vh;background:#343;}</style></head>
<body>
    <script>
    const c = document.getElementById(&#x27;c&#x27;), ctx = c.getContext(&#x27;2d&#x27;);
    let w = c.width = window.innerWidth, h = c.height = window.innerHeight + 30;

    const pendulums = [];
    const g = 1, pi = Math.PI;
    let ang = 0;

    // setup
    for(let i=0; i<15; i++) {
        const p = {
            x: w/2 + (w * i)/(cols-1),
            y: h - 150,
            len: 40 + i*3,
            angle: 0,
            velocity: 0,
            swinging: true
        }
        pendulums.push(p);
    }

    function draw() {
        ctx.clearRect(0, 0, w, h);

        pendulums.forEach((p) => {

            // string from top to mass position
            const yTop = h - c.scrollHeight; 
            c …

Excerpt — the full answer is on the round page.

▶ R24 · Maze race BFS/DFS/A*37.2 s★ 2.5/10 Open round →
```html
<!DOCTYPE html>
<html><head><style>body{margin:none}#mazes{display:grid;gap:20px}.maze-container{position:relative}.label{position:absolute;top:-15px;left:0;color:red}.pathfinder canvas{-webkit-user-select:none;background:#111}</style></head><body>
<div id="mazes">
  <div class="maze-container" style="">DONE<br><canvas id="bfsCanvas"></canvas></div>
  <div class="maze-container"><span class="label">BFS</span><canvas id="bfs"></canvas></div>
  <div class="maze-container"><span class="label">DFS</span><canvas id="dfs"></canvas></div>
  <div class="maze-container"><span class="label">A*</span><canvas id="astar"></canvas></div>
<button onclick="initMaze()">New Maze</button>
</body>

<script>
let w=25,h=w;
const cellSize=4,canvasWidth=w*cellSize;

function initMaze() {
  const walls=[];visitedBFS=new Set();pathBFS=[];visitedDFS=new Set();
  visitedAstar=new Set();queueBfs=[],stackDfs= …

Excerpt — the full answer is on the round page.

▶ R25 · Sorting race quick/merge/heap30.5 s★ 1/10 Open round →
```html
<!DOCTYPE html>
<html><body style="background:#333;align:center;">
<canvas id=&#x27;c&#x27; width=400 height=200></canvas>
<canvas id=&#x27;m&#x27; width=400 height=200></canvas>
<canvas id=&#x27;h&#x27; width=400 height=200></canvas>

<script>
class Visualizer {
  constructor(ctx) {
    this.ctx = ctx;
    this.width = 400;
    this.height = 190;
    this.bars = [];
    this.steps = new Set([[...Array(60).fill(0.2).map(_=>Math.random()*1+.5)], []]);
  }
  draw() {
    let c = this.ctx;
    c.clearRect(0, 0, this.width, this.height);
    this.bars.forEach((value, index) => {
      const width = (this.width / 64);
      const height = value * this.height;
      if (!index) c.fillStyle = &#x27;#FFF&#x27;; else c.fillStyle = value < 1 ? &#x27;#3CF&#x27; : &#x27;#F3C&#x27;;
      c.fillRect(index*width + 1, (1 - value)*this.height, width-1, height);
    });
    return this.steps;
  } …

Excerpt — the full answer is on the round page.

▶ R26 · Projectile ballistics22.4 s★ 1/10 Open round →
```html
<!DOCTYPE html>
<html><head><title>Projectile Motion</title><style>body{margin:0}. canvas{border:1px solid black;}</style></head>
<body><canvas id="c" width=800 height=400></canvas>
<script>
const c = document.getElementById(&#x27;c&#x27;), ctx=c.getContext(&#x27;2d&#x27;);
const W=800,H=400,g=0.15,v0=30,angles=[20,30,40,60,75];
let cannonballs=[]; // Each is {x,y,alpha,trailPoints:[]}
for(let a=0;a<angles.length;a++){
    const angle=angles[a]*Math.PI/180;
    cannonballs.push({
        x:W/2,
        y:H-30,
        a:angle,
        trail:[[W/2,H-30]]
    });
}

let allLanded = false, frameCount=0;

function updateCannonballs(){
    if(allLanded){
        cannonballs.forEach(c=>{
            c.x=c.x0; c.y=c.y0;
            c.trail=[c.x0,c.y0];
        });
        allLanded=false;
        return true;
    }
}

function animate() {
    frameCount++;
    ctx.clearRect(0,0,W,H); …

Excerpt — the full answer is on the round page.

▶ R27 · Double-pendulum chaos28.8 s★ 1/10 Open round →
```html
<!DOCTYPE html>
<html><body style="background:black;margin:0;display:flex;justify-content:center;align-items:center;height:100vh;">
<canvas id=c width=800 height=600></canvas>
<script>
const c=document.getElementById(&#x27;c&#x27;), ctx=c.getContext(&#x27;2d&#x27;);
const g=9.81,l=1,m=1,t=50;
let a=[t,t],alma=[t,t];
function d(p,th) { 
    const [x,y]=[Math.sin(a[p]),-Math.cos(a[p])]
    return[[l*x+m*l*(Math.sin(alma[p])-Math.sin(a[p]-alma[p]))+(g*m*(3*Math.sin(a[p])))/(6*(1+Math.cos(alma[p])))],[2*g*Math.sin(a[p]) - 3* (m*alma[p]^2 * Math.cos(a[p]) + a[p]^2 * Math.cos(2a[p])- ...) / (6/(...)) + ...] 
}
function u() {
    for(let i=0;i<2;i++) { 
        const delta = i ? 0.001 : 0;
        let[x,y]=[Math.sin(a[!i]),-Math.cos(a[!i])]
        ctx.beginPath();
        ctx.strokeStyle=i?&#x27;red&#x27;:&#x27;blue&#x27;;
        ctx.moveTo(l*x, m*l);
        ctx.lineTo(...d(i*i*delta …

Excerpt — the full answer is on the round page.

▶ R28 · Particle fountain24.9 s★ 2.5/10 Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;display:flex;flex-direction:column-align-items-center">
<canvas id=c width=800 height=600></canvas>
<div style="margin-top:20px">
<div style="display:inline-block;margin-right:10px">Wind speed: <span id="windValue" style="color:red">0</span> m/s</div>
<input type="range" id="windControl" min="-5" max="5" value="0" step="any">
</div>
<script>
const canvas = document.getElementById(&#x27;c&#x27;);
const ctx = canvas.getContext(&#x27;2d&#x27;);
let particles = [];
const emitterX = canvas.width / 2;
const emitterY = canvas.height;

class Particle{
    constructor(){
        this.x = emitterX + Math.random() * 5 - 2.5;
        this.y = emitterY;
        this.radius = Math.random() * 3 + 2;
        this.vx = 0;
        this.vy = -10;
        this.ang = (Math.random() - 0.5) * 0.3; 
    }
}

let wind = 0;
const gravity = 0.3;

function init(){ …

Excerpt — the full answer is on the round page.

▶ R29 · Orbital mechanics32.7 s★ 1/10 Open round →
```html
<!DOCTYPE html>
<html><head><title>Orbital Mechanics</title>
 <style>canvas{border:1px solid silver;background:#000}</style></head>
<body style="overflow:hidden;margin:0;">
 <canvas id=c size=512 512></canvas>
 <script>
 var c=document.getElementById(&#x27;c&#x27;), ctx=c.getContext(&#x27;2d&#x27;);
 const SUN_MASS=2e3, G=1.878; // gravitational constant
 var sun={x:256,y:256,radius:40,mass:SUN_MASS};
 var bodies=[sun];
 function init(){ // initialize planets and comet
  let a= [80,140,210]; // orbital radii for planets
  a.forEach((r,i) => {
   const angle = i * Math.PI/3;
   bodies.push({
    mass:i==0?250:100,
    radius:r<70?8:(6),
    x:Math.cos(angle)*r+sun.x,
    y:Math.sin(angle)*r+sun.y,
    vx:-Math.sin(angle)*Math.sqrt(G*SUN_MASS/(r)),
    vy: Math.cos(angle)*Math.sqrt(G*SUN_MASS/(r)),
    ax:0,ay:0,trail:[],
    opacity:t=>(1 - Date.now()%(50*(i+2)))/(1 + i)
   }); …

Excerpt — the full answer is on the round page.

▶ R30 · Spring-mass chain36.1 s★ 2.5/10 Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;display:flex;justify-content:center;align-items:center;height:100vh;background:#f0f0f0;">
<canvas id=c width=800 height=600></canvas>
<script>
const c=document.getElementById(&#x27;c&#x27;), ctx=c.getContext(&#x27;2d&#x27;);
const balls=[]; const springs=[];let grabs=-1;
class Ball{constructor(x,y,k,a,vx,vy){this.x=x,this.y=y,this.k=k,this.a=a,this.vx=this.vy=0}
applySpring(j){let dx=this.x-balls[j].x, dy=this.y-balls[j].y,d=Math.sqrt(dx*dx+dy*dy),f=this.k*(1-d)/d;
balls[j].a += f*dx/(this.k);this.a -=f*dx/(this.k)}}
const k=200,a=5;const step=40;n=800/step*3.5;n/=n>step?2:1;n=12-1
c.width=step*(n+1);const w=c.width,h=c.height/2;
for(let i=0;i<12;i++)balls[i]=new Ball(step*i+5,w/2,5,i%2?0x666699:0xff33ff,.5*h??0,0);
function update(){let b=balls[grabs];if(b){b.x=canvasEvent.x+.1*step,b.y=canvasEvent.y;
updateSprings()}
else{for(let i=0; …

Excerpt — the full answer is on the round page.

▶ R31 · Bat and ball (the classic reasoning trap) Open round →
**Lösung:**

Sei \( x \) der Preis des Balls in Euro. Da der Schläger um 1,00 Euro teurer ist als der Ball, kostet er \( x + 1{,}00 \) Euro.

Die Gesamtkosten von Ball und Schläger betragen:
\[
x + (x + 1{,}00) = 1{,}10
\]
Vereinfachen wir die Gleichung:
\[
2x + 1{,}00 = 1{,}10 \implies 2x = 0{,}10 \implies x = 0{,}05 \text{ Euro}
\]

**Antwort:** Der Ball kostet **0,05 Euro**.
▶ R32 · Four houses, four clues (constraint puzzle) Open round →
Natürlich, lassen Sie uns die Farben der Häuser von Position 1 bis 4 bestimmen:

### Gegebene Fakten:
1. **Rot** steht direkt links vom **blauen** Haus.
2. **Grüne** steht an Position 1.
3. **Gelb** steht direkt rechts vom **blauen** Haus.

### Schritt für Schritt Lösung:

1. **Grünes Haus** ist bereits an Position 1 festgelegt:
   - **Position 1:** Grün

2. **Blau** kann nicht in Position 1 stehen, da es links von Rot sein muss (Fakt 1). Also betrachten wir die Positionen 2, 3 und 4 für Blau.

3. **Gelb** steht direkt rechts vom **blauen** Haus (Fakt 3), also:
   - Wenn Blau in Position x ist, dann Gelb in Position x+1.

4. **Rot** steht direkt links vom **blauen** Haus (Fakt 1), also:
   - Wenn Blau in Position y ist, dann Rot in Position y-1.

5. **Viable Positionen:**
   - **Blau in Position 3:**
     - **Rot:** Position 2
     - **Gelb:** Position 4

6. **Überprüfung der Fakten mit …

Excerpt — the full answer is on the round page.

▶ R33 · Idioms that break literal translation (EN→DE) Open round →
1) "Die Kugel beißen" - eine schwere Entscheidung treffen oder sich einem unangenehmen Aufwand stellen.  
2) "Das Spiel liegt bei dir" - die Initiative liegt bei dir, und du musst entscheiden.  
3) "Es regnet Bindfäden" - es regnet in Strömen (heftig).
▶ R34 · Constrained taglines (word ban + length cap) Open round →
1. "Bamboo toothbrush: Gentle care for your smile."  
2. "Eco-chic design meets oral hygiene needs."  
3. "Discover the smooth brushing experience with bamboo."
▶ R35 · Minutes in a (non-leap) year — show the math Open round →
Um die Anzahl der Minuten in einem normalen Jahr (365 Tagen) zu berechnen, gehen wir Schritt für Schritt vor:

1. **Tage in Stunden umrechnen:**
   
   \[
   365\ \text{Tage} \times 24\ \text{Stunden/Tag} = 8\!760\ \text{Stunden}
   \]

2. **Stunden in Minuten umrechnen:**
   
   \[
   8\!760\ \text{Stunden} \times 60\ \text{Minuten/Stunde} = 525\!600\ \text{Minuten}
   \]

**Endergebnis:**

\[
\boxed{525600}
\]
▶ R36 · Continue the sequence (doubling gaps) Open round →
Die nächste Zahl in der Reihe ist **33**. Die Regel ist: Jede Zahl wird um das Doppelte des vorherigen Unterschieds erweitert.

**Schritt-by-Schritt Erklärung:**

1. Beginnen wir mit den gegebenen Zahlen: 2, 3, 5, 9, 17.
2. Berechnen die Differenzen zwischen aufeinanderfolgenden Termen:
   - 3 - 2 = 1
   - 5 - 3 = 2
   - 9 - 5 = 4
   - 17 - 9 = 8
3. Die Differenzen (1, 2, 4, 8) sind Potenzen von 2: 2⁰=1, 2¹=2, 2²=4, 2³=8.
4. Der nächste Unterschied wird also 2⁴=16 sein.
5. Addieren wir diesen Unterschied zur letzten Zahl hinzu:
   - 17 + 16 = 33
6. Daher ist die nächste Zahl **33**.

Die Regel: Jede Zahl ergibt sich aus der vorherigen Zahl plus dem Doppelten des letzten Differenzes, wobei der Unterschied selbst jeweils verdoppelt wird.
▶ R37 · False friend: 'control' EN→DE Open round →
„Bevor wir freigeben, muss ich die Testergebnisse prüfen und schließlich zwei Fehler beheben.“
▶ R38 · Register shift: formal → casual (DE) Open round →
Hey Susi, die Besprechung ist leider auf morgen um 10 Uhr verschoben worden. Hoffe, dass es okay ist!
▶ R39 · 40-word product blurb with 3 required words Open round →
Die edle Edelstahl-Trinkflasche ist auslaufsicher mit innovativem Öffnungsmechanismus, hält stundenlang die Flüssigkeit frisch und ist spülmaschinenfest. perfekt für ein luxuriöses Trinkgewerbe, das Dauerhaftigkeit und praktische Funktionen vereint.
▶ R40 · isPalindrome (ignore case & non-alphanumerics) Open round →
function isPalindrome(s) {
  const cleaned = s.replace(/[^a-zA-Z0-9]/g, '').toLowerCase();
  return cleaned === cleaned.split('').reverse().join('');
}
▶ R41 · Prose → valid JSON Open round →
{
  "Name": "Anna Schmidt",
  "Alter": 30,
  "Stadt": "Freiburg",
  "Hobbys": ["Lesen", "Radfahren"],
  "Newsletter abonniert": true
}
▶ R42 · All but nine (word-problem trap) Open round →
**Lösung:**

Der Bauer hat insgesamt **17** Schafe. Davon sterben alle bis auf **9**. 

\[
\boxed{9}
\]

Es leben **9** Schafe.
▶ R43 · Five machines (rate-reasoning trap) Open round →
**Lösung:**

Gegeben:
- **5 Maschinen** benötigen **5 Minuten**, um **5 Teile** herzustellen.

Schritt-für-Schritt:

1. **Ermittlung der Produktivität pro Maschine:**
   
   - 5 Maschinen produzieren 5 Teile in 5 Minuten.
   - Also, eine Maschine produziert \( \frac{5\,\text{Teile}}{5\,\text{Maschinen} \times 5\,\text{Minuten}} = \frac{1}{5}\,\text{Teile pro Minute pro Maschine} \).

2. **Berechnung der benötigten Zeit für 100 Maschinen und 100 Teile:**
   
   - Mit 100 Maschinen produziert man \( 100\,\text{Maschinen} \times \frac{1}{5}\,\frac{\text{Teile}}{\text{Minute}} = 20\,\text{Teile pro Minute} \).
   - Um 100 Teile zu herstellen, benötigt man \( \frac{100\,\text{Teile}}{20\,\frac{\text{Teile}}{\text{Minute}}} = 5\,\text{Minuten} \).

**Antwort:**

\(\boxed{5}\) Minuten
▶ R44 · Appointment extraction to strict JSON Open round →
[
  {
    "datum": "2026-08-12",
    "uhrzeit": "15:30",
    "titel": "Budgetplanung"
  },
  {
    "datum": "2026-09-03",
    "uhrzeit": "09:00",
    "titel": "Zahnarzttermin"
  },
  {
    "datum": "2026-12-31",
    "uhrzeit": "20:30",
    "titel": "Silvesterparty"
  }
]
▶ R45 · Idiom-dense German to natural English Open round →
"It's not exactly the golden egg, but we shouldn't rock the boat—in the long run, we can live with it."
▶ R46 · Energy conservation on a frictionless incline Open round →
Given a 2 kg block starting from rest at the top of a frictionless incline and sliding down to the bottom, dropping a height of 5 meters, we use energy conservation to find the speed and kinetic energy at the bottom.

(a) Using energy conservation, the potential energy at the top is converted into kinetic energy at the bottom. The formula for speed is derived from equating potential energy (PE) to kinetic energy (KE):

\[
mgh = \frac{1}{2}mv^2
\]

Canceling mass \( m \) from both sides and solving for \( v \):

\[
gh = \frac{1}{2}v^2 \implies 2gh = v^2 \implies v = \sqrt{2gh}
\]

Substituting \( g = 9
▶ R47 · Unit conversion: km/h to m/s and mph Open round →
Let's convert the car's speed step by step.

### (a) Convert 108 km/h to meters per second (m/s)

**Step 1:** Understand the conversion factors:
- **Kilometers to Meters:** 
  \[
  1\, \text{km} = 1000\, \text{m}
  \]
- **Hours to Seconds:**
  \[
  1\, \text{h} = 3600\, \text{s}
  \]

**Step 2:** Apply the conversion factors:
\[
108\, \frac{\text{km}}{\text{h}} = 108 \times \frac{1000\, \text{m}}{3600\, \text{s}}
\]
\[
= 108 \times \frac{5}{18}\, \frac{\text{m}}{\text{s}}
\]
\[
= 30.0\, \frac{\text{m}}{\text{s}}
\]

**Final Answer for (a):**
\[
\boxed{30.0\, \text{m/s}}
\]

### (b) Convert 108 km/h to miles per hour (mph)

**Step 1:** Understand the conversion factor between kilometers and miles:
\[
1\, \text{mile} = 1.60934\, \text{km}
\]
Therefore,
\[
1\, \frac{\text{km}}{\text{h}} = \frac{1}{1.60934}\, \frac{\text{miles}}{\text{h}}
\]

**Step 2:** Apply the conversion:
\[
108\, \frac{ …

Excerpt — the full answer is on the round page.

▶ R48 · Low-orbit satellite: speed and period (orbital/Kepler estimate)DNF Open round →
No usable answer reached the harness in this round.
▶ R49 · Ohm's law: resistance and power dissipation Open round →
Given a 12 V battery connected across a resistor with a steady current of 0.5 A, we can use Ohm's law and power formulas to find the required values.

(a) Using Ohm's law \( V = IR \), we rearrange to solve for resistance:
\[ R = \frac{V}{I} = \frac{12 \, \text{V}}{0.5 \, \text{A}} = 24 \, \Omega \]

(b) To find the electrical power dissipated, we use the formula \( P = VI \):
\[ P = V \times I = 12 \, \text{V} \times 0.5 \, \text{A} = 6 \, \text{W} \]

Alternatively, using other power formulas confirms the result:
- Using \( P = I^2R \):
  \[ (0.5 \, \text{A})^2 \times 24 \, \Omega = 0.25 \, \text{A}^2 \times 24 \, \Omega = 6 \, \text{W} \]
- Using \( P = \frac{V^2}{R} \):
  \[ \frac{(12 \, \text{V})^2}{24 \, \Omega} = \frac{144 \, \text{V}^2}{24 \, \Omega} = 6 \, \text{W} \]

Both methods confirm the power dissipated is 6 watts.

### Final Answer

(a) The resistance of the resistor is …

Excerpt — the full answer is on the round page.

▶ R50 · Thin lens equation: image distance and magnification Open round →
Given a converging lens with a focal length of 10 cm, an object is placed 15 cm in front of the lens on the optical axis. We need to find the image distance using the thin lens equation and then calculate the magnification.

First, we use the thin lens equation:
\[
\frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i}
\]
where \( f = 10 \) cm and \( d_o = 15 \) cm. Plugging in these values:

\[
\frac{1}{10} = \frac{1}{15} + \frac{1}{d_i}
\]

Subtracting \(\frac{1}{15}\) from both sides:

\[
\frac{1}{d_i} = \frac{1}{10} - \frac{1}{15}
\]

Converting to a common denominator (30):

\[
\frac{1}{10} = \frac{3}{30}, \quad \frac{1}{15} = \frac{2}{30}
\]

So,

\[
\frac{1}{d_i} = \frac{3}{30} - \frac{2}{30} = \frac{1}{30}
\]

Thus, the image distance \( d_i \) is:

\[
d_i = 30 \text{ cm}
\]

Next, we calculate the magnification \( m \):

\[
m = -\frac{d_i}{d_o} = -\frac{30}{15} = -2
\]

The negative magnif …

Excerpt — the full answer is on the round page.

▶ R51 · Heat required to warm water (specific heat capacity) Open round →
**Solution:**

We need to calculate the heat energy required to raise the temperature of 2 kg of water from \(20^\circ\text{C}\) to \(80^\circ\text{C}\). 

Given:
- Mass (\(m\)) = 2 kg
- Specific heat capacity (\(c\)) = 4186 J/(kg·K)
- Initial temperature (\(T_1\)) = \(20^\circ\text{C}\)
- Final temperature (\(T_2\)) = \(80^\circ\text{C}\)

First, calculate the change in temperature (\(\Delta T\)):
\[
\Delta T = T_2 - T_1 = 80^\circ\text{C} - 20^\circ\text{C} = 60^\circ\text{C}
\]

Since temperature differences in Celsius and Kelvin are the same, \(\Delta T\) remains \(60\text{K}\).

Now, use the formula for heat energy:
\[
Q = m \times c \times \Delta T
\]
\[
Q = 2\,\text{kg} \times 4186\,\text{J/(kg·K)} \times 60\,\text{K}
\]

Calculate the values step by step:
\[
2 \times 4186 = 8372
\]
\[
8372 \times 60 = 502,320
\]

So,
\[
Q = 502,320\,\text{J}
\]

To convert Joules to Kilojoules:
\ …

Excerpt — the full answer is on the round page.

▶ R52 · Fermi estimate: how many piano tuners in a 10-million-person city? Open round →
To estimate the number of professional piano tuners in a city of 10 million people:

1. **Total Households**: Approximately 4 million (assuming 2.5 people per household).
2. **Piano-Owning Households**: About 1% of households, so 40,000.
3. **Tunings Needed Annually**: Each piano needs one tuning per year, totaling 40,000 tunings.
4. **Tuners' Capacity**: Each tuner can perform about 7 tunings per week (approximating to 350 tunings annually).
5. **Number of Tuners Required**: 40,000 tunings / 350 tunings per tuner ≈ 114 tuners.

**Final Estimate**: Approximately 100-200 professional piano tuners in the city.
▶ R53 · Why is the sky blue? (conceptual) Open round →
The sky appears blue during the day due to a phenomenon called Rayleigh scattering. Sunlight consists of various colors, each with different wavelengths. When sunlight enters Earth's atmosphere, it collides with molecules and tiny particles, causing the light to scatter in many directions. Shorter wavelengths, such as those that appear blue, are scattered more efficiently than longer wavelengths like red or orange. This scattering is what makes the sky look blue when the sun is overhead. At sunrise or sunset, the sunlight passes through a greater thickness of the atmosphere, scattering away the shorter blue wavelengths and allowing the longer red and orange wavelengths to dominate, creating vibrant sunsets. Thus, Rayleigh scattering explains both the daytime blue sky and the colorful sunsets.
▶ R54 · Time dilation: why do moving clocks run slow? (conceptual, special relativity) Open round →
**Explanation of Time Dilation and its Symmetry in Special Relativity**

In special relativity, time dilation occurs when a clock moves relative to an observer. The moving clock appears to tick slower because the light pulses it emits have varying distances to travel due to the relative motion. This causes the intervals between ticks to seem longer to the stationary observer.

The symmetry of this effect arises from the relativity of frames: each observer considers themselves stationary and the other moving. Consequently, both observe the other's clock as slow without contradiction because there is no absolute frame of reference; all are equally valid. Thus, each measures the other's time as dilated, consistent within their own perspective, reflecting the principle that motion is relative.

**Answer:**

Time dilation in special relativity happens because a moving clock's light signals ta …

Excerpt — the full answer is on the round page.

▶ R55 · The double-slit experiment and wave-particle duality (conceptual, quantum mechanics) Open round →
The double-slit experiment elegantly demonstrates the principle of wave-particle duality. Here's a concise explanation:

1. **Without Observation**: When particles, such as electrons or photons, are sent through two slits one at a time without any detection, they exhibit an interference pattern on the screen. This behavior is characteristic of waves, where each particle interferes with itself as if it had passed through both slits simultaneously.

2. **With a Which-Path Detector**: If a detector is added to determine which slit each particle passes through, the interference pattern disappears, and instead, two distinct spots appear corresponding to each slit. This change indicates that the particles behave like classical particles when their path is observed or measured.

3. **Implications for Wave-Particle Duality**:
   - The experiment shows that particles can exhibit both wave-like an …

Excerpt — the full answer is on the round page.

▶ R56 · Double-slit interference, particle by particle Open round →
```html
<!DOCTYPE html>
<html><body style="background:#1a1a1a;margin:0;display:flex;justify-content:center;height:100vh">
<canvas id=c width=800 height=400></canvas>
<div id=count style="position:absolute;top:20px;left:50%;color:white;">0</div>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
const countEl=document.getElementById('count');
let particles=[],count=0;

const d=0.1,λ=0.4,l=3,w=8,h=400;
const pi=Math.PI,pii=pi*2;

function draw(){
    ctx.fillStyle='#1a1a1a';ctx.fillRect(0,0,c.width,c.height);
    
    // Source
    ctx.fillStyle='white';
    ctx.beginPath();
    ctx.arc(w-(w/3),h/2,5,0,pii); ctx.fill();

    // Slits
    const slitWidth=4;
    ctx.strokeStyle='white';ctx.lineWidth=2;
    ctx.beginPath();
    ctx.moveTo((w/2)-slitWidth/2,l*1.5); ctx.lineTo((w/2)+slitWidth/2,l*1.5);
    ctx.moveTo((w/2)-slitWidth/2,l*3.5); ctx.lineTo((w/2)+slitWidth/2,l*3 …

Excerpt — the full answer is on the round page.

▶ R57 · Hanging rope with Verlet integration Open round →
```html
<!DOCTYPE html>
<html>
<body style="background:#000;margin:0;display:flex;justify-content:center;height:100vh">
<canvas id=c width=800 height=600></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
const points = [];
const nextPoints = [];
const constraints = [];
let gravity = 0.1;
let timestep = 0;

// Initialize rope
for(let i=0;i<40;i++) {
    points.push(i===0 ? {x:50,y:20} : 
               i===39 ? {x:canvas.width-50,y:20} : {x:i*18+50,y:canvas.height/2});
}

// Create constraints between adjacent points
for(let i=0;i<points.length-1;i++) {
    constraints.push({a:i,b:i+1});
}

function update() {
    timestep++;
    
    // Apply gravity
    for(let i=0;i<points.length;i++) {
        let p = points[i];
        nextPoints[i] = {x:p.x,y:Math.min(p.y + gravity, canvas.height)};
    }

    // Relax constraints multiple times per …

Excerpt — the full answer is on the round page.

▶ R58 · 2D wave propagation with reflection Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;display:flex;justify-content:center;align-items:center;height:100vh;background:black;">
<canvas id=c width=640 height=480></canvas>
<script>
class Wave {
  constructor(rows,cols) {
    this.rows = rows
    this.cols = cols
    this.grid = new Float32Array(rows * cols)
    this.next = new Float32Array(rows * cols)
    this.width = cols;this.height=rows;
  }
  dampen() {for(let i=0;i<this.grid.length;i++)this.grid[i] *= .98}
  randomize() {Math.random().toString(36).split('').forEach((c,i)=>this.grid[i]=+(c>0?c+'.':-c)+1)}
  update() {
    for(let i=0;i<this.rows;i++)
      for(let j=0;j<this.cols;j++) {
        const idx = i * this.cols + j;
        let a, b
        if(i==0||i==this.rows-1||j==0||j==this.cols-1) {
          a = -this.grid[idx];
          b = this.grid[idx]
        } else {
          a = this.grid[(idx - this.cols - 1)] + …

Excerpt — the full answer is on the round page.

▶ R59 · Billiard break with spin and friction Open round →
```html
<!DOCTYPE html>
<html>
<head>
<canvas id="c" width=800 height=600 style="background:#4CAF50"></canvas>
<style>canvas{position:absolute; left:0; top:-30px}</style>
</head>
<body>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
class Ball {
  constructor(x,y) {this.x=x,this.y=y,this.vx=0,this.vy=0;
    this.r=15;this.friction=.98;this restitution=.7}
  draw() {
    ctx.fillStyle=randomColor();
    ctx.beginPath();ctx.arc(this.x,this.y,this.r,0,Math.PI*2);
    ctx.fill()
  }
  update() {
    if(Math.abs(this.vx)<.1 && Math.abs(this.vy)<.1) return;
    this.vx *= this.friction;this.vy *= this.friction;
    this.x += this.vx;this.y += this.vy
  }
}
let balls=[...Array(10)].map((_,i)=>new Ball(400+Math.random()*200-100,300));
balls[0].vx=5;balls[0].vy=-5;
const cue=new Ball(100,300);
let stopped=true;
function randomColor(){return`hsl(${Math.random()*360},70%,80% …

Excerpt — the full answer is on the round page.

▶ R60 · Dijkstra vs A* on a weighted grid Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden;">
<canvas id="c" width="600" height="300"></canvas>
<script>
let w=30,h=20,start=(0,0),end=(w-1,h-1);let c=document.getElementById('c').getContext('2d');let scale=2;let terrain={};function initGrid(){for(let y=0;y<h;y++)for(let x=0;x<w;x++)terrain[x+w*y]=Math.floor(Math.random()*10+1)}initGrid();class PriorityQueue{constructor(){this.heap=[]}insert(node){heap.push(node)}extractMin(){return heap.shift()}}let D={open:new Set(),closed:new Set()},A={open:new Set(),closed:new Set()};function dijkstra(){let q=new PriorityQueue;startCost=0;q.insert({x:0,y:0,cost:0,parentNode:null});while(q.heap.length>0){let u=q.extractMin();if(u.x==w-1&&u.y==h-1)break;if(D.closed.has(`${u.x},${u.y}`))continue;D.closed.add(`${u.x},${u.y}`);for(let dir of [[1,0],[-1,0],[0,1],[0,-1]]){let x2=u.x+dir[0],y2=u.y+dir[1];if(x2<0||x2>=w||y2<0||y2>=h)c …

Excerpt — the full answer is on the round page.

▶ R61 · Convex hull built step by step Open round →
```html
<!DOCTYPE html>
<html><head><title>Convex Hull</title><style>.c{border:2px solid black}</body>
<body style="padding:20px; background:#fff;">
<canvas id=c width=600 height=400></canvas><div id=i style="position:absolute;top:10;left:5;"></div>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d'),i=document.getElementById('i');
let points,hull,step=0,state='init',animateId;
function randomPoint(){return {x:Math.random()*400+10,y:Math.random()*300+10,color:'#'+(Math.random().toString(16).slice(2,5)).padEnd(3,'a')}}
c.addEventListener('click',e=>{clearInterval(animateId);points=hull=[];state='init';step=0;c.width=c.width;});// dummy

function convexHull(points){
  points.sort((a,b)=>a.x-b.x||a.y-b.y);
  let hull=[];
  for(let p of points){
    while(hull.length>=2&&cross(o(hull[hull.length-2]),o(hull[hull.length-1]),p)<0)hull.pop();
    hull.push(p);
  }
  return hull …

Excerpt — the full answer is on the round page.

▶ R62 · Huffman tree from letter frequencies Open round →
```html
<!DOCTYPE html>
<html><head><title>Huffman Tree Animation</title></head><body style="margin:0;overflow:hidden;background:#f0f0f0;">
<canvas id="c" width=800 height=600></canvas>
<script>
let canvas=document.getElementById('c'), ctx=canvas.getContext('2d');
const sentence='The quick brown fox jumps over the lazy dog.';
const freq={};for(let c of sentence.toLowerCase())if(c.match(/[a-z]/))freq[c]=(freq[c]||0)+1;
const nodes=[];Object.entries(freq).forEach(([k,v])=>nodes.push({char:k,freq:v,left:null,right:null}));

function buildTree(nodes){
    while(nodes.length>1){
        nodes.sort((a,b)=>a.freq - b.freq);
        const left=nodes.shift();
        const right=nodes.shift();
        new Node({...{freq:left.freq+right.freq},left:right.right?right:{...right},right:left});
        nodes.push(new Node({freq:left.freq+right.freq,left,right}));
    }
}

function drawNodes(node,x,y,dx …

Excerpt — the full answer is on the round page.

▶ R63 · Kruskal's MST with union-find Open round →
```html
<!DOCTYPE html>
<html><body style="display:flex;justify-content:center;align-items:center;height:100vh;margin:0;background:#f0f0f0">
<canvas id=c width=600 height=400></canvas>
<div id=stats style="position:absolute;top:left;left:0;padding:10px;color:black;"></div>
<script>
let c=document.getElementById('c'), ctx=c.getContext('2d');
let stats=document.getElementById('stats');
const nodes=[],edges=[],nodeCount=25,nodeSize=4;
let totalWeight=0,edgeAdded=0;

function generateNodes(){for(let i=0;i<nodeCount;i++){nodes.push({x:Math.random()*c.width,y:Math.random()*c.height,id:i});}}

function createEdges(){nodes.forEach((a,i)=>nodes.slice(i+1).forEach(b=>{let d=Math.hypot(a.x-b.x,a.y-b.y);edges.push({a:i,b:j,d:d,weight:d})}));}

function sortEdges(){edges.sort((a,b)=>a.weight - b.weight);}

class UnionFind{
  constructor(s){this.parent=s;this.rank=new Array(s).fill(1);}
  find(u){retu …

Excerpt — the full answer is on the round page.

▶ R64 · N-Queens solved by backtracking Open round →
```html
<!DOCTYPE html>
<html><head><style>body{margin:0}canvas{display:block;margin:auto;border:2px solid #333}#counter{position:absolute;top:20;left:20;font-family:sans-serif;color:#333}</style></head>
<body><canvas id="board"></canvas><div id="counter">Placements: 0 | Backtracks: 0</div>
<script>
const canvas = document.getElementById('board'), ctx = canvas.getContext('2d');
const boardSize = Math.floor(Math.random()*5 +6);
let placements =0,backtracks=0;
let grid,newX=[],solutionFound=false;

function setupCanvas(){canvas.width=boardSize*40;canvas.height=boardSize*40;}
setupCanvas();

function drawBoard(){
  for(let y=0;y<boardSize;y++){
    for(let x=0;x<boardSize;x++){
      const safe = !grid[y][x].attacked && !grid[y][x].queen;
      ctx.fillStyle = safe ? '#fff' : (grid[y][x].attacked ? '#ffcccc' : '#ffd700');
      ctx.fillRect(x*40,y*40,39,39);
    }
  }
}

function isValid(ro …

Excerpt — the full answer is on the round page.

▶ R65 · Delaunay triangulation, triangle by triangleDNF Open round →
No usable answer reached the harness in this round.
▶ R66 · AVL tree rebalancing with rotations Open round →
```html
<!DOCTYPE html>
<html><title>Random AVL Tree</title>
<canvas id=c width=800 height=600></canvas>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
let tree={};
let rotations=0, height=0;
class Node{
  constructor(v){
    this.v=v,this.left=this.right=null,this.bf=1,this.parent=null;
  }
}
function drawNode(x,y,r,v){
  ctx.beginPath();
  ctx.arc(x,y,5,0,2*Math.PI);ctx.fillStyle='white';ctx.fill();
  ctx.fillStyle='black';
  ctx.fillText(v, x-3,y+3);
  ctx.strokeStyle='black';ctx.stroke();
  if(r)ctx.fillText(r,x-3,y+18);
}
function drawTree(node,x,y,dx){
  if(!node)return;
  drawNode(x,y,dx,node.v);
  const l=node.left,r=node.right;
  let ly= y+20, lx=x-dx*4,lly=y+45,llx=l ? (l.x?l.x:x - dx *8) : x - dx*4;
  drawTree(l, lx,ly,dx/2);
  if(r){
    const ry=y+20, rx=x+dx*4;
    drawTree(r, rx,ry,dx/2);
    const mid=(x+rx)/2;drawNode(mid,y+30,dx,r.v);drawLines(x, …

Excerpt — the full answer is on the round page.

▶ R67 · Sieve of Eratosthenes on a number grid Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;padding:0;background-color:#2a2a2a;">
<canvas id="c" width="800" height="600"></canvas>
<div id="info" style="position:absolute;top:10px;left:10px;color:white;font-family:Arial;"></div>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
const info = document.getElementById('info');

const MAX_NUMBER = 400;
const COLORS = ['#ff0000','#00ff00','#0000ff','#ffff00','#ff00ff','#00ffff','#fda0d8','#a0d8ff'];
let sieve, primes, currentPrimeIndex;

function initSieve() {
  sieve = Array(MAX_NUMBER + 1).fill(true);
  sieve[0] = sieve[1] = false;
  return sieve;
}

function findPrimes(current=2) {
  if (current > MAX_NUMBER) return [];
  if (!sieve[current]) return findPrimes(current+1);
  const multiples = [];
  for(let i=current*2; i<=MAX_NUMBER; i+=current)
    multiples.push(i);
  return [current, ...fi …

Excerpt — the full answer is on the round page.

▶ R68 · Edit-distance DP matrix with backtrace Open round →
```html
<!DOCTYPE html>
<html>
<body style="background:#f0f0f0;">
<canvas id=c></canvas>
<div id=info></div>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let m, n, w, h;
let words = ["supercalifragilistic", "expialidocious"];
let dp, dir;

function start() {
    m = words[0].length;
    n = words[1].length;
    w = 45*(Math.max(m,n)+2);
    h = 35*(m+2);
    canvas.width = w; canvas.height = h;
    ctx.fillStyle = "#f0f0f0";
    ctx.fillRect(0,0,w,h);
    
    dp = Array.from({length: m+1}, ()=>Array(n+1).fill(0));
    dir = Array.from({length: m+1}, ()=>Array(n+1).fill(null));

    let step = 0;
    const totalSteps = (m+1)*(n+1);
    
    function fillCell(i,j) {
        if(i==m && j==n) return;
        let cost = 0;
        if(i==m) cost = dp[i][j+1]+1;
        else if(j==n) cost = dp[i+1][j]+1;
        else {
            if(words[0][i-1] …

Excerpt — the full answer is on the round page.

▶ R69 · Replanning when the map changes Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden">
<canvas id=c></canvas>
<div id=d></div>
<style>canvas{border:1px solid #333}#d{position:absolute;top:20;left:20;color:#fff}</style>
<script>
const c=document.getElementById('c'),d=document.getElementById('d');
const w=30,h=20,csize=c.width/(w*2),hSize=c.height/h;
let scale=Math.min(csize,hSize);
c.width=w*scale*2;c.height=h*scale*2;
const grid=[],start={x:0,y:0},goal={x:w-1,y:h-1};
for(let y=0;y<h;y++)grid[y]=new Array(w).fill(0);
function aStar(start,goal){
    const open=new Set();closed=new Set();
    open.add({x:start.x,y:start.y,f:0});
    const cameFrom={};
    while(open.size>0){
        let current=null;let minF=Infinity;
        for(let pos of open){if(pos.f<minF){current=pos,minF=pos.f}}
        if(current.x==goal.x&&current.y==goal.y)return [];
        open.delete(current);
        closed.add(current); …

Excerpt — the full answer is on the round page.

▶ R70 · Binary search, step by step Open round →
<!DOCTYPE html>
<html><head><style>canvas{border:1px solid #ccc}.labels{text-align:center;position:absolute;top:20px;left:50%;transform:translateX(-50%)}#t,#c{color:#fff;background:black;padding:5px 10px;position:absolute;bottom:10px;width:200px}</style></head><body><canvas id="cvs"></canvas><div class="labels" id="lbls"></div><div id="t">Target: </div><div id="c">Comparisons: 0</div><script>let cvas=document.getElementById('cvs'), ctx=cvas.getContext('2d'), w=1000,h=600, maxVal=40,a=[...Array(40)].map((_,i)=>i+1).sort();a.sort(()=>Math.random()-0.5);let target=a[Math.floor(Math.random()*a.length)], comparisons=0,cvsLen=40,len=w/40;function drawBar(x,y,h,w=2){ctx.fillStyle='#bbb';ctx.fillRect(x,y,w,h)}function drawBars(){cvas.width=h;lbls.innerHTML='';for(let i=0;i<40;i++){const x=i*len, val=a[i];const label=document.createElement('div');label.style.position='absolute';label.style.left=x …

Excerpt — the full answer is on the round page.

▶ R71 · Flood fill on a pixel grid Open round →
```html
<!DOCTYPE html>
<html><head><title>Flood Fill Animation</title><style>canvas{border:solid 2px #000;margin:10px auto;display:block;}#stats{position:fixed;top:0;left:0;background:#fff;padding:5px;color:#000;font-family:Arial;text-align:center;}</style></head>
<body><h1>Flood Fill</h1><canvas id="c"></canvas><div id="stats">Filled: 0 | Frontier: 0</div>
<script>
const c = document.getElementById('c'), ctx=c.getContext('2d');
const GRID_W=60,GRID_H=40,COLS=8,ROWS=8;
let stats=document.getElementById('stats');
let grid=[],queue=[],currentColorIndex=0,filledCount=0;

function init(){
    grid=[];
    queue=[];
    currentColorIndex=0;
    filledCount=0;
    
    // Create random colored blobs
    const colors=['#FF6B6B','#4ECDC4','#45B7D1','#96CEB4','#FFEEAD','#D4A5A5','#CFCFCF','#8E8E8E'];
    for(let y=0;y<GRID_H;++y){
        grid[y]=[];
        for(let x=0;x<GRID_W;++x){ …

Excerpt — the full answer is on the round page.

▶ R72 · Maze generation by recursive backtracking Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;display:flex;justify-content:center;align-items:center;height:100vh">
<canvas id="c"></canvas>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
const w=30,h=20,cs=5,s=w*h;
let walls=[],stack=[],current,path=[],carved=0,depth=0,timer=0;
function init(){walls=[];stack=[];current={x:Math.floor(Math.random()*w),y:Math.floor(Math.random()*h)};path=[];carved=0;depth=0;}
function getNeighbors(c){let n=[];const dirs=[[0,1],[1,0],[0,-1],[-1,0]];for(let d of dirs){let x=c.x+d[0],y=c.y+d[1];if(x>=0&&x<w&&y>=0&&y<h&&!path.find(p=>p.x==x&&p.y==y))n.push({x,y});}return n;}
function addWalls(c,p){let dx= p.x-c.x, dy=p.y-c.y; if(dx===1)walls.push({x:c.x*cs+cs-1,y:(c.y)*cs,width:2,height:cs*2});if(dy===1)walls.push({x:c.x*cs,(y+c.y+1)*cs-1,width:cs*2,height:2});if(dx==-1)walls.push({x:p.x*cs,(c.y)*cs,width:2,height:cs*2});if(dy==-1 …

Excerpt — the full answer is on the round page.

▶ R73 · KMP string search with prefix table Open round →
```html
<!DOCTYPE html>
<html><body style="background:#f0f0f0; margin:0; display:flex; justify-content:center; align-items:center;height:100vh">
<canvas id=c width=800 height=200></canvas>
<div id=o style="position:absolute;top:5px;left:5px;color:black"></div>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
let p,t,i,j,k,matchCount=1,charCompares=0;
function getP() {return String.fromCharCode(97+Math.random()*26).repeat(4)}
p=getP();t=getP().repeat(5);let pf=[];for(let i=0;i<=p.length-1;pf[i]=i==0?0:i+1 while pf[i]<=i&&(p[pf[i]]==p[i]?pf[i]++:pf[i--])) 
function animate(){c.width=c.width;o.textContent=`Matches: ${matchCount} | Comparisons: ${charCompares}`;
const cw=80,pw=p.length,tx=t.length;
ctx.fillStyle='#f0f'; ctx.fillRect(0,0,c.width,20);
ctx.fillStyle='black'; ctx.font='14px monospace';
for(j in p) {if(pf[j]==j-1)ctx.fillText(`${pf[j]}`,Number(j)*cw+30,25); …

Excerpt — the full answer is on the round page.

▶ R74 · Quadtree collision detection Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden;">
<canvas width=800 height=600 id=c></canvas>
<script>
const canvas=document.getElementById('c'), ctx=canvas.getContext('2d');
let balls=[],quadRoot=null,stats={nodes:0,pairs:0};
const colors=['#FF0000','#00FF00','#0000FF','#FFFF00','#FF00FF','#00FFFF'];

class QuadNode{constructor(x,y,w,h){this.x=x,this.y=y;this.w=w,this.h=h;this.nw=this.sw=null;this.ne=this.se=null;this.balls=[];this.active=true;}
addBall(ball){if(this.contains(ball.x,ball.y)) {this.balls.push(ball);return true;} return false;}
contains(x,y){const dx=x-this.x, dy=y-this.y; return dx>=0 && dx<this.w && dy>=0 && dy<this.h;}
subdivide(){if(!this.nw&&!this.ne&&this.balls.length>1){this.nw=new QuadNode(this.x,this.y,this.w/2,this.h/2);this.sw=new QuadNode(this.x+this.w/2,this.y,this.w/2,this.h/2);this.ne=new QuadNode(this.x,this.y+this.h/2,this.w/2,this.h/ …

Excerpt — the full answer is on the round page.

▶ R75 · Falling sand on a cell grid Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden">
<canvas id=c width=600 height=400></canvas>
<script>
const c=document.getElementById('c'),ctx=c.getContext('2d');
const w=150,h=100,csize=4;
let grid=[];for(let y=0;y<h;++y)grid[y]=new Array(w).fill(0);
let step=0,resting=0,count=0;
function draw() {
  ctx.clearRect(0,0,w*csize,h*csize);
  for(let y=0;y<h;++y) {
    for(let x=0;x<w;++x) {
      if(grid[y][x]>0) {
        ctx.fillStyle=`rgb(${-~(Math.sin(y/csize)*127+128)},${-~(Math.sin((y+x)/csize*2.5)*127+128)},128)`; 
        ctx.fillRect(x*csize,y*csize,csize-1,csize-1);
      }
    }
  }
}
function update() {
  ++step;
  const newGrid=[[...grid[0]];for(let y=1;y<h;++y)newGrid[y]=new Array(w).fill(0)];
  let r=0;
  for(let y=0;y<h;++y) {
    for(let x=0;x<w;++x) {
      if(grid[y][x]===0) continue;
      const ny=y+1;if(ny>=h){newGrid[y][x]=grid[y][x];r++;continue;} …

Excerpt — the full answer is on the round page.

▶ R76 · Falling sand as free particles Open round →
```html
<!DOCTYPE html>
<html>
<body style="background:#000;margin:0;display:flex;justify-content:center;height:100vh">
<canvas id=c width=800 height=600></canvas>
<script>
const c=document.getElementById('c'),ctx=c.getContext('2d');
let particles=[],groundHeight=0,countResting=0;
function init(){countResting=0;particles=[];for(let i=0;i<1500;i++) {
    let r=Math.random()*10+5, x = Math.random()*(c.width-2*r)+r, y=r;
    particles.push({x,y,vx:0,vy:Math.random()-0.5*3, radius:r,active:true});
}
const g=0.001; // gravity
function animate(){
    ctx.fillStyle='black';ctx.fillRect(0,0,c.width,c.height);
    ctx.beginPath();ctx.moveTo(0,c.height);ctx.lineTo(c.width,c.height);ctx.strokeStyle='white';ctx.lineWidth=2;
    ctx.stroke();
    let activeCount=0;
    for(let p of particles){
        if(!p.active) continue;
        p.vy+=g; // apply gravity
        let dx=p.x-Math.floor(p.x),dx=Math …

Excerpt — the full answer is on the round page.

▶ R77 · Crowd leaving a room, cell by cell Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;display:flex;justify-content:center;align-items:center;height:100vh">
<canvas id=c width=200 height=150></canvas>
<div id=s>Step 0, Left 0</div>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
const w=40,h=30;const cellSize=5;
let grid=[],people=[],left=0,step=0;

// Initialize grid
for(let y=0;y<h;++y){
    grid[y]=new Array(w).fill();
}

// Create people and their targets
function initializePeople(){
    people=[]
    for(let i=0;i<60;++i){
        let x=Math.floor(Math.random()*(w/2)),y=Math.floor(Math.random()*(h/2));
        while(grid[y]?.[x])x=Math.floor(Math.random()*(w/2)),y=Math.floor(Math.random()*(h/2));
        grid[y][x]={}
        people.push({x,y,target:getTarget(x,y)})
    }
}

function getTarget(ex, ey){
    let target=null;
    let queue=[[w-1,h-1]],dist=0;
    while(queue.length>0){
        con …

Excerpt — the full answer is on the round page.

▶ R78 · Crowd leaving a room by steering Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden;">
<canvas id=c width=800 height=600></canvas>
<div id=s style="position:absolute;top:0;left:10;left:px;color:white;">Left: 0 | Avg Speed: 0</div>
<script>
const canvas=document.getElementById('c'), ctx=canvas.getContext('2d');
const agents=[]; const maxAgents=60;
let exited=0, avgSpeed=0;

function createAgent(){
    let a={x:Math.random()*750+100,y:Math.random()*450+50,r:3,speed:.8,vx:0,vy:-.2};
    a.target={x:canvas.width-50,y:(canvas.height)/2}; agents.push(a);
}

for(let i=0;i<maxAgents;++i) createAgent();

function update(a){
    // steering towards target
    let dx=a.target.x-a.x, dy=a.target.y-a.y;
    let dist=Math.sqrt(dx*dx+dy*dy)+1e-8;
    a.vx += (dx/dist)*a.speed*a.r; 
    a.vy += (dy/dist)*a.speed*a.r;

    // repulsion from neighbors
    for(let b of agents){
        if(a===b) continue;
        let dx=b …

Excerpt — the full answer is on the round page.

▶ R79 · Aggregation on a lattice Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;background:#000;">
<canvas id=c width=200 height=150></canvas>
<div id=o style="position:absolute;top:10px;left:10px;color:white;font-family:monospace;"></div>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
const w=200,h=150;let grid=[],frozen=[],currentWalker=null,count=0,radius=0;
class Walker{constructor(){this.x=Math.floor(w/2);this.y=Math.floor(h/2);this.path=[]}
move(){if(this.path.length>400&&!grid.includes(this.path[this.path.length-1])){const dir=[[0,1],[0,-1],[1,0],[-1,0]][Math.random()*4|0];let x=this.x+dir[0],y=this.y+dir[1];if(x<0||x>=w||y<0||y>=h)return false;if(!frozen.some(p=>p.x==x&p.y==y)){this.x=x;this.y=y;if(frozen.some(p=>p.x==this.x&p.y==this.y))return this.freeze()}}}freeze(){frozen.push({x:this.x,y:this.y});grid.push(this.x+h*this.y);count++;radius=Math.sqrt((this.x - w/2)**2 + (this.y - h …

Excerpt — the full answer is on the round page.

▶ R80 · Aggregation by continuous drift Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;display:flex;flex-direction:column;align-items:center;background:black;">
<canvas id=c width=800 height=800></canvas>
<div id=i style="color:white;font-size:14px;"></div>
<script>
let c=document.getElementById('c'), ctx=c.getContext('2d');
let i=document.getElementById('i');
let w=h=800;
let particles=[],cluster=[],maxStuck=0,stickCount=0,radius=0;

class Particle{
  constructor(seed=false){
    this.x=Math.random()*w;
    this.y=Math.random()*h;
    if(!seed){
      this.x=w/2+10,this.y=h/2+10;
      return;
    }
    this.r=3;
    this.dx=(Math.random()-0.5)*0.1;
    this.dy=(Math.random()-0.5)*0.1;
  }
  update(){
    if(!this.seed){
      let dx=this.x - w/2, dy=this.y - h/2;
      let dist=Math.hypot(dx,dy);
      if(dist < radius+this.r && Math.abs(this.r-3)<1){
        this.stuck=true;
        stickCount++;
        maxStuck=Math. …

Excerpt — the full answer is on the round page.

▶ R81 · Flocking birds with three rules Open round →
```html
<!DOCTYPE html>
<html>
<head>
    <style>body{margin:0;padding:0;display:flex;justify-content:center;align-items:center;height:100vh;background:#fff}.canvas-container{position:relative}.info{position:absolute;top-left:5px;color:black;font-family:sans-serif}</style>
</head>
<body>
    <div class="info">
        <div id="flocks">Flocks: 0</div>
        <div id="speed">Speed: 0</div>
    </div>
    <canvas class="canvas-container" width="800" height="600"></canvas>

    <script>
        const canvas = document.querySelector('canvas');
        const ctx = canvas.getContext('2d');
        const birds = [];
        const flocks = [];
        const maxBirds = 200;
        let frameCount = 0;

        class Bird {
            constructor() {
                this.reset();
            }

            reset() {
                this.x = Math.random() * canvas.width;
                this.y = M …

Excerpt — the full answer is on the round page.

▶ R82 · Conway's Game of Life with seeded patterns Open round →
```html
<!DOCTYPE html>
<html><body style="background:#000;margin:0;display:flex;flex-direction:column;align-items:center;">
<canvas id=c style="border:1px solid #333;"></canvas>
<div id=g>Gen: 0</div>
<div id=l>Live: 0</div>

<script>
const canvas=document.getElementById('c'), ctx=canvas.getContext('2d');
const w=120,h=80; canvas.width=w*6; canvas.height=h*6;
let grid=[],next=[],age=[],stats={gen:0, live:0};
const colors=[];

class Cell{alive,r,g,b,a,age,colorUpdate(){this.r=(Math.sin(this.age/3.14)+1)*255;this.g=Math.pow(1 - Math.abs(this.age%720-360)/360,.5)*255;
this.b=255/(this.age%180/2+1);return `rgba(${Math.floor(this.r)},${Math.floor(this.g)},${Math.floor(this.b)},${this.a})`};}

function init(){grid=new Array(w).fill().map(()=>new Array(h).fill());next=new Array(w).fill().map(()=>new Array(h).fill());
age=new Array(w).fill().map(()=>new Array(h).fill(0));colors=new Array(w).fil …

Excerpt — the full answer is on the round page.

▶ R83 · Fourier epicycles tracing a shape Open round →
```html
<!DOCTYPE html>
<html><body style="background:#000;margin:0;display:flex;justify-content:center-align-items:center;height:100vh">
<canvas id=c width=600 height=400></canvas>
<script>
function setup() {
  const canvas = document.getElementById('c');
  const ctx = canvas.getContext('2d');
  
  // Setup
  let epicycles = [];
  const count = 20;
  const colors = ['#fff','#f0f','#0ff','#ff0'];
  for(let i=0;i<count;++i) {
    epicycles.push({
      r:Math.random()/3*(.5+.5*i/count),
      speed:(.1 - .02*i/count),
      angle:i%2==0?0:.Math.PI/4,
      x:canvas.width/2,y:canvas.height/2
    });
  }
  
  let path = [];
  let frameCount=0;
  const maxFrames=5000;
  
  function draw() {
    ctx.clearRect(0,0,canvas.width,canvas.height);
    
    // Draw traced path
    if(path.length>1) {
      ctx.beginPath();
      ctx.strokeStyle='rgba(255,255,255,.1)';
      ctx.moveTo(path[0].x,path …

Excerpt — the full answer is on the round page.

▶ R84 · Voronoi cells with moving seeds Open round →
```html
<!DOCTYPE html>
<html><head><style>canvas{border:1px solid black}.stats{position:absolute;top:0;left:520}</style></head><body><canvas id=c width=640 height=480></canvas><div class="stats">Cells: <span id=cells></span>, Largest area: <span id=largest></span></div>
<script>function i(){};let c=document.getElementById("c"),ctx=c.getContext("2d"),w=c.width,h=c.height,seeds=[],maxArea=0,n=25,N=n-1,Cells=0,sizes=[];class S{constructor(){this.x=(Math.random()*w)|0;this.y=(Math.random()*h)|0;x:this.x,y:this.y}}function m() {for(let s of seeds)s.x+=((Math.random()-.5)*3+.5);s.x=0 <s.x <w ? s.x : s.x<0 ? 0 : w;s.y=0 <s.y <h ? s.y : s.y<0 ?0 :h}function d(s,e){return (s.x-e.x)**2+(s.y-e.y)**2}function f() {let cells=[],neighbors=[];for(let i=0;i<n;++i)cells.push({p:seeds[i],a:[]});for(let i=0;i<n;++i){for(let j=i+1;j<n;++j){let p1=seeds[i],p2=seeds[j],mx=(p1.x+p2.x)/2,my=(p1.y+p2.y)/2,dx=p2 …

Excerpt — the full answer is on the round page.

▶ R85 · Travelling salesman improved by 2-opt Open round →
```html
<!DOCTYPE html>
<html><head><title>TSP Animation</title><style>canvas{border:1px solid black}</style></head>
<body><h1 style="color:#00f">Traveling Salesman</h1><canvas id=c id=mainCanvas width=800 height=600></canvas><div id=s stats></div>
<script>
const canvas=document.getElementById('c'), ctx=canvas.getContext('2d');
const W=canvas.width, H=canvas.height;
let cities, path, dist, cstat, animating, loops;

class City{constructor(){this.x=Math.random()*W; this.y=Math.random()*H;}

distance(c){return Math.hypot(this.x-c.x,this.y-c.y)}

color(){return `hsl(${Math.random()*360},100%,50%)`}}

function init(){cities=[]; for(let i=0;i<60;i++) cities.push(new City());}

let nearestNeighborTour=(()=>{
  const tour=[], visited=new Set;
  let start=cities[Math.floor(Math.random() * cities.length)];
  while(tour.length < 60){
    let next=start;
    for(let c of cities) if(!visited.has(c)){ …

Excerpt — the full answer is on the round page.

▶ R86 · Scrolling terrain from value noise Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden;">
<canvas id=c></canvas>
<script>
const c=document.getElementById('c'),ctx=c.getContext('2d');
const w=c.width=window.innerWidth,h=c.height=window.innerHeight;
let t=0,offset=0;

function noise(x,y,s) {
    let i=floor(x/s),j=floor(y/s);
    let dx=x-s*i,dy=y-s*j;
    return (1-dx)*(1-dy)*i + dx*(1-dy)*j + (1-dx)*dy*(i+1) + dx*dy*(j+1);
}

function random() {
  return sin(t++) * 255 |0;
}

function draw(offset,scale=1.0) {
  ctx.fillStyle='skyblue';ctx.fillRect(0,0,w,h);
  
  let c=c.getContext('2d');
  const colors=[[0, '#3399ff'],[50, '#00b14e'],[100, '#88dd33'],[150, '#66a533'],[200, '#447f33'],[250, '#225c33'],[300, '#113b33'],[350, '#002f2f']];
  c.fillStyle='rgb(0,0,255)';
  
  for(let x=0;x<w;x++) {
    let nx=(offset +x)/80;
    let n=noise(nx,0.5*16,4)+noise(nx,0.5*8,2)+noise(nx,0.5*4,1);
    let y=h/2+n*3; …

Excerpt — the full answer is on the round page.

▶ R87 · Gray-Scott reaction-diffusion Open round →
```html
<!DOCTYPE html>
<html><body style="background:#000;margin:0;display:flex;justify-content:center;align-items:center;height:100vh">
<canvas id=c></canvas>
<div id=s>Steps: 0</div>
<script>
const c=document.getElementById('c'),s=document.getElementById('s');
const w=256,h=256;
const canvas=c.getContext('2d');

let buffer0=new ImageData(new Uint8ClampedArray(w*h*4),w,h);
let buffer1=new Uint8ClampedArray(w*h*4);

function initBuffers(){
  let ptr=0;
  for(let y=0;y<h;++y){
    const cy=Math.abs(y-h/2)/h*2;
    for(let x=0;x<w;++x){
      const cx=Math.abs(x-w/2)/w*2;
      buffer0.data[ptr++]=cx<.1?1:0;
      buffer0.data[ptr++]=cy<.1?1:0;
      buffer0.data[ptr++]=0;
      buffer0.data[ptr++]=(cx<.2||Math.random()<.05)*16;
    }
  }
}

let step=0,rateU=3e-4,diffU=8e-4,diffV=3e-4;
const updateGrids=function() {
  const data0=buffer0.data,data1=buffer1;
  for(let y=0;y<h;++y){
    for …

Excerpt — the full answer is on the round page.

▶ R88 · L-system tree growing in wind Open round →
```html
<!DOCTYPE html>
<html><head><style>canvas{position:fixed; margin:0 auto;top:50vh;left:50%;transform:translate(-50%, -50%)}.info{position:fixed;top:20px;right:20px;color:#fff;font-family:sans-serif}</style></head><body>
<canvas id=c width=600 height=800></canvas>
<div class="info" id=i>Gen: 0, Branches: 0</div>
<script>
let c=document.getElementById('c'), ctx=c.getContext('2d'), w=c.width, h=c.height;
let depth=5, branches=0, angle=90, len=100, wind=0;
function generateLSys(depth){return depth>0 ? generateLSys(depth-1).replace(/X/g,Y+X).replace(/F/g,F+F) : 'X';}
function parse(s){return s.split('').map(c=>c=='+'?{t:'angle',val:2}:c=='-'?{t:'angle',val:-2}:c=='Y'?{t:'store'}:{t:'line',x:1}))}
function draw(cmds,x,y,a,l){cmds.forEach(c=>{
  ctx.save();
  if(c.t=='line'){ctx.beginPath();ctx.moveTo(x,y);let nx=x+l*Math.cos(a), ny=y+l*Math.sin(a);ctx.lineTo(nx,ny);ctx.strokeStyle='#fff …

Excerpt — the full answer is on the round page.

▶ R89 · Marching squares on a moving field Open round →
```html
<!DOCTYPE html>
<html><body style="background:#000;color:white;margin:0;overflow:hidden">
<canvas id=c></canvas>
<div style="position:absolute;top:10px;left:10px;z-index:2">Contour Lines: <span id=count>0</span></div>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
const cellSize=35, maxCells=Math.min(64, Math.floor(Math.min(c.width,c.height)/cellSize));
let grid=[], animationId;
function init(){
    grid=new Array(maxCells).fill().map(()=>new Array(maxCells).fill(0));
    let metaballs=[];for(let i=0;i<150;i++)metaballs.push({x:Math.random()*c.width,y:Math.random()*c.height,r:2+i%3,s:0.4+Math.random()});
    function updateGrid(){
        grid.forEach((row,i)=>row.fill(0));
        metaballs.forEach(b=>{
            for(let y=0;y<maxCells;y++){
                let dy=b.y - (i * cellSize + cellSize/2);
                for(let x=0;x<maxCells;x){ …

Excerpt — the full answer is on the round page.

▶ R90 · Poisson-disk sampling, Bridson's algorithm Open round →
```html
<!DOCTYPE html>
<html><head><style>body{background:#000}canvas{position:fixed;top:0;left:0;z-index:-1}</style></head>
<body><h2 style="color:#fff;padding:15px;">Poisson Disk Sampling</h2>
<canvas id=c width=800 height=600></canvas>
<div id=s stats></div>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
const w=c.width,h=c.height,d=Math.sqrt,minD=.05;
let grid=[],active=[],candidates=[];
function init(){grid=Array(h).fill().map(()=>[]);active=[];candidates=[];}
function addPoint(px,py){if(px<0||py<0||px>w||py>h)return false;
const x=~~(py/CELL), y=~~(px/CELL);if(grid[x][y])return false;
let canAdd=true,dx=CELL/2 - Math.abs(px%CELL-CELL/2);
for(let i=-1;i<3;i++)for(let j=-1;j<3;j++){
const nx=x+i,ny=y+j;if(!grid[nx]||!grid[ny][j])continue;
for(const p of grid[nx][ny]){let distSq=(px - p.x)*(px-p.x)+(py-p.y)*(py-p.y);
if(distSq < minD*minD){canAdd=false;break;} …

Excerpt — the full answer is on the round page.

▶ R91 · Starfield tunnel in perspective Open round →
```html
<!DOCTYPE html>
<html><head><style>canvas{position:absolute;top:0;left:0;width:100%;height:100%}</style></head><body><canvas id=c></canvas>

<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
const w=c.width=c.offsetWidth,h=c.height=c.offsetHeight;
let stars=[],i,starCount=500,cameraZ=400,focal=30,speed=.001;
function initStars(){for(i=0;i<starCount;++i)stars.push({x:Math.random()*w*2-1,y:Math.random()*h*2-1,z:-cameraZ});}
initStars();

function animate(t){
    ctx.fillStyle='rgba(0,0,0,.15)';
    ctx.fillRect(0,0,w,h);
    
    const dx= (w/2), dy=(h/2);
    let moved=true;
    
    for(i=0;i<starCount;++i){
        const s=stars[i];
        
        if(s.z>cameraZ)s.z-=speed*15;
        else{s.z=cameraZ+(Math.random()*3-1.5)*cameraZ;--starCount,stars.splice(i--,
            1,{x:Math.random()*w*2-1,y:Math.random()*h*2-1,z:-cameraZ});i=0}
        
        if( …

Excerpt — the full answer is on the round page.

▶ R92 · Rotating wireframe solids with depth sorting Open round →
```html
<!DOCTYPE html>
<html><body style="background:black;margin:0;display:flex;justify-content:center;align-items:center;height:100vh">
<canvas id=c></canvas>
<script>
const canvas=document.getElementById('c');
const ctx=canvas.getContext('2d');
let w=h=Math.min(window.innerWidth,window.innerHeight);
canvas.width=w;canvas.height=h;
let cubes=[],tetras=[];
function Vertex(x,y,z){return [x,y,z]}
let cubeVertices=[new Vertex(-1,-1,-1),new Vertex(1,-1,-1),new Vertex(1,1,-1),new Vertex(-1,1,-1),new Vertex(-1,-1,1),new Vertex(1,-1,1),new Vertex(1,1,1),new Vertex(-1,1,1)];
let cubeEdges=[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[1,5],[2,6],[3,7]];
let tetraVertices=[new Vertex(-1,-1,-1),new Vertex(1,1,-1),new Vertex(1,-1,1),new Vertex(-1,1,1)];
let tetraEdges=[[0,1],[1,2],[2,3],[3,0],[0,2],[1,3]];
function mat(x,y,z,a,b,c,d,e,f){return function(v,w){let u=[v[0],v[1],v[2]];u=x*u[ …

Excerpt — the full answer is on the round page.

▶ R93 · Rotating wireframe height field Open round →
```html
<!DOCTYPE html>
<html><body style="background:#000;margin:0;display:flex;justify-content:center;align-items:center;height:100vh">
<canvas id=c width=800 height=600></canvas>
<div id=s>Size: 50x40</div>
<div id=a>Angle: 0°</div>

<script>
let c=document.getElementById('c'),ctx=c.getContext('2d');
const w=c.width,h=c.height,g=50,j=40,f=600,t=0,ro=0;
let dx=new Array(g),dy=new Array(j);

function init(){for(let i=0;i<g;i++)dx[i]=(i/g-0.5)*w*2; 
  for(let j=0;j<40;j++) dy[j]=(j/39-1)*h*f/(j.length*.5);}

function project(x,y,z){
  let xp=x/f + z/(f*y) * x, yp=y/f + z/(f*y)*y;
  return{xp:xp*0.5*w+0.5*w,yp:yp*0.5*h+0.5*h};}

function smooth(points){
  for(let i=1;i<points.length-1;i++) 
    points[i]= (points[i-1]+points[i+1])/2;
  return points;}

let render=()=>{
  ctx.fillStyle='#111';ctx.fillRect(0,0,w,h);
  let data=[[...Array(g)].map((_,i)=>Math.sin(i/g*t*4 +ro) * 
    Math.cos( …

Excerpt — the full answer is on the round page.

▶ R94 · Raycast maze walkthrough Open round →
```html
<!DOCTYPE html>
<html><body style="background:black;margin:0;display:flex;justify-content:center;align-items:center;height:100vh">
<canvas id=c width=400 height=256></canvas>
<script>
const c=document.getElementById('c'),ctx=c.getContext('2d');let d=e=>{const a=(o)=>Math.floor(o);return{walled:(x,y)=>e[(y+0.5)/8][ (x+0.5)/8],cell:(x,y)=>[a(x/4),a(y/4)],dir:[]};}(window.innerWidth/4,window.innerHeight/8);

const maze=[],dirs=[[1,0],[0,1],[-1,0],[0,-1]];let m=20,n=15;for(let y=0;y<n;++y)maze[y]=new Array(m).fill(1);function generate(){let v=1,bounds=new Set();bounds.add([0,0]);while(bounds.size>0){const[a,b]=bounds.getRandomEntry();if(v%2==0)v++;maze[b][a]=0;for(let[dX,dY]of dirs){const X=a+dX,Y=b+dY;if(X>=0&&Y>=0&&X<m&&Y<n&&!maze[Y][X]){if(!v%3)break;bounds.delete([a,b]);bounds.add([X,Y])}}}

let dir=[1,0];let pos=[5,5],prevPos=pos.slice();function step(){const[dx,dy]=dir;let next …

Excerpt — the full answer is on the round page.

▶ R95 · Shaded sphere by painter's algorithm Open round →
```html
<!DOCTYPE html>
<html><body style="background:#000;margin:0;display:flex;justify-content:center;align-items:center;height:100vh">
<canvas id=c></canvas>
<script>
const canvas=document.getElementById('c'), ctx=canvas.getContext('2d');
const W=400,H=400,N=500,points=[],r=80;
function init(){for(let i=0;i<N;i++){let u=Math.random()*Math.PI*2,v=Math.random()*Math.PI;let x=r*Math.cos(u)*Math.sin(v),y=r*Math.sin(u)*Math.sin(v),z=r*Math.cos(v);points.push({x,y,z,u:v,T:i/5})}canvas.width=W(canvas.style.width=''),canvas.height=H}
function deg(c){return c.slice(-1)+'0'+c.slice(0,-1)} // viewport transform
function project(x,y,z,s,cx,W,H,k=200){return{x:k*(cx.x*s+z)/z+W/2,y:k*(cx.y*s+z)/z+H/2}} 
function dot(a,b){return a.x*b.x+a.y*b.y+a.z*b.z}
const light={x:1,y:0,z:0},vup={x:0,y:1,z:0};
let time=0,renderFrame;
function render(){if(!points.length)init();ctx.fillStyle='white';ctx.beginPath( …

Excerpt — the full answer is on the round page.

▶ R96 · Force-directed graph settling Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;padding:0;display:flex;justify-content:center;align-items:center;height:100vh;background:#f0f0f0">
<canvas id=c width=800 height=600></canvas>
<div id=gstats style="position:absolute;top:10px;left:10px;color:black;font-family:sans-serif;"></div>
<button onclick=startSim()>Start</button><button onclick=clearAll()>Clear</button>

<script>
class Node {
  constructor() {this.x=Math.random()*800;this.y=Math.random()*600;this.vx=this.vy=0;this.forceX=0;this.forceY=0;}
}

class Edge {
  constructor(from, to) {this.from=from;this.to=to;}
}

let nodes=[],edges=[];
const canvas=document.getElementById('c'), ctx=canvas.getContext('2d');
const statsDiv=document.getElementById('gstats');

function addEdge(from,to) {edges.push(new Edge(from,to));}
function createGraph() {
  nodes.length=0;
  edges.length=0;
  for(let i=0;i<25;i++) nodes.push(new Node …

Excerpt — the full answer is on the round page.

▶ R97 · Circle packing without overlap Open round →
```html
<!DOCTYPE html>
<html><body style="background:#000;margin:0;display:flex;justify-content:center;align-items:center;height:100vh">
<canvas id=c></canvas>
<div id=i style="position:absolute;left:0;top:0;color:white;font-family:Arial">Circles: 0</div>
<div id=ia style="position:absolute;left:0;top:20;color:white;font-family:Arial">Coverage: 0%</div>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
const cw=800,ch=600;
c.width=cw;c.height=ch;

let circles=[],maxRadius=5,cells=40,minR=2,maxR=100;
let count=0,areaCovered=0;

class Circle{
  constructor(x,y,r){
    this.x=x;this.y=y;this.r=r;
    this.growing=false;
    this.color=`hsl(${Math.random()*360},70%,50%)`;
  }
  overlaps(other){
    const dx=this.x-other.x,dy=this.y-other.y,d=dx*dx+dy*dy;
    return d< (this.r+other.r)**2;
  }
  draw(){
    ctx.beginPath();
    if(this.growing)ctx.arc(this.x,this.y,this. …

Excerpt — the full answer is on the round page.

▶ R98 · Squarified treemap of changing data Open round →
```html
<!DOCTYPE html>
<html>
<body style="background:#1a1a1a;margin:0;display:flex;justify-content:center;height:100vh">
<canvas id=c width=800 height=600></canvas>
<style>rect{fill:#fff;border:1px solid #333}.label{position:absolute;background:rgba(255,255,255,0.7);padding:4px}</style>
<script>
const canvas = document.getElementById('c'), ctx = canvas.getContext('2d');
const rects = [];
let labels = [], animating = true;

class Treemap {
  constructor() {this.update();}
  
  update() {
    const data = Array(20).fill().map(() => ({size: Math.random(), id: Date.now()})).sort((a,b) => b.size - a.size);
    this.data = data;
    
    const getNode = (x1, y1, x2, y2, items) => {
      if(items.length === 1) return {x1,y1,x2,y2,size:items[0].size,id:items[0].id};
      
      let dx = x2 - x1;
      let dy = y2 - y1;
      const isSquare = Math.min(dx, dy)/Math.max(dx, dy);
      const spl …

Excerpt — the full answer is on the round page.

▶ R99 · Three sorting algorithms racing Open round →
```html
<!DOCTYPE html>
<html>
<head><style>body{margin:0;background:#1a1a1a}canvas{width:100vw;height:100vh;display:block}</style></head>
<body><canvas id=c></canvas>

<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');

const width = canvas.width = window.innerWidth;
const height = canvas.height = window.innerHeight;

let sorts, sorted;

class SortVisualizer {
    constructor(array) {
        this.array = array.slice();
        this.n = array.length;
        this.barWidth = (width / 3 - 40)/this.n |0;
        this.data = [...array];
        this.completed = false;
        this.compareCount = 0;
    }
}

class Bubble extends SortVisualizer {
    sort() {
        if(this.completed) return;
        for(let i=0; i<this.n-1; ++i){
            if(i >= this.n - (this.compareCount%2)) {this.compareCount++;return;}
            const j = this.array.indexOf( …

Excerpt — the full answer is on the round page.

▶ R100 · Sankey flow with travelling particles Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;background:#1a1a1a">
<canvas id="c"></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let width=800,height=600;
canvas.width=width;canvas.height=height;

const sources = [{x:150,y:100},{x:150,y:300},{x:150,y:500}];
const targets = [{x:600,y:125},{x:600,y:325},{x:600,y:475},{x:600,y:625}];
const connections=[];

class Connection {
  constructor(s,t,f) {
    this.s=s;this.t=t;
    this.flow=f;
    this.points=[];this.width=flowMax? f/flowMax*10 : 0;
    for(let i=0;i<8;i++) {
      let p = {x:0,y:0};
      this.points.push(p);
    }
    this.particle = {x:s.x,y:s.y,dirX:t.x-s.x,dirY:t.y-s.y,
                     speed:(Math.random()+1)*flowSpeed,faded:false};
  }

  draw() {
    ctx.beginPath();
    for(let i=0;i<this.points.length-1;i++) {
      let p1 = this.points[i];
      let p2 = th …

Excerpt — the full answer is on the round page.

▶ R101 · Langton's ant building a highway Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;background:#fff">
<canvas id=c width=800 height=600></canvas>
<div id=s style="position:absolute;top:5;left:5;color:#000;font-family:sans-serif;font-size:14px;">Steps: 0</div>

<script>
const c=document.getElementById('c'),s=document.getElementById('s');
const ctx=c.getContext('2d');
let grid={},ant={x:0,y:0,d:3,b:grid[0,0]=false},step=0;

const dir=[[-1,0],[1,0],[0,-1],[0,1]];

function update(){
  const dx=dir[ant.d][0],dy=dir[ant.d][1];
  
  if(grid[[ant.x+dx,ant.y+dy]]=='undefined')grid[[ant.x+dx,ant.y+dy]]=false;
  grid[[ant.x,ant.y]]^=true;
  
  const nextColor=grid[[ant.x,ant.y]]?0:1;
  if(nextColor){
    ant.d=(ant.d+3)%4;
  }else{
    ant.d=(ant.d+1)%4;
  }
  
  ant.x+=dx;
  ant.y+=dy;
}

function draw(){
  ctx.fillStyle='#fff';
  ctx.fillRect(0,0,c.width,c.height);
  
  ctx.fillStyle=ant.b?'#000':'#fff';
  for(let y=-200; y<60 …

Excerpt — the full answer is on the round page.

▶ R102 · Rule 110 growing line by line Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden;">
<canvas id=c></canvas>
<script>
const c=document.getElementById('c'),ctx=c.getContext('2d');
const w=c.width=800,h=c.height=600;
let r=Array(3),x=0,y=0,speed=4,rows=1,currentRow=1;
for(let i=0;i<3;i++)r[i]=Array(w).fill(0);
r[1][w/2|0]=1;
function draw() {
  ctx.fillStyle='#fff';ctx.fillRect(x,y,w,h);
  for(let y=0;y<r.length-1;y++) {
    let ry=r[y],ry1=r[y+1];
    for(let x=0;x<ry.length;x++) {
      if(ry[x]) {
        const i=x-1,j=x,k=x+1;
        const left=jy=i>=0?ry[i]||0:0;
        const me=jy=ry[x];
        const right=kx=k<ry.length?ry[k]:0;
        const b=(left<<2)|((me&2)>>1)|(right>>1);
        ry1[x]=b^5;
      }
    }
  }
  ctx.fillStyle='#000';
  for(let y=0;y<r.length-1;y++) {
    let row=r[y],y1=y*sy;row.forEach((v,x)=>{if(v){ctx.fillRect(x*2+sx,(h-(r.length-y)*sh)+cy,1,sh);}});
  }
  if(currentRow …

Excerpt — the full answer is on the round page.

▶ R103 · Wireworld with a clock and a diode Open round →
```html
<div style="display:flex;justify-content:center;align-items:center;height:100vh;margin:0"><canvas id=c width=800 height=600 style="border:1px solid #fff"></canvas></div>

<script>
const c = document.getElementById('c'), ctx = c.getContext('2d');
const w = 80, h = 60;
const size = 10;
let grid = Array(h).fill().map(()=>Array(w).fill()), step=0,count=0;

class Cell {
  constructor(x,y) {this.x=x; this.y=y; this.reset();}
  reset() {this.type='empty'; this.head=false; this.tail=false;}
}
 
function initGrid() {
  for(let y=0;y<h;++y) for(let x=0;x<w;++x) {
    let cell = new Cell(x,y);
    if(y==Math.floor(h/2)) {
      if(x == w-1 || x ==0) cell.type='conductor';
      else if(x%2==0) cell.type='conductor';
      else cell.type='diode'; 
    }
  }
  grid[Math.floor(h/2)][Math.floor(w/2)].type = 'electron';
}

function draw() {
  ctx.clearRect(0,0,c.width,c.height);
  for(let y=0;y< …

Excerpt — the full answer is on the round page.

▶ R104 · Abelian sandpile toppling Open round →
```html
<!DOCTYPE html>
<html><body style="background:#000;margin:0;display:flex;justify-content:center;align-items:center;height:100vh">
<canvas id=c></canvas>
<script>
const c=document.getElementById('c'),ctx=c.getContext('2d');
const w=50,h=w*2,cellSize=h/100,c.size=cellSize;
c.width=w*h/100*c.size|0;c.height=h*h/100*c.size|0;
let grainsDropped=topples=0,g=4,i=0,j=0,grid=[],active=true;

class S{constructor(w,h){this.w=w;this.h=h;this.g=[];for(let y=0;y<h;++y)this.g[y]=new Array(w).fill(0)}
drop(x,y,n=1){while(n>0&&y>=0&&y<this.h&&x>=0&&x<this.w){this.g[y][x]+=n;n=0;if(this.g[y][x]>=g){topples++;for(let d=[-1,0],[1,0],[0,1],[0,-1];d.length;d.splice(1,1)) {let ny=y+d[0],nx=x+d[1];if(ny>=0&&ny<this.h&&nx>=0&&nx<this.w)this.g[ny][nx]++;}this.g[y][x]-=4;}}}
}

function draw(){c.width=c.width;c.height=c.height;const w=c.width,h=c.height,sw=w/(W-1),sh=h/(H-1);for(let y=0;y<H;++y) for(let x= …

Excerpt — the full answer is on the round page.

▶ R105 · Brian's Brain Open round →
```html
<!DOCTYPE html>
<html><body style="background:#000;margin:0;display:flex;justify-content:center;align-items:center;height:100vh">
<canvas id=c></canvas>
<script>
const canvas=document.getElementById('c');const ctx=canvas.getContext('2d')
const w=150,h=150;canvas.width=w*8,canvas.height=h*8
const cellSize=8
let grid=[[[]]],nextGrid=[[[0]]]
let gen=0,liveCells=0

function init(){grid=new Array(w).fill().map(()=>new Array(h).fill(0).map(()=>Math.random()<.95?0:1));for(let y=0;y<h;++y)for(let x=0;x<w;++x){if(Math.random()<.02)grid[x][y]=2}}
function drawGrid(){ctx.fillStyle="#333";ctx.fillRect(0,0,w*cellSize,h*cellSize);for(let y=0;y<h;++y)for(let x=0;x<w++){const state=grid[x][y];switch(state){case 0:break;case 1:{ctx.fillStyle="#4CAF50";break;}case 2:{ctx.fillStyle="#FFC107";}}if(state!==0){ctx.fillRect(x*cellSize+1,y*cellSize+1,(cellSize-2),(cellSize-2))}}
function countNeighbors( …

Excerpt — the full answer is on the round page.

▶ R106 · Truchet tiles rearrangingDNF Open round →
No usable answer reached the harness in this round.
▶ R107 · Hilbert curve drawing itself Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;padding:0;max-width:100vw;height:100vh">
<canvas id=c></canvas>
<div id=o style="position:absolute;top:20;left:20;color:white;font-family:sans-serif;font-size:18px"></div>
<div id=p style="position:absolute;top:40;left:20;color:white;font-family:sans-serif;font-size:16px"></div>

<script>
const canvas=document.getElementById('c')
const ctx=canvas.getContext('2d')
canvas.width=window.innerWidth
canvas.height=window.innerHeight

let currentOrder=5,orderCount=3,orders=[5,6,7],points=[],curve=new Set(),animating=false,oElement=document.getElementById('o'),pElement=document.getElementById('p')

function makeHilbert(order,sidelength,orientation){
    if(order==0)return [[0,0],[ sidelength,0],[sidelength,sidelength],[0,sidelength]]
    const prev=makeHilbert(order-1,sidelength/2,-90*orientation)
    const next=makeHilbert(order-1,sidelength/2, …

Excerpt — the full answer is on the round page.

▶ R108 · Interlocking star pattern on a grid Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;background:#000;overflow:hidden">
<canvas id=c></canvas>
<script>
const canvas=document.getElementById('c'),ctx=canvas.getContext('2d');
let w=innerWidth,h=innerHeight,gr=4,r=360;
function resize(){w=innerWidth,h=innerHeight;canvas.width=w;canvas.height=h;}onresize=resize;
function init(){let s=Date.now();let c=0;let g=~~(Math.random()*12+5);let colors=['#FF3366','#9966FF','#FFCC00','#33CC99','#FF9900','#9933FF','#CCFF33','#3399FF'][Array.from({length:g*g}).map(_=>Math.random()<.5)].join(',');let cells=[];for(let y=0;y<g;y++)for(let x=0;x<g;x++){cells.push({x,y,ox:x*gr+gr/2,oy:y*gr+gr/2,p:[]})}function p(x,y,r,i){return{x:r*Math.cos(i)+x,y:r*Math.sin(i)+y}}function createPolygon(cell){let n=5+Math.random()*2;let s=[];let a=[];for(let i=0;i<n;i++){a.push(2*i/n*Math.PI)}s=[...Array(n)].map((_,i)=>p(cell.ox,cell.oy,gr/3,a[i]))}cells.forEac …

Excerpt — the full answer is on the round page.

▶ R109 · Moire from two rotating rasters Open round →
```html
<!DOCTYPE html>
<html><head>
    <title>moire</title>
    <style>
        body{margin:0;padding:0;display:flex;justify-content:center;align-items:center;height:100vh;background:black}
        canvas{border:1px solid white}
    </style>
</head>
<body>
    <canvas id=c></canvas>
    <script>
        const c=document.getElementById('c'),ctx=c.getContext('2d');
        let w=400,h=400,rings=30,speed=.05,displace=0,alpha=.7;
        
        c.width=w;c.height=h;
        
        function drawRing(r,g,b) {
            ctx.beginPath();
            for(let i=-90; i<270; i+=speed*.1*45) {
                const x=Math.cos(i*Math.PI/180)*r;
                const y=Math.sin(i*Math.PI/180)*r;
                ctx.moveTo(x,y);
                ctx.lineTo(x+speed*.5*(Math.random()-0.5),y+speed*.5*(Math.random()-0.5));
            }
            ctx.strokeStyle=`rgba(${r},${g},${b},${alpha})`; …

Excerpt — the full answer is on the round page.

▶ R110 · Penrose-style aperiodic tiling growing Open round →
```html
<!DOCTYPE html>
<html><body style="display:flex;justify-content:center;align-items:center;height:100vh;margin:0;background:#1a1a1a;color:white;font-family:Arial">
<canvas id="c"></canvas>
<div id="i" style="position:absolute;top:10px;left:10px;"></div>
<script>
class Tiling {
  constructor() {
    this.c = document.getElementById('c');
    this.ctx = this.c.getContext('2d');
    this.generation = 0;
    this.rhombuses = [];
    this.seedWidth = 6;
    this.scale = 180;
    this.substitutions = [
      [{x:0,y:-1}],[{x:.5,y:-.5},{x:-.5,y:-.5}],
      [{x:0,y:-1.5}],[{x:.25,y:-.75},{x:-.25,y:-.75}]
    ];
    this.substitutions[1][1].x = 0;
    this.init();
  }
  init() {
    this.c.width = window.innerWidth / 2 > 300 ? 600 : 400;
    this.c.height = this.c.width;
    this.seedWidth *= this.scale;
    this.substitute(8);
    const rect = this.c.getBoundingClientRect();
    this.ctx …

Excerpt — the full answer is on the round page.

▶ R111 · Ant colony laying pheromone trails Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;padding:0;overflow:hidden;background:#000;">
<canvas id=c></canvas>
<div id=s style="position:fixed;top:10px;left:10px;color:white;font-family:sans-serif;"></div>
</body>
<script>
const c=document.getElementById('c'),s=document.getElementById('s');
const ctx=c.getContext('2d');let w=h=500,nestX=250,nestY=250,radius=40;
let ants=[],pheromones=new Map,foodSources=[],score=0,time=0,count=0;

function init(){c.width=w;c.height=h;setParams();}
function setParams(){ants.length=30;speed=1.5;evaporation=0.02;findFoodRadius=40;}

let speed,evaporation,findFoodRadius;
function updateAnts(){
  for(let a of ants){
    if(!a)return;
    let dx=nestX - a.x,dy=nestY -a.y,dir=0.1*(Math.atan2(dy,dx)+Math.PI);
    if(a.state=='wandering'){
      a.dir+=0.1*(Math.random()-0.5);a.bias=0;
      const px=a.x+pheromones.get(`${Math.floor(a.x)}|${Math.floor(a. …

Excerpt — the full answer is on the round page.

▶ R112 · Physarum slime-mould network Open round →
```html
<!DOCTYPE html>
<html><head><title>Physarum Simulation</title></head><style>canvas{border:1px solid #333}body{display:flex;justify-content:center;align-items:center;height:100vh;margin:0;background:#112}</style><script>
let canvas=document.createElement('canvas');let ctx=canvas.getContext('2d');
let cw=ch=512;canvas.width=cw;canvas.height=ch;
let particles=[];let trail=[];let step=0;let agentCount=3000;

class Particle{constructor(){this.x=Math.random()*cw;this.y=Math.random()*ch;this.vx=0.5*(Math.random()-0.5);this.vy=0.5*(Math.random()-0.5);this.maxSpeed=0.2;
this.direction=0;this.senseRadius=4}}
class Trail{constructor(){this.x=this.y=0;this.decay=0.98;this.blur=3;this.deposits=[]}

sense(x,y){let res=0;for(let d of this.deposits){let dx=x-d.x;let dy=y-d.y;d=w=d人生的衰减;}

    let dist=Math.sqrt(dx*dx+dy*dy);if(dist<1)dist=1;
    return (d/w).sum / dist²;
}}

function init(){part …

Excerpt — the full answer is on the round page.

▶ R113 · Predator and prey on a shared fieldDNF Open round →
No usable answer reached the harness in this round.
▶ R114 · Traffic jam from nothing Open round →
```html
<!DOCTYPE html>
<html><head><title>Traffic Simulation</title></head><style>canvas{border:1px solid #333}body{background:#000;color:#fff;text-align:center;margin:0}</style><canvas id=c width=800 height=400></canvas><div id=speeddisp style="position:absolute;top:20px;left:50%;transform:translateX(-50%)">Average speed: 0</div>
<script>let c=document.getElementById('c'), ctx=c.getContext('2d'), len=180, maxSpeed=3, cars=[];function init(){cars=[];for(let i=0;i<400;i++)cars.push({x:i*len/60,y:c.height/2,r:5,s:0,a:0,d:i*len/60});let s=c.width/80;ctx.strokeStyle='white';ctx.lineWidth=2}function update(){for(let i=0;i<cars.length;i++){let car=cars[i], lead=i==cars.length-1?cars[0]:cars[(i+1)%cars.length];let dx=(lead.x - (car.x + len))%c.width;if(dx < 0)dx +=c.width;let maxSpd=Math.min(maxSpeed, car.x + maxSpeed > lead.x ? lead.x - car.x : maxSpeed);car.a=0;car.s=Math.min(maxSpd, car.s+1 …

Excerpt — the full answer is on the round page.

▶ R115 · Crowd leaving through a bottleneck Open round →
```html
<!DOCTYPE html>
<html>
<head>
<canvas id="c"></canvas><div id="info" style="position:absolute;top:10;left:10;"></div>
<style>canvas{position:absolute;top:0;left:0;width:100%;height:100%}</style>
</head>
<body>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
const info = document.getElementById('info');

const cellSize = 20;
const numPeople = 500;
const doorX = canvas.width / 2 - 10;
const doorY = canvas.height * 0.8;
const wallThickness = 40;

let particles = [];
let count = numPeople;
let flowRate = 0;
let needsRefill = false;

class Particle {
  constructor() {
    this.x = Math.random() * (canvas.width - cellSize*2) + cellSize;
    this.y = canvas.height - cellSize;
    this.targetX = doorX + (Math.random() * 60 - 30);
    this.targetY = doorY;
    this.dx = 0;
    this.dy = 0;
    this.radius = cellSize/2;
  }
}

function initPeople( …

Excerpt — the full answer is on the round page.

▶ R116 · Bresenham circles and lines, pixel by pixel Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;display:flex;justify-content:center;align-items:center;height:100vh;background:black;">
<canvas id=c width=600 height=600></canvas>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d'), imgData=c.createImageData(600,600), data=imgData.data;
let angle=0,pixelCount=0,alpha=1,running=!0;

function setPixel(x,y,c){
x+=300,y+=300;x<0||x>599||y<0||y>599?void 0:c&=((Math.random()<<24)|((x+60*y)%256<<16)|(x%256<<8)|1);
}

function line(x1,y1,x2,y2){
const dx= Math.abs(x2-x1), dy=Math.abs(y2-y1);let e,steep,dx1,dx2,dy1,dy2;
e=dx>dy?1:-1;steep=dx<dy;x1<x2?(dx1=1:dx1=-1):dx1=(x2>x1?1:-1);
y1<y2?dy1=1:dy1=y2>y1?-1:0;
dx2=steep?dy:dx,dy2=steep?dx:dy;
for(let i=0,x=x1,y=y1;i<=dx2;x+=dx1,i++)c||(e>=(y-y1)*(y-y1)?(e--,x+=steep?(dy1):0),(y+=dy1)):(e-=dx, x+=1-steep);
}

function circle(x,y,r){
let e= r<<1;for(let y1=r,x1=0;x1<=e/2&&y1>= …

Excerpt — the full answer is on the round page.

▶ R117 · De Casteljau construction of a Bezier curve Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden;">
<canvas id="c"></canvas>
<div style="position:absolute;top:10px;left:10px;font-family:Arial;">t=<span id="t">0</span></div>
<div style="position:absolute;top:40px;left:10px;">A:<span id="a" style="color:red;"></span></div>
<div style="position:absolute;top:60px;left:10px;">B:<span id="b" style="color:green;"></span></div>
<div style="position:absolute;top:80px;left:10px;">C:<span id="c2" style="color:blue;"></span></div>
<div style="position:absolute;top:100px;left:10px;">D:<span id="d" style="color:magenta;"></span></div>

<script>
const c = document.getElementById('c'), ctx=c.getContext('2d');
let t=0,a,b,c2,d,animId;
function init(){a={x:Math.random()*400-200,y:(Math.random()+1)*150};b={x:a.x+200+Math.random()*150,y:a.y+(Math.random()-0.5)*100};
c2={x:b.x+Math.random()*300-100,y:b.y+Math.random()*100};d={x:c2.x+Mat …

Excerpt — the full answer is on the round page.

▶ R118 · Sutherland-Hodgman polygon clipping Open round →
```html
<!DOCTYPE html>
<html>
<body style="margin:0;display:flex;justify-content:center;align-items:center;height:100vh;background:#f0f0f0;">
<canvas id=c width=640 height=480></canvas>
<script>
const c=document.getElementById('c'),ctx=c.getContext('2d');
let A=[];let B=new Array(4).fill().map(_=>[0,1]);let count=0;
const W=[[-1,0],[0,1],[-1,-1],[1,0]];let phase=0,time=0;
function sutherlandHodgmanCore(poly,edge){let o=[];for(let i=0;i<poly.length;i++){const a=poly[i],b=poly[(i+1)%poly.length];const sa=ccw(a,edge[0],edge[1]);sb=ccw(b,edge[0],edge[1]);if(sb<0) o.push(b);else if(sa<0)o.push(...[a,b]);}return o;}
function clipPolygon(poly,win){let current=poly;for(let i=0;i<4;i++){current=sutherlandHodgmanCore(current,W[i]);}return current;}
function ccw(a,b,c){return (b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0]);}
function generateRandomConcavePolygon(){let p=[];for(let i=0;i<6+Math.ran …

Excerpt — the full answer is on the round page.

▶ R119 · Floyd-Steinberg dithering a gradient Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden;">
<canvas id=c></canvas>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
const w=c.width=512,h=c.height=512;
let t=0;
const palette=[0,32,64,96,128,160,192,224];
function floydSteinberg() {
    const data=new Uint8ClampedArray(w*h);
    for(let y=0;y<h;y++) {
        for(let x=0;x<w;x++) {
            let i=y*w+x;
            // Generate grayscale value from sine wave
            let v=(Math.sin(x/w*4+2*Math.PI*t/10)+1)/2*255;
            let q=palette[Math.floor((v/(256/palette.length)))];
            data[i]=q;
            let e=v-q;
            // Distribute error to neighbors
            if(x<w-1) data[i+1]+=e*7/16;
            if x<w-1&&y<h-1 data[i+w+1]+=e*5/16;
            if y<h-1 data[i+w]+=e*3/16;
            if x>0&&y<h-1 data[i-w+1]+=e*1/16;
        }
    }
    const img=new ImageData( …

Excerpt — the full answer is on the round page.

▶ R120 · Scanline fill of a self-intersecting polygon Open round →
```html
<!DOCTYPE html>
<html><head><style>canvas{border:1px solid black}.stats{position:absolute;top:0;left:5px;color:#fff;background:#000;padding:2px}</style></head><body><div class="stats" id="scanlines">Scanlines:<span id="sl">0</span></div><div class="stats" id="spans">Spans filled:<span id="sf">0</span></div><canvas width=600 height=400 id=c></canvas>

<script>
class Polygon {
  constructor() {
    this.points = [];
    const r = Math.PI * 2;
    for (let i = 0; i < 8; i++) 
      this.points.push({x: 100 + Math.cos(i * r / 6) * 70, y: 150 + Math.sin(i * r / 6) * 70});
    this.theta = 0;
  }

  update() {
    const c = document.getElementById('c');
    const scale = .8;
    for (let i in this.points)
      this.points[i] = {x: 300 + Math.cos(this.points[i].x * scale) * 100, y: 200 + Math.sin(this.points[i].y * scale) * 100};
    this.theta += .05;
  }
}

class ScanlineFiller {
  c …

Excerpt — the full answer is on the round page.

▶ R121 · A* pathfinding search across an obstacle grid Open round →
```html
<!DOCTYPE html>
<html>
<head>
<canvas id=c width=600 height=400></canvas>
<div id=i style="position:absolute;top:10px;left:10px;color:black;"></div>
<script>
let c=document.getElementById('c'), ctx=c.getContext('2d');
const cols=25, rows=25, cellSize=17;
let start,end,path=openSet=closedSet=new Set;metrics=document.getElementById('i');
let grid=null,nodesExpanded=0,pathLength=0,isDone=false,isSearching=true;

function setup(){grid=new Array(cols).fill().map(_=>new Array(rows).fill(0));
start={x:Math.floor(Math.random()*cols),y:Math.floor(Math.random()*rows)};end={...start};
while(end.x==start.x||end.y==start.y){end.y=Math.floor(Math.random()*rows)}
for(let i=0;i<cols;i++)for(let j=0;j<rows;j++)grid[i][j]=Math.random()<0.3?1:0;
runAStar();}

function runAStar(){
if(isDone||isSearching&&!openSet.size){setup();return;}
nodesExpanded++;
let f=();
return;
for(let x=start.x-1;x<=start. …

Excerpt — the full answer is on the round page.

▶ R122 · Randomized maze generation via recursive backtracking Open round →
```html
<!DOCTYPE html>
<html><title>Randomized Maze</title><style>body{background:#111;margin:0;display:flex;justify-content:center;align-items:center;height:100vh}</style><canvas id=c></canvas>
<script>
let c=document.getElementById('c'),ctx=c.getContext('2d');
const GRID_SIZE=16,CELL_SIZE=3;
let w=h=Math.min(window.innerWidth, GRID_SIZE*CELL_SIZE*4);
c.width=w;c.height=h;let grid=[[...Array(GRID_SIZE)].map(_=>[...Array(GRID_SIZE)])];
let stack=[],current=[0,0],path=[],carved=1,r=0,g=0,b=3;
function draw() {
  ctx.fillStyle='#222';ctx.fillRect(0,0,w,h);
  ctx.strokeStyle='white';ctx.lineWidth=.5;
  for(let i=0;i<GRID_SIZE;i++) 
    for(let j=0;j<GRID_SIZE;) {
      if(i%2!=j%2) {let x=i*CELL_SIZE,y=j*CELL_SIZE;ctx.strokeRect(x+.5,y+.5,CELL_SIZE-1,CELL_SIZE-1)}
      j++;
    }
  function d(x,y,c) {if(c>grid.length-1||c<0||y<0||y>=GRID_SIZE||x<0||x>=GRID_SIZE||grid[y][x]===undefined||gr …

Excerpt — the full answer is on the round page.

▶ R123 · Breadth-first flood fill spreading through a region Open round →
```html
<!DOCTYPE html>
<html><body style="background:#111;margin:0;display:flex;flex-direction:column;align-items:center;">
<canvas id=c width=600 height=400></canvas>
<div id=s>Step: 0</div>
<div id=f>Filled: 0</div>
<style>canvas{border:solid #fff 1px;margin:20px}</style>
<script>
const c=document.getElementById('c'),s=document.getElementById('s'),f=document.getElementById('f');
const ctx=c.getContext('2d');let w=600,h=400,sx=500,cellSize=Math.floor(Math.min(w/149,h/83));
const grid=Array(149).fill().map(_=>Array(83).fill()),queue=[],dist=new Map(),currentCellIndex=-1,totalCells=0;
function createGrid(){totalCells=0;grid.forEach(row=>row.fill(0));for(let y=0;y<83;y++)for(let x=0;x<149;x++)grid[y][x]=Math.random()<.2?1:0;}
function getNextCell(y,x){const dirs=[[0,1],[0,-1],[1,0],[-1,0];return dirs[Math.floor(Math.random()*dirs.length)];}
function getNewSeed(){let y=Math.floor(Math.rand …

Excerpt — the full answer is on the round page.

▶ R124 · Dijkstra's shortest path over weighted terrain Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden;background:#1a1a1a;">
<canvas id=c></canvas>
<div id=d style="position:absolute;top:0;left:0;color:white;font-family:sans-serif;font-size:14px;line-height:20px;">Path Cost: 0 • Cells Settled: 0</div>
<script>
const c=document.getElementById('c'),d=document.getElementById('d'),w=30,h=30,s=w*20,t=s/2;
let ctx=c.getContext('2d');
ctx.canvas.width=h*40;ctx.canvas.height=w*40;
let grid=[],openSet=[],closedSet=new Set,cameFrom={},gScore={},fScore={},showPath=false,pathCost=0,settleCount=0;

function init(){grid=[];for(let y=0;y<20;y++)grid[y]=[];for(let y=0;y<20;y++)for(let x=0;x<20;x++)grid[y][x]=Math.floor(Math.random()*10)+1;setSourceTarget();}

function setSourceTarget(){let sX=Math.floor(Math.random()*20),sY=Math.floor(Math.random()*20);let tX=Math.floor(Math.random()*20),tY=Math.floor(Math.random()*20);source={x:sX,y:sY} …

Excerpt — the full answer is on the round page.

▶ R125 · Voronoi diagram growing by multi-source flood fill Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;padding:0;overflow:hidden;">
<canvas id=c></canvas>
<div id=stats>Cells: 0</div>
<script>
let c=document.getElementById('c'), ctx=c.getContext('2d');
let cellSize=15,gridWidth=Math.floor(c.width=800/cellSize),gridHeight=Math.floor(c.height=600/cellSize);
let seeds=[],colors=['#ff0000','#00ff00','#0000ff','#ffff00','#ff00ff','#00ffff','#f0f000','#00f0f0'];
function init(){seeds.length=0;gridWidth&&(gridWidth=800/cellSize|0,gridHeight=600/cellSize|0);
let w=gridWidth,h=gridHeight,n=w*h;for(let i=0;i<15;++i){let x=Math.random()*w|0,y=Math.random()*h|0;
if(!seeds[x+y*w])seeds.push({x,y,color:colors[i%colors.length],queue:[{nx:x,ny:y}]});
}
for(let i=0;i<w*h;++i)grid[i]=undefined;let stats=document.getElementById('stats');
return function animate(){requestAnimationFrame(animate);draw();if(!running){start();}
}(function start(){let done=false …

Excerpt — the full answer is on the round page.

▶ R126 · Bubble sort sweeping bars into order Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;display:flex;flex-direction:column;align-items:center;background:#1a1a1a;">
<canvas id=c width=100% height=200></canvas>
<div id=d style="color:white;font-size:16px;margin-top:5px;">Comparisons: 0</div>

<script>
let c=document.getElementById('c'), ctx=c.getContext('2d'), bars=[],n=80,w=n*4,h=45,a,i,x,y,z,comp=0,s=0;
function init(){for(i=0;i<n;bars.push(Math.random()*h))}init();
function drawBar(x,y,w,h,c){ctx.fillStyle=c;ctx.fillRect(x,y,w,h)}
function draw(){for(i=0;i<n-1-s;bars[i]>(bars[i+1])&&(swapBars(i,i+1))){comp++;document.getElementById('d').textContent='Comparisons: '+comp}}
function swapBars(a,b){let x0=i*4,y0=0,x1=(i+1)*4;while(y0<h/2){requestAnimationFrame(_=>{ctx.clearRect(0,0,c.width,c.height);draw();})}}
animate();

</script>
</body></html>
```
▶ R127 · Quicksort partitioning around glowing pivots Open round →
```html
<!DOCTYPE html>
<html><head><canvas id=c style="border:1px solid black"></canvas><div id=s>Swaps: 0</div></head>
<body>
<script>
const c=document.c,t=c.getContext('2d'),s=document.getElementById('s');
let w=80,h=480,swaps=0,r=[];t.fillStyle='white';c.width=w*16;c.height=h;

function qsort(a,l,r,f){
if(l<r){
if(!f)for(let i=l+1;i<r;++i){qsort([].concat(a),l,i,true);break;}
let v=a[l],x=l,y=r,c=0;
while(x<y){
while(x++<y&&a[x]>v){}
while(y-->l&&a[y]>v){}
if(x<y)swap(a,x,y,++swaps);
[qsort(a,l,x-1,false),qsort(a,x+1,r,false)]}
}

function draw(a){
t.fillStyle='rgba(255,255,255,0.3)';
for(let i=0;i<w;++i)t.fillRect(i*16,h - a[i],14,a[i]);
t.fillStyle='black';s.textContent=`Swaps: ${swaps}`;
}

function animate(l,r){
if(!r)r=w-1;
const step=()=>requestAnimationFrame(()=>{
qsort(r=>r([...r]).slice(),l,r,true);
draw(r);
animate(l,r);
});
if(l<r){
let mid=l+Math.floor((r-l)/2);
t.fillSty …

Excerpt — the full answer is on the round page.

▶ R128 · Merge sort weaving runs together Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;padding:0;overflow:hidden;background:#1a1a1a;">
<canvas id=c width=800 height=400></canvas>
<div id=i style="position:absolute;top:5px;left:5px;color:white;font-family:Arial;">Pass 0, Run Length 1</div>
<script>
let c=document.getElementById('c'), ctx=c.getContext('2d'),i=document.getElementById('i');
let w=800,h=400,n=80,a=[...Array(n)].map(_=>Math.random()*h/5),copy=[...a],colors=[];
let state={pass:0,len:1,left:0,right:n-1,mergePos:0,currentPos:0};
function drawBar(x,y,w,h,c){ctx.fillStyle=c;ctx.fillRect(x,y,w,h);}
function mergeSort(){
  if(state.pass>n/2){
    a=copy=[...a].sort((a,b)=>a-b);return;
  }
  let pass=state.pass, len=state.len, left=state.left,right=state.right;
  if(pass==0){colors=[];for(let k=0;k<n;k++)colors.push(`hsl(${k*360/n},100%,50%)`);}
  function animate(){
    if(state.mergePos>=n||a[state.mergePos]==a[state …

Excerpt — the full answer is on the round page.

▶ R129 · Heap sort sifting the maximum to the back Open round →
```html
<!DOCTYPE html>
<html><body style="background:#000;margin:0;display:flex;justify-content:center;height:100vh">
<canvas id=c width=800 height=240></canvas>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d'); 
let h=[],n=80,a=Array.from({length:n},()=>Math.random()*256|0),s=0,step=0,timer;
function draw(){for(let i=0;i<n;i++)ctx.fillStyle=`rgba(160,${i<step?32:0},${i<step?32:0})`,ctx.fillRect(i*9+3, h[i],5,h[n-1]);}
function swap(i,j){let t=h[i];h[i]=h[j];h[j]=t;if(step){draw();requestAnimationFrame(_=>swapDone(i,j));}else draw();}
function swapDone(i,j){step++;document.getElementById('c').style.color='white';ctx.fillStyle=`rgba(255,0,0,.3)`;draw();console.log(step);}
function heapify(n,i){{let j=i,l=2*i+1>r=n-1?n-1:r,l=r;if(j>l)swapDone(i,j);else if(h[j]<h[l])swap(j,l),j=l,l=2*l+1>r?r:l;}}
function animateHeapify(){{if(step < n)swap(step,0),step++;}else{animateE …

Excerpt — the full answer is on the round page.

▶ R130 · Radix sort ordering by one digit at a time Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;display:flex;justify-content:center;align-items:center;height:100vh;background:#f0f0f0;">
<canvas id=c width=700 height=400></canvas>
<script>
const canvas = document.getElementById('c'), ctx = canvas.getContext('2d');
const numbers = Array(80).fill().map(() => Math.floor(Math.random() * 10000)), 
digits = [[],[],[],[]], maxDigit = 9, color = ['#00f', '#f00','#ff0','#0f0','#00f','#f0f','#ff0','#0ff','#000','#fff'];
let pass = 0, currentDigit = 0, digitPosition = [1,10,100,1000], pos = Array(80).fill().map(() => (Math.random() * (canvas.width - 80) + 4));
  
function draw() {
 ctx.clearRect(0,0,canvas.width,canvas.height);
 for(let i=0;i<numbers.length;i++) {
  const x = pos[i], barWidth = 6;
  ctx.fillStyle = 'white'; 
  ctx.fillRect(x-1,0,2,canvas.height); // left border
  ctx.fillRect(x + barWidth + 3,0,2,canvas.height); // right bord …

Excerpt — the full answer is on the round page.

▶ R131 · Weekday riddle from two clues Open round →
**Answer:** Today is Sunday. 

Justification: The statement indicates the day after tomorrow is two days before Thursday, which is Tuesday. Counting back from Tuesday, two days prior would land on Sunday as today.
▶ R132 · Fermi estimate: a lifetime of drinking water Open round →
To estimate the total liters of water an average adult drinks in a lifetime:

1. Assume daily drinking water intake is about 2 liters.
2. Average life expectancy is approximately 80 years.
3. Calculate days: 80 years × 365 = 29,200 days.
4. Multiply by daily intake: 2 L/day × 29,200 days ≈ 58,400 liters.

Answer:
\boxed{58,\!400}
▶ R133 · Three friends, three pets Open round →
Ana owns the parrot because she is allergic to fur, ruling out cats and dogs. Ben cannot have a flying pet, so he must own the cat. Therefore, Cleo owns the dog, satisfying all given conditions.

**Answer:**

- Ana owns the parrot.
- Ben owns the cat.
- Cleo owns the dog.
▶ R134 · Smallest number from three remainders Open round →
To find the smallest positive integer that satisfies the following conditions:

\[
\begin{cases}
n \equiv 1 \pmod{3} \\
n \equiv 2 \pmod{5} \\
n \equiv 3 \pmod{7}
\end{cases}
\]

**Step-by-Step Solution:**

1. **List Numbers Satisfying Each Condition Individually:**
   - **Condition 1:** \( n \equiv 1 \pmod{3} \)
     Possible values: 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, ...
   
   - **Condition 2:** \( n \equiv 2 \pmod{5} \)
     Possible values: 2, 7, 12, 17, 22, 27, 32, 37, ...

   - **Condition 3:** \( n \equiv 3 \pmod{7} \)
     Possible values: 3, 10, 17, 24, 31, 38, 45, ...

2. **Find Common Values in Conditions 1 and 2:**
   - Compare the lists from Condition 1 and Condition 2.
   - The common value is **7**.

3. **Check if This Value Satisfies Condition 3:**
   - \( 7 \div 7 = 1 \) with a remainder of **0**, which does not satisfy \( n \equiv 3 \pmod{7} \).

4. **Continue Findin …

Excerpt — the full answer is on the round page.

▶ R135 · Conditional dice probability Open round →
To determine the probability that two fair six-sided dice sum to \(9\) given that at least one die shows a \(4\), follow these steps:

1. **Identify Total Possible Outcomes with At Least One 4:**
   
   When rolling two dice, there are \(6 \times 6 = 36\) possible outcomes.
   
   - The number of outcomes where the first die is \(4\) (regardless of the second die) is \(6\).
   - Similarly, the number of outcomes where the second die is \(4\) is also \(6\).
   - However, the outcome where both dice are \(4\) is counted twice in the above counts. To correct for this:
     
     \[
     \text{Total outcomes with at least one } 4 = 6 + 6 - 1 = 11
     \]

2. **Determine Favorable Outcomes (Sum to 9):**
   
   We need pairs \((a, b)\) such that \(a + b = 9\) and at least one of \(a\) or \(b\) is \(4\).
   
   - The possible pairs are:
     \[
     (4, 5) \quad \text{and} \quad (5, 4)
     \] …

Excerpt — the full answer is on the round page.

▶ R136 · Double pendulum tracing a chaotic path Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;background:#000;">
<canvas id=c></canvas>
<div id=t style="position:absolute;top:10px;left:10px;color:white;font-family:Arial;">Time: 0.00s</div>

<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
const tEl=document.getElementById('t');

let w=c.width=window.innerWidth,h=c.height=window.innerHeight;

let m1=1,m2=2,l1=150,l2=150,x1=l1,y1=0,x2=x1+l1,y2=y1;
let theta1=Math.random()*(Math.PI/2),theta2=randomAngle(),d_theta1=0,d_theta2=0;
let trail=[],trailLen=30,timer=0;

function randomAngle(){return Math.random()*(Math.PI/3)-Math.PI/6}

function RK4(theta1,d_theta1,theta2,d_theta2){
    const k1_theta1=d_theta1,k1_dtheta1=(-g*(m2+m1)*Math.sin(theta1) - m2*g*Math.sin(theta1-Math.PI*2) + (m2*d_theta1**2)*Math.cos(theta1-Math.PI*2))/L;
    const k1_theta2=d_theta2,k1_dtheta2=((m2*g*(Math.sin(theta1)+Math.sin(theta1-Math. …

Excerpt — the full answer is on the round page.

▶ R137 · Cloth mesh hanging and rippling in the wind Open round →
```html
<!DOCTYPE html>
<html><head style="display:flex;justify-content:center;align-items:center;height:100vh;margin:0;">
<canvas id=c></canvas>
<div id=w>Wind: 0</div>

<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');

let width = canvas.width, height = canvas.height;
let points = [], constraints = [];
let wind = 0.1, time = 0;

const setup = () => {
    const cols = 15, rows = 10;
    let cellWidth = width / (cols - 1), cellHeight = height / (rows - 1);
    
    points = Array.from({length: cols * rows}, (_, i) => ({
        x: i % cols * cellWidth + (i < cols ? Math.sin(i) * 50 : 0),
        y: Math.floor(i / cols) * cellHeight,
        vx: 0, vy: 0,
        pinned: i < cols,
        constraints: []
    }));
    
    // Create constraints
    for(let i = 0; i < points.length; i++) {
        let point = points[i];
        
        // Orthogona …

Excerpt — the full answer is on the round page.

▶ R138 · Two-source wave interference pattern Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;display:flex;justify-content:center;align-items:center;background:#000;">
<canvas id="c" width="800" height="600"></canvas>
<div id="d"></div>
<script>
const canvas = document.getElementById('c'), ctx = canvas.getContext('2d');
const sources = [[400,300],[410,300]], separation = {value:10,min:5,max:300};
let phase = 0;
function draw() {
    ctx.fillStyle = 'rgb(0,0,20)';
    ctx.fillRect(0,0,canvas.width,canvas.height);
    const sep = separation.value;
    const dx = (sep/2), dy = 0;
    const midX = canvas.width/2;
    for(let y=0;y<canvas.height;++y) {
        const sy = y - sources[0][1];
        for(let x=0;x<canvas.width;++x) {
            const sx = x - sources[0][0];
            const d1 = Math.sqrt(sx*sx + sy*sy);
            const dx2 = sep/2;
            const x2 = midX + dx2;
            const sx2 = (x - x2);
            con …

Excerpt — the full answer is on the round page.

▶ R139 · Small n-body system orbiting a central star Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden;background:black;">
<canvas id=c width=800 height=600></canvas>
<script>
const c=document.getElementById('c'),ctx=c.getContext('2d');
const b=64,w=800,h=600,s=(w+b)/2,t=s-h/2;
let stars=Array(7).fill().map(i=>({
  m:1, x:i<1? w/2 : Math.random()*(w-b*0.9)+b*0.05,
  y:i<1? h/2 : Math.random()*(h-b*0.9)+b*0.05,
  vx:Math.random()*0.3,vy:i<1?0:-(i>1?0.008:i>4?0.01:i<6?-0.01:0),
  ax:0,ay:0,tail:[]
}));

stars.forEach(i=>{
  if(i.x<s±b/2 && i.y<t±b/2)i.m=9
});

function force(p,q){
  const dx=p.x-q.x, dy=p.y-q.y,d=Math.sqrt(dx*dx+dy*dy);
  const f=G*p.m*q.m/d²;
  q.ax +=f*dx/(d*(q.m)), q.ay +=f*dy/(d*(q.m));
  p.ax -=f*dx/(d*(p.m)), p.ay -=f*dy/(d*(p.m));
}

const G=0.2;

function update(){
  for(let i=0;i<stars.length;i++){
    const s1=stars[i],s2=stars[j];
    if(i<j)force(s1,s2);
  }
  stars.forEach(p=>{
    p.x +=p.vx, …

Excerpt — the full answer is on the round page.

▶ R140 · Water sloshing in a tilting container Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden;">
<canvas id=c></canvas>
<div id=a style="position:absolute;top:10;left:10;color:white;"></div>
<script>
let c=document.getElementById('c'), ctx=c.getContext('2d');
let w=600,h=400,c.width=w,c.height=h;
class Water{
  constructor(n){
    this.particles=[];this.forces={x:0,y:0};
    for(let i=0;i<n;i++){
      let p={
        x:Math.random()*(w/2),
        y:Math.random()*(h/2),
        vx:0,
        vy:0,
        ax:0,
        ay:0,
        r:1.5
      };
      this.particles.push(p);
    }
  }
  update(t){
    let particles=this.particles;
    for(let i=0;i<particles.length;i++){
      let p=particles[i];
      let fx=p.ax;let fy=p.ay;
      // Apply forces and gravity
      for(let j=i+1;j<particles.length;j++) {
        let q=particles[j];
        let dx=p.x-q.x, dy=p.y-q.y,d=Math.sqrt(dx*dx+dy*dy);
        if(d>0){ …

Excerpt — the full answer is on the round page.

▶ R141 · Idiom-dense German into natural English Open round →
That was a major blunder — now we're stuck with no easy way out, but giving up isn't an option.
▶ R142 · Register shift: casual complaint into formal Open round →
Subject: Formal Complaint Regarding Defective Blender  

Dear [Customer Service Team],  

I am writing to formally complain about the blender I received from your company, ordered on [order number]. Unfortunately, the product failed within just two days of use and even produced sparks, rendering it completely unusable. Given this issue, I kindly request either a full refund or a replacement unit as soon as possible.  

I appreciate your prompt attention to this matter.  

Sincerely,  
[Your Name]
▶ R143 · Bureaucratic German into plain English Open round →
You must submit a fully completed application on time; otherwise, you lose your right to the benefit.
▶ R144 · English apology into idiomatic Sie-German Open round →
Auf diesen Fall haben wir den Ball verloren – ohne drum herumzureden. Doch werden wir es in Ordnung bringen, und es wird Ihnen keinen Cent kosten.
▶ R145 · False-friend minefield German into English Open round →
We may have to reschedule the current meeting; it's a sensitive topic, and I don't want any venom spread.
▶ R146 · Repair broken JSON (4 precise errors) Open round →
{
  "name": "Alex Weber",
  "age": 34,
  "email": "alex@example.com",
  "active": true,
  "tags": ["admin", "beta"],
  "signupYear": 2024,
  "address": {
    "street": "Hauptstr. 5",
    "city": "Berlin",
    "zip": "10115",
    "country": "Germany"
  }
}
▶ R147 · CSV with embedded comma to JSON array Open round →
[
  {
    "id": 1,
    "name": "Anna Berg",
    "notes": "Prefers email, not phone",
    "amount": 120.50
  },
  {
    "id": 2,
    "name": "Tom Klein",
    "notes": "Standard customer",
    "amount": 75.00
  },
  {
    "id": 3,
    "name": "Lena Fuchs",
    "notes": "Called twice, resolved",
    "amount": 200.00
  },
  {
    "id": 4,
    "name": "Max Otto",
    "notes": "VIP customer",
    "amount": 50.00
  }
]
▶ R148 · Table QA: sum, filter, max over order data Open round →
1. The total revenue for shipped orders is calculated by summing up the products of Qty and Price for each "shipped" status entry. 

   - Order 1001: 2 * 19.99 = 39.98
   - Order 1003: 1 * 19.99 = 19.99
   - Order 1004: 1 * 149.00 = 149.00
   - Order 1006: 5 * 6.50 = 32.50

   Adding these together: 39.98 + 19.99 + 149.00 + 32.50 = 241.47.

2. To find the OrderIDs for "Mueller" customers, we look at all entries where Customer is Mueller:

   - Order 1001
   - Order 1003
   - Order 1006

3. The order with the highest total value is determined by calculating Qty * Price for each order and identifying the maximum:

   - Order 1001: 2 * 19.99 = 39.98
   - Order 1002: 1 * 89.50 = 89.50
   - Order 1003: 1 * 19.99 = 19.99
   - Order 1004: 1 * 149.00 = 149.00
   - Order 1005: 3 * 89.50 = 268.50
   - Order 1006: 5 * 6.50 = 32.50

   The highest value is 268.50 from Order 1005.

**Answers:**

1. $ …

Excerpt — the full answer is on the round page.

▶ R149 · Extract meeting invite into a fixed JSON schema Open round →
{
  "title": "Q3 Roadmap Kickoff",
  "date": "2026-08-18",
  "time": "10:30",
  "location": "Conference Room B, Berlin office (3rd floor)",
  "attendees": ["Sarah", "Tom", "Priya"]
}
▶ R150 · Diff two near-identical config blocks Open round →
timeout: 30 -> 45  
debug: false -> true  
max_connections: 100 -> 150
▶ R151 · Binary search tree growing node by node Open round →
```html
<!DOCTYPE html>
<html><body style="background:#000;margin:0;display:flex;flex-direction:column;align-items:center">
<canvas id=c width=800 height=600></canvas>
<div id=count style="color:#fff">Nodes: 0</div>
<script>
function TreeCanvas(cElement) {
    let canvas = cElement;
    let ctx = canvas.getContext('2d');
    let nodes = [];
    let nodeCount = 0;
    let animationId;
    let maxVal=15;
    
    function Node(v) {
        this.v = v; this.left=null;this.right=null;
        this.x=null; this.y=null; this.width=40;
    }
    
    Node.prototype.draw = function() {
        ctx.beginPath();
        ctx.arc(this.x, this.y, 20, 0, Math.PI*2);
        ctx.fillStyle='#fff';ctx.fill();
        ctx.strokeStyle='#000';ctx.stroke();
        
        if(this.v>9) ctx.font='15px Arial'; else ctx.font='20px Arial';
        ctx.fillStyle='#000';ctx.textAlign='center'; 
        ctx.fillTe …

Excerpt — the full answer is on the round page.

▶ R152 · Hash table with visible collision chains Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;display:flex;justify-content:center;align-items:center;height:100vh;background:#f0f0f0;">
<canvas id="c"></canvas>
<div id="lf" style="position:absolute;top:20;left:20;font-family:'Arial';font-size:14px;"></div>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
const lfElement = document.getElementById('lf');

canvas.width = 800;
canvas.height = 600;

let buckets = Array.from({length:12},()=>({
  height:0,
  color:'green',
  keys:[]
}));

let totalKeys =0;
let keyCount=0;
let needsReset=false;

function drawBucket(x, bucket){
  ctx.strokeStyle = 'black';
  ctx.lineWidth =3;
  ctx.strokeRect(x-4,bucket.height/2,8,canvas.height/3);
}

function drawKey(bucket, i){
  const y = canvas.height/3 + (bucket.keys.length -1 -i)*15;
  const x = bucket.x;
  ctx.fillStyle='white';
  ctx.fillRect(x-4,y+4,16,12) …

Excerpt — the full answer is on the round page.

▶ R153 · Binary min-heap with bubble-up and sink-down Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden;">
<canvas id="c"></canvas>
<div id="s" style="position:absolute;top:10;left:10;"></div>
<script>
const c=document.getElementById('c'),s=document.getElementById('s');
const w=c.width=800,h=c.height=600;
let heap=[],heapSize=0,nOperations=0;

class Node{
  constructor(v,p){
    this.v=v;this.p=p;this.c=[];this.s=15;
    this.x=0,this.y=0;
    this highlighted=false;
    this.parent=null;
    this.children=[];
  }
}

class BinaryMinHeap{
  constructor(){this.nodes=[]}
  
  insert(v){
    let node=new Node(v,null);
    if(heap.length===0){heap.push(node);node.x=w/2;node.y=50;node.parent=null;}
    else{let i=heap.length;p=i>1?(i-1)/2 :0;
      while(i>p && (heap[p].v > v || (heap[p].v==v && p<i))){i=p;p=(p-1)/2 |0}
      node=new Node(v,heap[p]);node.parent=heap[p];node.x=node.p.x + (Math.random()*30>15 ? 40 : -40);node.y=n …

Excerpt — the full answer is on the round page.

▶ R154 · Ring buffer with producer and consumer at different rates Open round →
```html
<!DOCTYPE html>
<html><body style="display:flex;justify-content:center;align-items:center;margin:0;height:100vh;background:#202020;">
<canvas id=c></canvas>
<div id=stats></div>
<script>
function main() {
    const canvas = document.getElementById('c');
    const ctx = canvas.getContext('2d');
    const stats = document.getElementById('stats');

    let width, height, radius;
    let totalSlots = 16;
    let producerSpeed = 0.03;
    let consumerSpeed = 0.02;
    let producerPointer = 0;
    let consumerPointer = 0;
    let filledCount = 0;
    let gameOver = false;

    function init() {
        width = canvas.width = window.innerWidth > 500 ? 400 : 300;
        height = canvas.height = width;
        radius = Math.min(width, height) / 2 - 10;
        
        producerSpeed = (Math.random() * 0.05 + 0.02).toFixed(3);
        consumerSpeed = (Math.random() * 0.04 + 0.01).toFixed( …

Excerpt — the full answer is on the round page.

▶ R155 · Linked list with animated pointer relinking Open round →
```html
<!DOCTYPE html>
<html><body style="background:#111;color:#fff; display:flex; flex-direction:column; align-items:center;gap:20px;margin:0;padding:0;">
<canvas id=c width=800 height=400></canvas>
<div id=l>Length: 0</div>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d'), list=[], lenElement=document.getElementById('l');
let width=800, height=400, nodeRadius=35, arrowWidth=15, nodeList=[], currentX=50;
function Node(v) { this.value=v; this.next=null; this.x=this.y=0; }
function init() {
  list.length=0;
  nodeList=[];
  currentX=50;
}
function createNode() { return new Node(Math.floor(Math.random()*10)+1); }
function drawList() {
  function drawArrow(x,y,x2,y2) {
    ctx.beginPath();
    ctx.moveTo(x,y);
    ctx.lineTo(x2,y2);
    ctx.strokeStyle='#fff';
    ctx.lineWidth=arrowWidth;
    ctx.stroke();
  }
  function drawNode(x,y, highlighted=false) {
    ctx.beg …

Excerpt — the full answer is on the round page.

▶ R156 · Invent 3 product names + taglines for a fictional object (no superlatives) Open round →
1. SnackSaver — Keeps your snacks fresh and standing tall.  
2. SealRight — Snack time, no mess—keeps the air out, flavor in.  
3. ClipGuard — Hold onto freshness, one easy clip at a time.
▶ R157 · Rewrite the same product text for two different audiences, facts unchanged Open round →
(a) Teenagers:  
The AquaGlow bottle is perfect for staying hydrated on the go! It holds 750 ml and keeps your drink cold for an impressive 12 hours. Made with BPA-free plastic, it’s safe and eco-friendly. Plus, it has a built-in straw for easy sipping. The bottle is dishwasher-safe, so cleaning it is a breeze, and it comes in 4 cool colors to match your style.

(b) Seniors:  
The AquaGlow bottle is a practical choice for keeping drinks fresh and cold for up to 12 hours. Constructed from BPA-free plastic, it’s both safe and durable. It features a built-in straw for convenient drinking and is dishwasher-safe, making cleanup easy. Available in four colors, it offers a variety of options to suit your preferences.
▶ R158 · 5 email subject lines under 50 chars, no clickbait, no ALL-CAPS Open round →
1. "20% Off Winter Jackets (Nov 1-15)"  
2. "Help Us Improve: Share Your Feedback on Our Mobile App"  
3. "Free Returns Now Available for 60 Days"  
4. "20% Off Winter Jackets + Free Returns"  
5. "Share Your Feedback & Enjoy Free Returns"
▶ R159 · Micro-story: exactly 50 words (±5) with 3 mandatory elements Open round →
The rain poured as she ran for the station, clutching her red umbrella. She missed the train by seconds, breathless and soaked. Retreating to a nearby shelter, she spotted a worn book titled *Lighthouse*. As she read, its pages glowed like distant beacons, guiding her through the endless storm outside.
▶ R160 · Critique a generic slogan in 2 sentences + give 2 better alternatives Open round →
**Critique:**  
The slogan "Quality You Can Trust" is generic and doesn't reflect the unique features of solar-powered chargers for hikers and campers, lacking specifics about outdoor reliability or performance.

**Alternative Slogans:**
1. "Power Through Any Adventure."
2. "Stay Charged, Stay Wild."
▶ R161 · Selection sort vs shell sort racing side by side Open round →
```html
<!DOCTYPE html>
<html><head><style>canvas{border:1px solid #ccc}div{display:flex;justify-content:center;margin:20px}</style></head><body><canvas id="a"></canvas><canvas id="b"></canvas><script>
const w=600,h=400,c_gap=30,s_gap=30,barWidth=15;let dataA,dataB,sorts=[null,null],counters=[0,0];function init(){dataA=dataB=Array.from({length:30},()=>Math.random()*h);draw();}function draw(){const ctxA=document.getElementById('a').getContext('2d'),ctxB=document.getElementById('b').getContext('2d');function drawBars(ctx,data,prefixLength,gap){ctx.clearRect(0,0,w,h);for(let i=0;i<30;i++){let x=i*(w+barWidth)+15,y=h-(data[i]*h/4);if(i<prefixLength)y+=20;else if(gap&&(i%gap==Math.abs(s_gap-1)))y+=h/8;ctx.fillStyle=i==s_gap?'#ff7777':i==s_gap+1||i==e_gap?'#7777ff':i==minIndex?'#ffaaaa':i==currentCompare?'#aaafaa':'#555';ctx.fillRect(x,y,barWidth,h/4);}}let s_gap=30;function selectionSort(a,cb …

Excerpt — the full answer is on the round page.

▶ R162 · Breadth-first search flooding a random grid maze Open round →
```html
<!DOCTYPE html>
<html><head><style>canvas{border:1px solid #333}#c{position:absolute;left:0;top:0;width:99vw;height:98vh}.info{position:fixed;bottom:5px;left:5px;color:#fff;font-family:sans-serif}</style></head>
<body><canvas id="c"></canvas><div id="info" class="info"><span id="count">0</span></div>

<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
const info = document.getElementById('info');

let size, w=20, h=15;
let grid = [];
let q = [], visited = new Set();
let countEl = document.getElementById('count');
let solving = false;

class Cell {
  constructor(i,j) {this.i=i,this.j=j,this.wall=false,this.dist=null;}
}

function setupCanvas() {
  size = Math.min(window.innerWidth*.9, window.innerHeight*.8);
  canvas.width = w*size;
  canvas.height = h*size;
}

function initGrid(w,h) {
  grid = [];
  for(let y=0;y<h;++y) {
    grid[y] = []; …

Excerpt — the full answer is on the round page.

▶ R163 · Prim's algorithm growing a minimum spanning tree Open round →
```html
<!DOCTYPE html>
<html>
<body style="background:#000;margin:0;display:flex;flex-direction:column;align-items:center;height:100vh">
<canvas id="g" width=600 height=400></canvas>
<canvas id="l" width=600 height=100 style="margin-top:10"></canvas>
<script>
const canvas = document.getElementById('g'), ctx = canvas.getContext('2d');
const lineCanvas = document.getElementById('l'), lCtx = lineCanvas.getContext('2d');
let nodes = Array(30).fill().map(_=>({x:Math.random()*600, y:Math.random()*400, color:'#fff', visited:false}));
let edges = [[]], pq=[], mst=[], total=0;
let n=nodes.length, count=0, avg=0;

function draw() {
 ctx.clearRect(0,0,600,400);
 lineCanvas.width = 600;
 
 // Draw nodes
 nodes.forEach(n=>{
  ctx.beginPath();
  ctx.arc(n.x, n.y, 3, 0, Math.PI*2);
  ctx.fillStyle = n.color;
  ctx.fill();
 });
 
 // Draw edges
 for(let i=0;i<edges.length;i++) {
  edges[i].forEach(e => …

Excerpt — the full answer is on the round page.

▶ R164 · Boids flocking with separation, alignment, cohesion and a predator Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;padding:0;overflow:hidden;background-color:black;">
<canvas id=c></canvas>
<div id=i style="position:absolute;top:10px;left:10px;color:white;font-family:Arial;">Boids: <span id=n>60</span></div>

<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let width = canvas.width, height = canvas.height;

class Boid {
  constructor() {
    this.x = Math.random()*width;
    this.y = Math.random()*height;
    this.vx = (Math.random()-0.5)*4;
    this.vy = (Math.random()-0.5)*4;
    this.color = `hsl(${Math.random()*360}, 100%, 75%)`;
  }
}

class Predator {
  constructor() {
    this.x = width/2;
    this.y = height/2;
    this.radius = 20;
    this.speed = 2;
    this.direction = Math.random()*Math.PI*2;
    this.wanderAngle = 0;
  }

  move() {
    this.direction += (Math.sin(this.wanderAngle) * 0.1); …

Excerpt — the full answer is on the round page.

▶ R165 · Recursive backtracker carving a maze, then solving it Open round →
```html
<!DOCTYPE html>
<html><body style="background:#000;margin:0;display:flex;flex-direction:column;align-items:center">
<canvas id=c></canvas>
<div id=counters style="color:white;font-family:sans-serif;font-size:12px">Carved: <span id=carve>0</span> | Solved: <span id=solve>0</span></div>

<script>
const c=document.getElementById('c'),ctx=c.getContext('2d');
const w=25,h=18,cellSize=24;
c.width=w*cellSize;c.height=h*cellSize;

let grid=[],carveCount=0,solveCount=0,currentPath=[],solveStarted=false,solution=null;

function createGrid() {
  for(let y=0;y<h;y++)grid[y]=new Array(w).fill().map(()=>'1111');
}

function getNeighbors(x,y,visited) {
  let neighbors=[];
  const dirs=[[1,0],[0,1],[-1,0],[0,-1]];
  for(let [dx,dy] of dirs) {
    let nx=x+dx,ny=y+dy;
    if(nx>=0&&nx<w&&ny>=0&&ny<h&&!visited[ny][nx]) 
      neighbors.push({x:ny,y:nx});
  }
  return neighbors;
}

function carveMa …

Excerpt — the full answer is on the round page.

▶ R166 · Faithful 3-sentence summary of a chaotic meeting transcript Open round →
The team decided to move the weekly status update from Fridays to Mondays starting next week. Priya will implement her new ticket labeling system with five labels by Wednesday, updating the shared guide. Tom will send out the updated calendar invite reflecting the time change by Friday.
▶ R167 · One-sentence TL;DR under 25 words Open round →
"Breaking change: /v1/reports API shutdown by September 30, 2026."
▶ R168 · Extract action items as a checklist Open round →
1. Maria -- finalize new homepage copy and send to Ben for review -- by this Thursday  
2. Ben -- review new homepage copy and provide feedback -- by Friday  
3. Chen -- fix broken contact form bug -- by Monday  
4. Maria -- chase client about confirming new logo colors -- today (no due date specified)  
5. Ben -- send updated privacy policy text to legal for review -- by next Wednesday
▶ R169 · Neutral summary of a biased product rant Open round →
The blender has three main issues: the jug leaks liquid past the halfway mark when filled, the 10-speed dial does not function as intended with speeds 4-7 being identical, and the motor overheats and shuts off after about 90 seconds of continuous blending.
▶ R170 · Compress a how-to into exactly 5 numbered steps Open round →
1. Mix 100g whole wheat flour + 100g water (~21°C) in a jar; cover loosely and let sit 24h.  
2. Discard half the mixture; add another 100g flour + 100g water; let sit 24h.  
3. Repeat discard-and-feed process daily for ~5 days.  
4. Feed starter; check if it doubles in size within 4-6h.  
5. Once active, use for baking!
▶ R171 · Fireworks bursting into fading sparks Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;padding:0;">
<canvas id="c"></canvas><div id="count">0</div>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
const countEl = document.getElementById('count');

let width, height;
function resize() {
  width = window.innerWidth; height = window.innerHeight;
  canvas.width = width; canvas.height = height;
}
window.addEventListener('resize', resize); resize();

class Particle {
  constructor(x, y, color) { this.x=x; this.y=y; this.color=color; }
}

class Rocket extends Particle {
  constructor(x, y) {
    super(x, y, `hsl(${Math.random()*360},100%,50%)`);
    this.v = Math.random() * 8;
    this.gravity = .2;
    this.exploded = false;
    this.tails = [];
  }
  
  update(time) {
    if(!this.exploded) {
      this.y -= this.v; this.v *= (1 - this.gravity);
      const dx = Math.random() * 8 - 4, …

Excerpt — the full answer is on the round page.

▶ R172 · Raindrops sliding down a window pane Open round →
```html
<!DOCTYPE html>
<html><head><style>canvas{position:fixed; top:0;left:0;background:hsla(164,93%,25%,.7);}</style></head>
<body><div id=cnt>0</div><canvas id=c></canvas>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
const cw=c.width=window.innerWidth,vh=window.innerHeight,c.height=vh;
let drops=[],dropCount=0,frame=0;

class Drop{
  constructor(x,y,s){
    this.x=x,this.y=y,this.size=s||Math.random()*5+1;
    this.moving=false,this.vx=0,this.vy=0;
    this.mergeRadius=2;
  }
}

function init(){drops=[];dropCount=0;frame=0;}
function addDrop(){drops.push(new Drop(Math.random()*(cw-40)+20,Math.random()*vh,Math.random()*5+1));}
function updateDrops(){
  const now=Date.now();
  for(let i=drops.length-1;i>=0;i--){
    let d=drops[i];
    if(!d.moving){
      if(d.size<30){d.size+=.2;continue;}
      else{d.moving=true;d.vy=2+(Math.random()*4);d.vx=Math.random()- …

Excerpt — the full answer is on the round page.

▶ R173 · Metaball lava lamp with heating and cooling blobs Open round →
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden;background:black;">
<canvas id=c width=300 height=600></canvas>
<script>
class Blob{
  constructor(x,y,r,v,t){
    this.x=x||Math.random()*299;
    this.y=y||Math.random()*(500-100)+100;
    this.r=r||Math.random()+3;
    this.v=v||{dx:0,dy:0};
    this.t=t||Math.random();
  }
  update(){
    if(this.y>200) this.v.dx+=this.t*0.05;
    else this.v.dy-=0.01;
    this.x +=this.v.dx; this.y +=this.v.dy;
    if(this.x<0||this.x>300||this.y<0||this.y>600){
      let r=2-(Math.abs(this.x-300/2)/300)*2;
      this.v.dx *=.95; this.v.dy *=.95;
      this.x +=this.v.dx*2;this.y +=this.v.dy*2;
    }
  }
}
let c=document.getElementById('c'), ctx=c.getContext('2d');
let blobs=[], grid=Array(40).fill().map(()=>Array(20).fill(0));
function init(){blobs.length=5+Math.random()*3|0; for(let i=blobs.length-1;i>=0;i--)blobs[i]=new Blob();} …

Excerpt — the full answer is on the round page.

▶ R174 · Recursive fractal tree growing branch by branch Open round →
```html
<!DOCTYPE html>
<html><title>Fractal Tree</title>
<head><style>canvas{border:1px solid #000; margin:20% auto;display:block}.count{position:absolute;top:20px;left:20px;color:#333}</style></head>
<body><canvas id=c width=800 height=600></canvas><div class=count>Branches: 0</div>
<script>
const canvas=document.getElementById('c'), ctx=canvas.getContext('2d'),
cWidth=canvas.width,cHeight=canvas.height,centerX=cWidth/2,startY=cHeight-100;
let angleOffset=0,count=0,maxDepth=8;

function fractal(x,y,angle,length,depth){
  if(depth>maxDepth)return;
  let newX=x+length*Math.cos(angle),newY=y+length*Math.sin(angle);
  ctx.beginPath();ctx.moveTo(x,y);ctx.lineTo(newX,newY);ctx.stroke();
  count++;
  if(depth<maxDepth-1){
    let leftAngle=angle+.2*(Math.random()+.5)+Math.sin(angleOffset)/4;
    fractal(newX,newY,leftAngle,length*.7,depth+1);
    let rightAngle=angle-.2*(Math.random()+.5)-Mat …

Excerpt — the full answer is on the round page.

▶ R175 · Noise flowfield painting additive particle trails Open round →
```html
<!DOCTYPE html>
<html><title>Perlin Flowfield Animation</title><style>canvas{position:absolute;}</style>
<body><canvas id="c"></canvas><div id="count">0</div>
<script>
const c=document.getElementById('c'), ctx=c.getContext('2d');
let w=c.width=window.innerWidth,h=c.height=window.innerHeight,particles=[],noise=[[],[]],cnt=0,timer=0,resetTimer=0;

function noise(x,y){return (Math.sin(x)+Math.cos(y)*2)*Math.sqrt(x%1+y%1)}

function init(){particles=[];noise=[[0,...Array(50).fill().map(_=>Math.random())],[...Array(50).fill().map(_=>Math.random())]];for(let i=0;i<500;++i){let x=Math.random()<.5?0:w, y=Math.random()<.5?0:h;x+=x==0?w/2:0;y+=y==0?h/2:0;particles.push({x,y,vx:0,vy:0});}}

function resetFlow(){noise=[[...Array(50).fill().map(_=>Math.sin(Date.now()/1000))],[...Array(50).fill().map(_=>Math.cos(Date.now()/2000))]);}

function animate(){ctx.fillStyle='rgba(0,0,0,.06)';ctx.fill …

Excerpt — the full answer is on the round page.

▶ R176 · Fix exactly the errors, change nothing else Open round →
On Monday morning, the small archive opened its new reading room to local students. The room has six desks, two lamps, and a shelf for returned notebooks. Before the first group arrived, Mara checked the sign-in sheet and placed pencils beside each chair. She noticed that one window was stuck, but the hallway was quiet and the heater worked well. At nine o'clock, twelve students entered the archive, greeted the staff, and began comparing old town maps. Their teacher asked them to write short notes about every map they handled. One student found a drawing of the river bridge, and another matched it to a photograph from 1912. By noon, the class had labeled the boxes, cleaned the tables, and thanked Mara for her help. The visit ended on time, and the archive stayed open for regular visitors after lunch.
▶ R177 · Make the numbers consistent Open round →
Workshop attendance report:

The registration desk recorded 18 participants: 7 from North Hall, 6 from East Studio, and 5 from River Annex. The header currently says 19 participants attended.

The event ran on Wednesday, March 4, 2026, and the same paragraph later calls it Tuesday. The room booking confirmation and the posted schedule both list Wednesday, March 4, 2026.

For the feedback survey, 15 of the 18 participants submitted forms. The draft summary says this equals 72%, but 15 out of 18 is 83% when rounded to the nearest whole percent.
▶ R178 · Remove redundancy without losing facts Open round →
The neighborhood mobile clinic opens on April 8 at Maple Community Center, located on Maple Street. It will operate weekly on Wednesdays from 10 a.m. to 4 p.m., offering free blood pressure checks, vaccinations, and short medical consultations. Appointments can be booked by phone or in person. Spanish and Vietnamese interpreters will be available during clinic hours.
▶ R179 · Unify tense and perspective Open round →
At dawn, I stepped onto the station platform and checked the timetable. I noticed the last train number blinking on the board before the screen went dark. I waited beside the vending machine, keeping an eye on the empty tracks. The loudspeaker crackled, and I heard a short apology for the delay. I walked to the ticket office, where the clerk handed over a paper voucher. I folded the voucher into my notebook and was thinking about the missed connection. I boarded the replacement bus and sat near the back window. As the bus left town, I watched the station lights disappear behind the rain.
▶ R180 · Fix the broken references Open round →
Maintenance note for the demo room:

The tablet is stored in the blue cabinet, and it must be charged before each session.  
The projector was tested after lunch; the projector should remain unplugged overnight.  

Setup steps:  
1. Unlock the cabinet.  
2. Place the tablet on the stand.  
3. Start the room timer.