domain stringclasses 8
values | topic stringclasses 159
values | difficulty stringclasses 3
values | question stringlengths 5 14.3k | solution_trace listlengths 1 29 | answer stringlengths 1 87.4k | verification stringlengths 51 1.69k | common_pitfall stringlengths 82 816 | id stringlengths 16 16 |
|---|---|---|---|---|---|---|---|---|
Artificial Intelligence | Logic Puzzle | easy | A viral video doubles its number of views every hour. If the video hits 1,000,000 views at 8:00 PM, at what time did it have exactly 500,000 views? | [
"## 7:00 PM",
"Since the video **doubles** its views every hour, we can work **backwards** by **halving** the view count each hour:",
"- **8:00 PM** → 1,000,000 views\n- **7:00 PM** → 500,000 views",
"Just one hour earlier, the video had exactly **500,000 views**."
] | ## 7:00 PM
Since the video **doubles** its views every hour, we can work **backwards** by **halving** the view count each hour:
- **8:00 PM** → 1,000,000 views
- **7:00 PM** → 500,000 views
Just one hour earlier, the video had exactly **500,000 views**. | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000701 |
Programming | - | hard | Create a function in assembly language to add two 32-bit signed integers. Additionally, implement error handling to check if the sum of the two integers exceeds the maximum value that can be stored in a 32-bit signed integer. If the sum exceeds the maximum value, return an error code indicating an overflow. Furthermore... | [
"# Branchless 32-Bit Signed Integer Addition with Overflow Detection (x86 IA-32)",
"## Key Design Decisions",
"- **Calling convention:** First operand in `EAX`, second in `EBX`, result/error in `EAX`.\n- **Error code:** `0xFFFFFFFF` (i.e., `-1`) returned on overflow.\n- **No branch instructions** (`jmp`, `je`, ... | # Branchless 32-Bit Signed Integer Addition with Overflow Detection (x86 IA-32)
## Key Design Decisions
- **Calling convention:** First operand in `EAX`, second in `EBX`, result/error in `EAX`.
- **Error code:** `0xFFFFFFFF` (i.e., `-1`) returned on overflow.
- **No branch instructions** (`jmp`, `je`, `jne`, `jg`, `j... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000702 |
Science | Electronics | easy | Convert the following into rms values:\n - (a) 200 mA peak\n - (b) 24 µV p-p\n - (c) 10 mA av\n - (d) 180 µV p-p | [
"# Converting to RMS Values (Sinusoidal Waveform)",
"## Key Relationships",
"| Given → RMS | Formula |\n|---|---|\n| Peak → RMS | $V_{\\text{rms}} = \\dfrac{V_p}{\\sqrt{2}}$ |\n| Peak-to-peak → RMS | $V_{\\text{rms}} = \\dfrac{V_{pp}}{2\\sqrt{2}}$ |\n| Average → RMS | $V_{\\text{rms}} = \\dfrac{\\pi}{2\\sqrt{2}... | # Converting to RMS Values (Sinusoidal Waveform)
## Key Relationships
| Given → RMS | Formula |
|---|---|
| Peak → RMS | $V_{\text{rms}} = \dfrac{V_p}{\sqrt{2}}$ |
| Peak-to-peak → RMS | $V_{\text{rms}} = \dfrac{V_{pp}}{2\sqrt{2}}$ |
| Average → RMS | $V_{\text{rms}} = \dfrac{\pi}{2\sqrt{2}}\,V_{\text{av}} \approx 1.... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000703 |
Programming | - | hard | Build a complete, single-page local business directory page website using only HTML, CSS, and vanilla JavaScript (no frameworks). The design should be glassmorphism-styled. Include: animated statistics/counters section; lazy-loading images using the loading='lazy' attribute; hero section with a full-screen background i... | [
"# Local Business Directory — \"LocalHive\"",
"Here's a complete, single-file website with everything you requested.",
"Save it as `index.html` and open it in any browser.",
"```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <!-- ============================================================\n META ... | # Local Business Directory — "LocalHive"
Here's a complete, single-file website with everything you requested. Save it as `index.html` and open it in any browser.
```html
<!DOCTYPE html>
<html lang="en">
<head>
<!-- ============================================================
META & DOCUMENT SETUP
========... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000704 |
Artificial Intelligence | Logic Puzzle | medium | A boat is floating in a pool with a 100kg anchor on deck. If the anchor is thrown overboard and sinks to the bottom, does the water level in the pool go up, go down, or stay the same? | [
"# The Water Level Goes **Down**",
"This is a classic Archimedes' principle puzzle, and the key is to track how much water is *displaced* in each situation.",
"## Before: Anchor on the deck",
"The boat is floating, so it displaces a volume of water whose **weight** equals the total weight of the boat **plus**... | # The Water Level Goes **Down**
This is a classic Archimedes' principle puzzle, and the key is to track how much water is *displaced* in each situation.
## Before: Anchor on the deck
The boat is floating, so it displaces a volume of water whose **weight** equals the total weight of the boat **plus** the anchor. The ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000705 |
Mathematics | - | medium | Given the quadratic equation in $x$: $a(1+\mathrm{i}) x^{2}+\left(1+a^{2} \mathrm{i}\right) x+a^{2}+\mathrm{i}=0$ has real roots, find the value of the real number $a$.
untranslated text:
已知关于 $x$ 的二次方程 $a(1+\mathrm{i}) x^{2}+\left(1+a^{2} \mathrm{i}\right) x+a^{2}+\mathrm{i}=0$ 有实根, 求实数 $a$ 的值.
translated text:
Gi... | [
"# Finding the Real Number $a$",
"## Setting Up the System",
"Since the equation must have a **real** root $x$, I substitute real $x$ into:",
"$$a(1+i)x^2 + (1+a^2 i)x + (a^2+i) = 0$$",
"Separating **real** and **imaginary** parts gives the system:",
"$$\\begin{cases} ax^2 + x + a^2 = 0 & \\text{(real par... | # Finding the Real Number $a$
## Setting Up the System
Since the equation must have a **real** root $x$, I substitute real $x$ into:
$$a(1+i)x^2 + (1+a^2 i)x + (a^2+i) = 0$$
Separating **real** and **imaginary** parts gives the system:
$$\begin{cases} ax^2 + x + a^2 = 0 & \text{(real part)} \\ ax^2 + a^2 x + 1 = 0... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000706 |
Programming | - | hard | Build a concurrent file downloader with 4-worker parallelism, retry logic, and a live progress bar in Java using the language's native concurrency primitives. Demonstrate correct use of locks/channels/atomics and explain your approach to avoiding data races. | [
"# Concurrent File Downloader — Java (Native Concurrency Primitives)",
"## Complete Implementation",
"```java\nimport java.io.*;\nimport java.net.HttpURLConnection;\nimport java.net.URL;\nimport java.nio.file.*;\nimport java.util.*;\nimport java.util.concurrent.*;\nimport java.util.concurrent.atomic.*;\nimport ... | # Concurrent File Downloader — Java (Native Concurrency Primitives)
## Complete Implementation
```java
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.file.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import java.util.concurrent.... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000707 |
Programming | - | hard | Stepan had a favorite string s which consisted of the lowercase letters of the Latin alphabet.
After graduation, he decided to remember it, but it was a long time ago, so he can't now remember it. But Stepan remembers some information about the string, namely the sequence of integers c1, c2, ..., cn, where n equals t... | [
"Looking at this problem, I need to find a string where `c[i]` counts substrings of length `i` made of identical characters.",
"**Key Insight:** If the string has runs of lengths `L1, L2, ..., Lk`, then:\n- `c[i] = Σ max(0, Lj - i + 1)` over all runs",
"This means `c[i] - c[i+1]` = **number of runs with length ... | Looking at this problem, I need to find a string where `c[i]` counts substrings of length `i` made of identical characters.
**Key Insight:** If the string has runs of lengths `L1, L2, ..., Lk`, then:
- `c[i] = Σ max(0, Lj - i + 1)` over all runs
This means `c[i] - c[i+1]` = **number of runs with length ≥ i**.
Theref... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000708 |
Programming | - | hard | Enhance the given Python code to ensure that it effectively handles different types of exceptions that may arise. You should include, but aren't limited to identifying exceptions caused by the non-existence of the file, unauthorized file access, and improperly closed files. Also, ensure that the program handles generic... | [
"# Enhanced File Reader with Robust Exception Handling",
"Here's the enhanced Python code that handles a comprehensive range of exceptions, logs errors, and preserves the primary file-reading functionality:",
"```python\nimport logging\nimport os\nimport sys",
"# ----------------------------------------------... | # Enhanced File Reader with Robust Exception Handling
Here's the enhanced Python code that handles a comprehensive range of exceptions, logs errors, and preserves the primary file-reading functionality:
```python
import logging
import os
import sys
# ------------------------------------------------------------------... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000709 |
Programming | - | hard | In C#, implement a DP solution for counting the number of distinct ways to tile a 3×10 board with 1×2 dominoes. Show the recurrence relation and filled DP table on a small example. | [
"# Tiling a 3×n Board with 1×2 Dominoes — DP in C#",
"## Recurrence Relation",
"A 3×n board is tileable **only when n is even** (area 3n must be even).",
"The cleanest general formulation uses a **bitmask state per column**:",
"> **dp[c][m]** = number of ways to complete columns *c … n−1*, given that the 3-... | # Tiling a 3×n Board with 1×2 Dominoes — DP in C#
## Recurrence Relation
A 3×n board is tileable **only when n is even** (area 3n must be even). The cleanest general formulation uses a **bitmask state per column**:
> **dp[c][m]** = number of ways to complete columns *c … n−1*, given that the 3-bit mask *m* marks whi... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000710 |
Science | - | hard | How does the interplay between electroweak sphaleron transitions and lepton flavor asymmetries influence baryogenesis in extensions of the Standard Model that include heavy sterile neutrinos with masses near the TeV scale? | [
"# Sphaleron Transitions, Lepton Flavor, and TeV-Scale Sterile Neutrino Baryogenesis",
"## 1.",
"Setting the Stage: Two Asymmetry Engines",
"In the Standard Model at temperatures above the electroweak crossover (~130 GeV), **electroweak sphaleron transitions** are in thermal equilibrium.",
"Each sphaleron e... | # Sphaleron Transitions, Lepton Flavor, and TeV-Scale Sterile Neutrino Baryogenesis
## 1. Setting the Stage: Two Asymmetry Engines
In the Standard Model at temperatures above the electroweak crossover (~130 GeV), **electroweak sphaleron transitions** are in thermal equilibrium. Each sphaleron event shifts baryon and ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000711 |
Programming | - | hard | Using Flask (Python), build a REST API that handles paginated list endpoint with aggregation counts for events. Include: search / full-text query, query-param validation, OAuth2 scope checks, response caching, structured logging. Show the database schema and migration files. | [
"# Flask REST API — Paginated Events with Aggregations",
"## Project Structure",
"```\nevents-api/\n├── app/\n│ ├── __init__.py # App factory\n│ ├── config.py # Configuration\n│ ├── models.py # SQLAlchemy models + FTS index\n│ ├── schemas.py # Que... | # Flask REST API — Paginated Events with Aggregations
## Project Structure
```
events-api/
├── app/
│ ├── __init__.py # App factory
│ ├── config.py # Configuration
│ ├── models.py # SQLAlchemy models + FTS index
│ ├── schemas.py # Query-param validation... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000712 |
Programming | - | medium | Transform the following Python list, which contains arrays of specific geographical territories, their respective inhabitant counts, GDP per capita, and the mortalities per year due to natural calamities, into a nested Python dictionary representation. Additionally, create a function to calculate the percentage of each... | [
"# Nested Dictionary Transformation & Population Percentage Function",
"## Solution",
"```python\n# Original list of geographical territories\nterritory_list = [\n [\"United_Kingdom\", 66_000_000, 39200, 1000],\n [\"United_States\", 323_000_000, 59500, 13000]\n]",
"# Transform the list into a nested dic... | # Nested Dictionary Transformation & Population Percentage Function
## Solution
```python
# Original list of geographical territories
territory_list = [
["United_Kingdom", 66_000_000, 39200, 1000],
["United_States", 323_000_000, 59500, 13000]
]
# Transform the list into a nested dictionary
territory_dict = {... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000713 |
Programming | - | hard | You are given a grayscale image represented as a 2D NumPy array, where higher values correspond to brighter pixels. Your task is to detect the peaks (local maxima) in this image. A peak pixel is defined as a pixel whose value is greater than or equal to the values of all its neighbors using an 8-connected neighborhood.... | [
"```python\nimport numpy as np\nfrom scipy.ndimage import generate_binary_structure, maximum_filter",
"def detect_peaks(image: np.ndarray) -> np.ndarray:\n # Step 1: Create a copy of the input image to store the peaks\n peaks = np.array(image)",
"# Step 2: Define an 8-connected neighborhood structure\n ... | ```python
import numpy as np
from scipy.ndimage import generate_binary_structure, maximum_filter
def detect_peaks(image: np.ndarray) -> np.ndarray:
# Step 1: Create a copy of the input image to store the peaks
peaks = np.array(image)
# Step 2: Define an 8-connected neighborhood structure
neighborh... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000714 |
Artificial Intelligence | Logic Puzzle | easy | A row of six gears are all meshed in a line. If I turn the first gear clockwise, which direction does the sixth gear turn? | [
"**Counter-clockwise.**",
"Each pair of meshed gears rotates in the **opposite** direction.",
"So the directions alternate down the line:",
"| Gear | 1 | 2 | 3 | 4 | 5 | 6 |\n|------|---|---|---|---|---|---|\n| Direction | CW | CCW | CW | CCW | CW | **CCW** |",
"Since gear 6 is an even-numbered gear in the ... | **Counter-clockwise.**
Each pair of meshed gears rotates in the **opposite** direction. So the directions alternate down the line:
| Gear | 1 | 2 | 3 | 4 | 5 | 6 |
|------|---|---|---|---|---|---|
| Direction | CW | CCW | CW | CCW | CW | **CCW** |
Since gear 6 is an even-numbered gear in the chain, it turns **counte... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000715 |
Science | Physics | hard | B8 Considering the monomolecular layer of water, estimate the surface tension $\sigma$ of water. | [
"# Estimating Surface Tension from a Monomolecular Layer",
"## Physical Picture",
"At the surface, each water molecule has roughly **half** its neighbours compared to the bulk, so it carries an excess (deficit) of potential energy.",
"The surface tension equals this excess energy per unit area of the surface ... | # Estimating Surface Tension from a Monomolecular Layer
## Physical Picture
At the surface, each water molecule has roughly **half** its neighbours compared to the bulk, so it carries an excess (deficit) of potential energy. The surface tension equals this excess energy per unit area of the surface layer.
$$\sigma \... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000716 |
Artificial Intelligence | Logic Puzzle | easy | A train leaves City A at 10:00 AM and arrives in City B exactly 6 hours later. City B is 2 hours behind City A. What is the local time in City B when the train arrives? | [
"## Finding the Local Arrival Time in City B",
"**Step 1: Determine the arrival time in City A's time zone.**\nThe train departs at 10:00 AM and travels for 6 hours:\n10:00 AM + 6 hours = **4:00 PM** (City A time)",
"**Step 2: Convert to City B's local time.**\nCity B is 2 hours *behind* City A, so subtract 2 h... | ## Finding the Local Arrival Time in City B
**Step 1: Determine the arrival time in City A's time zone.**
The train departs at 10:00 AM and travels for 6 hours:
10:00 AM + 6 hours = **4:00 PM** (City A time)
**Step 2: Convert to City B's local time.**
City B is 2 hours *behind* City A, so subtract 2 hours:
4:00 PM − ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000717 |
Mathematics | - | medium | Calculate the inradius \( r \) of triangle \( ABC \) as a function of its side lengths \( a \), \( b \), and \( c \). | [
"# Inradius of a Triangle",
"## Key Idea",
"The incenter is the point where the three angle-bisectors meet.",
"Dropping perpendiculars from the incenter to each side gives a length $r$ (the inradius) to **all three** sides.",
"This splits $\\triangle ABC$ into three smaller triangles with common height $r$:... | # Inradius of a Triangle
## Key Idea
The incenter is the point where the three angle-bisectors meet. Dropping perpendiculars from the incenter to each side gives a length $r$ (the inradius) to **all three** sides. This splits $\triangle ABC$ into three smaller triangles with common height $r$:
$$S_{\triangle ABC} = ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000718 |
Artificial Intelligence | Logic Puzzle | easy | I am packing for a trip and put 5 apples in my bag. If my friend brings 4 more apples, how many apples will I have when we start our hike? | [
"You'll have **9 apples** when you start your hike.",
"5 (yours) + 4 (your friend's) = 9 apples in total.",
"Enjoy the hike! 🍎"
] | You'll have **9 apples** when you start your hike.
5 (yours) + 4 (your friend's) = 9 apples in total. Enjoy the hike! 🍎 | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000719 |
Artificial Intelligence | Logic Puzzle | easy | How many 's' letters are in the phrase 'the seven sisters sell silky seashells'? | [
"Looking at the phrase **\"the seven sisters sell silky seashells\"**, I'll count the 's' letters in each word:",
"- \"the\" → 0\n- \"seven\" → 0\n- \"s**i**s**t**ers\" → 3 (*s*, *s*, *s*)\n- \"**s**ell\" → 1\n- \"**s**ilky\" → 1\n- \"**s**ea**s**hells\" → 3 (*s*, *s*, *s*)",
"**Total: 8**"
] | Looking at the phrase **"the seven sisters sell silky seashells"**, I'll count the 's' letters in each word:
- "the" → 0
- "seven" → 0
- "s**i**s**t**ers" → 3 (*s*, *s*, *s*)
- "**s**ell" → 1
- "**s**ilky" → 1
- "**s**ea**s**hells" → 3 (*s*, *s*, *s*)
**Total: 8** | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000720 |
Programming | - | hard | Analyze the amortized time complexity using the potential method of binary search (recursive) on an input of size n=17,645,986. Provide a rigorous justification. | [
"# Amortized Analysis of Recursive Binary Search via the Potential Method",
"## 1.",
"Problem Setup and Operation Sequence",
"Consider the standard recursive binary search:",
"```\nBSEARCH(A, lo, hi, x):\n if lo > hi: return NOT_FOUND // base case\n mid ← ⌊(lo + hi)/2⌋\n if A[mid] = x: ret... | # Amortized Analysis of Recursive Binary Search via the Potential Method
## 1. Problem Setup and Operation Sequence
Consider the standard recursive binary search:
```
BSEARCH(A, lo, hi, x):
if lo > hi: return NOT_FOUND // base case
mid ← ⌊(lo + hi)/2⌋
if A[mid] = x: return mid // fou... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000721 |
Programming | - | hard | Build a fully playable Snake game using HTML5 Canvas and pure JavaScript (no external libraries). Implement the following mechanics: collision detection with walls and self-intersection; speed increases progressively every 5 points; score display incrementing per food eaten; game-over overlay with final score and resta... | [
"# Snake Game — HTML5 Canvas + Pure JavaScript",
"Save the code below as `snake.html` and open it in any modern browser.",
"It's a single self-contained file, organized into clear modules: **Config → State → Input → Game Logic → Rendering → Loop**.",
"```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<met... | # Snake Game — HTML5 Canvas + Pure JavaScript
Save the code below as `snake.html` and open it in any modern browser. It's a single self-contained file, organized into clear modules: **Config → State → Input → Game Logic → Rendering → Loop**.
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<ti... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000722 |
Mathematics | - | hard | For positive reals \(a, b, c\) such that \(c^2 \le a^2 + b^2\) and \(c \ge b \ge a\), find another positive real \(t\) such that \((c - t)^2 = (a - t)^2 + (b - t)^2\). | [
"A valid choice is",
"\\[\n\\boxed{t=a+b-c+\\sqrt{2(c-a)(c-b)}}.\n\\]",
"Indeed, expand the desired identity:",
"\\[\n(c-t)^2=(a-t)^2+(b-t)^2.\n\\]",
"This is equivalent to",
"\\[\nt^2-2(a+b-c)t+(a^2+b^2-c^2)=0.\n\\]",
"The discriminant is",
"\\[\n4\\Big((a+b-c)^2-(a^2+b^2-c^2)\\Big)\n=8(c-a)(c-b)\\ge... | A valid choice is
\[
\boxed{t=a+b-c+\sqrt{2(c-a)(c-b)}}.
\]
Indeed, expand the desired identity:
\[
(c-t)^2=(a-t)^2+(b-t)^2.
\]
This is equivalent to
\[
t^2-2(a+b-c)t+(a^2+b^2-c^2)=0.
\]
The discriminant is
\[
4\Big((a+b-c)^2-(a^2+b^2-c^2)\Big)
=8(c-a)(c-b)\ge 0,
\]
because \(c\ge b\ge a\). Hence the solutions ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000723 |
Mathematics | Synthetic Math | easy | Consider the table below, which provides the air distance in miles between selected global cities. If two different cities from the chart are chosen at random, what is the probability that the distance between them is less than $8000$ miles? Express your answer as a common fraction.
\begin{tabular}{|c|c|c|c|c|c|}
\hli... | [
"# Probability That Distance Is Less Than 8000 Miles",
"## Identifying All Pairs",
"With 5 cities, the total number of pairs is:\n$$\\binom{5}{2} = 10$$",
"## Listing Each Distance and Checking",
"| Pair | Distance (miles) | < 8000? |\n|---|---|---|\n| Bangkok – Cape Town | 6,500 | ✓ |\n| Bangkok – Honolulu... | # Probability That Distance Is Less Than 8000 Miles
## Identifying All Pairs
With 5 cities, the total number of pairs is:
$$\binom{5}{2} = 10$$
## Listing Each Distance and Checking
| Pair | Distance (miles) | < 8000? |
|---|---|---|
| Bangkok – Cape Town | 6,500 | ✓ |
| Bangkok – Honolulu | 6,800 | ✓ |
| Bangkok –... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000724 |
Artificial Intelligence | Logic Puzzle | easy | If the day after tomorrow's yesterday is Friday, what day is two days from today? | [
"## Working Through It Step by Step",
"**Step 1: Decode \"tomorrow's yesterday.\"**\n\"Tomorrow's yesterday\" simply means the day before tomorrow — which is **today**.",
"**Step 2: Decode the full phrase.**\n\"The day after *tomorrow's yesterday*\" → \"The day after **today**\" → **tomorrow**.",
"**Step 3: S... | ## Working Through It Step by Step
**Step 1: Decode "tomorrow's yesterday."**
"Tomorrow's yesterday" simply means the day before tomorrow — which is **today**.
**Step 2: Decode the full phrase.**
"The day after *tomorrow's yesterday*" → "The day after **today**" → **tomorrow**.
**Step 3: Set up the equation.**
> Tom... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000725 |
Programming | - | hard | Write a JavaScript implementation of the Observer pattern applied to a file system abstraction. Include a before-and-after showing code without and with the pattern applied. | [
"# Observer Pattern for a File System Abstraction",
"## The Problem (Before)",
"Without the Observer pattern, the `FileSystem` class knows *every* consumer of its events by name.",
"Adding a new listener (e.g., a UI file tree, a virus scanner) forces you to modify the core class — a direct violation of the **... | # Observer Pattern for a File System Abstraction
## The Problem (Before)
Without the Observer pattern, the `FileSystem` class knows *every* consumer of its events by name. Adding a new listener (e.g., a UI file tree, a virus scanner) forces you to modify the core class — a direct violation of the **Open/Closed Princi... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000726 |
Mathematics | - | medium | $x,y$ are real numbers such that $$x^2+y^2=1 , 20x^3-15x=3$$Find the value of $|20y^3-15y|$.(K. Tyshchuk) | [
"# Finding $|20y^3 - 15y|$",
"## Setting Up a Trigonometric Substitution",
"Since $x^2 + y^2 = 1$, I parameterize:\n$$x = \\cos\\theta, \\qquad y = \\sin\\theta$$",
"## Recognizing the Triple-Angle Structure",
"The key identity is:\n$$\\cos(3\\theta) = 4\\cos^3\\theta - 3\\cos\\theta$$",
"So the given equ... | # Finding $|20y^3 - 15y|$
## Setting Up a Trigonometric Substitution
Since $x^2 + y^2 = 1$, I parameterize:
$$x = \cos\theta, \qquad y = \sin\theta$$
## Recognizing the Triple-Angle Structure
The key identity is:
$$\cos(3\theta) = 4\cos^3\theta - 3\cos\theta$$
So the given equation becomes:
$$20x^3 - 15x = 5\bigl(... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000727 |
Programming | - | easy | You are given a positive integer N and you have to find the number of non negative integral solutions to a+b+c=N.
Example 1:
Input:
N = 10
Output:
66
Explanation:
There are 66 possible solutions.
Example 2:
Input:
N = 20
Output:
231
Explanation:
There are 231 possible solutions.
Your Task:
You don't need to read i... | [
"```python",
"class Solution:",
"def noOfIntSols(self, N):",
"return (N + 1) * (N + 2) // 2",
"```"
] | ```python
class Solution:
def noOfIntSols(self, N):
return (N + 1) * (N + 2) // 2
``` | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000728 |
Artificial Intelligence | Logic Puzzle | easy | I walked three miles into the forest to fix the broken fence, but then I remembered I left my drill at the car parking lot. How many holes can I drill right now? | [
"**Zero.**",
"You're three miles into the forest and your drill is back at the car.",
"You don't have a drill with you right now, so the number of holes you can drill at this moment is **0**."
] | **Zero.**
You're three miles into the forest and your drill is back at the car. You don't have a drill with you right now, so the number of holes you can drill at this moment is **0**. | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000729 |
Programming | - | hard | Write a clean implementation of Bellman-Ford algorithm with negative-cycle detection in Go from scratch. Trace through a worked example step by step and prove correctness. | [
"# Bellman-Ford with Negative-Cycle Detection in Go",
"## 1.",
"Implementation",
"```go\npackage bellmanford",
"import (\n\t\"fmt\"\n\t\"math\"\n)",
"// Edge represents a directed edge with a real-valued weight.\ntype Edge struct {\n\tSrc, Dst int\n\tWeight float64\n}",
"// Result holds everything Bel... | # Bellman-Ford with Negative-Cycle Detection in Go
## 1. Implementation
```go
package bellmanford
import (
"fmt"
"math"
)
// Edge represents a directed edge with a real-valued weight.
type Edge struct {
Src, Dst int
Weight float64
}
// Result holds everything Bellman-Ford can report.
type Result struct {
Di... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000730 |
Mathematics | - | hard | Determine whether there exists a non-zero value of $\beta$ such that $e^{\beta}$ is a rational number. | [
"# Existence of a Non-Zero $\\beta$ with $e^{\\beta} \\in \\mathbb{Q}$",
"## Answer: **Yes**, such a $\\beta$ exists.",
"## Direct Construction",
"Take $\\beta = \\ln 2$.",
"Then:",
"$$\\beta = \\ln 2 \\approx 0.693\\ldots \\neq 0$$",
"and",
"$$e^{\\beta} = e^{\\ln 2} = 2 \\in \\mathbb{Q}.$$",
"This... | # Existence of a Non-Zero $\beta$ with $e^{\beta} \in \mathbb{Q}$
## Answer: **Yes**, such a $\beta$ exists.
## Direct Construction
Take $\beta = \ln 2$. Then:
$$\beta = \ln 2 \approx 0.693\ldots \neq 0$$
and
$$e^{\beta} = e^{\ln 2} = 2 \in \mathbb{Q}.$$
This is valid because the function $f(\beta) = e^{\beta}$ ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000731 |
Artificial Intelligence | Logic Puzzle | easy | If the first gear in a chain of six meshed gears turns clockwise, which direction does the sixth gear turn? | [
"## Answer: **Counter-clockwise**",
"When two gears mesh, they always rotate in **opposite** directions.",
"So the direction alternates from gear to gear:",
"| Gear | Direction |\n|------|-----------|\n| 1 | Clockwise |\n| 2 | Counter-clockwise |\n| 3 | Clockwise |\n| 4 | Counter-clockwise |\n| 5 | Clockwise ... | ## Answer: **Counter-clockwise**
When two gears mesh, they always rotate in **opposite** directions. So the direction alternates from gear to gear:
| Gear | Direction |
|------|-----------|
| 1 | Clockwise |
| 2 | Counter-clockwise |
| 3 | Clockwise |
| 4 | Counter-clockwise |
| 5 | Clockwise |
| 6 | **Counter-clockw... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000732 |
Mathematics | - | hard | In the convex quadrilateral $ABCD$, the intersection points of the opposite sides are $K$ and $L$, and the intersection point of the diagonals is $M$. The diagonal $AC$ intersects the line $KL$ at point $N$. Determine the length of $CN$ if it is known that $AM=3 \text{~cm}$ and $MC=2 \text{~cm}$. | [
"# Finding the Length of CN",
"## Setting Up the Problem",
"I'll place the diagonal $AC$ on a number line with $A$ at position $0$ and $C$ at position $5$.",
"Since $AM = 3$ and $MC = 2$, point $M$ sits at position $3$.",
"## Key Theorem: Harmonic Conjugates in a Complete Quadrilateral",
"The four sides $... | # Finding the Length of CN
## Setting Up the Problem
I'll place the diagonal $AC$ on a number line with $A$ at position $0$ and $C$ at position $5$. Since $AM = 3$ and $MC = 2$, point $M$ sits at position $3$.
## Key Theorem: Harmonic Conjugates in a Complete Quadrilateral
The four sides $AB$, $BC$, $CD$, $DA$ form... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000733 |
Mathematics | - | hard | At most how many numbers can we select from the first 1983 positive integers so that the product of any two selected numbers does not appear among the selected numbers? | [
"# Maximum Size of a Product-Free Subset of {1, 2, …, 1983}",
"## Constructing a Valid Set of Size 1939",
"Take **S = {45, 46, 47, …, 1983}**, which has $1983 - 45 + 1 = 1939$ elements.",
"**Verification:** For any two distinct elements $a, b \\in S$, both satisfy $a, b \\geq 45$, so\n$$ab \\geq 45 \\cdot 46 ... | # Maximum Size of a Product-Free Subset of {1, 2, …, 1983}
## Constructing a Valid Set of Size 1939
Take **S = {45, 46, 47, …, 1983}**, which has $1983 - 45 + 1 = 1939$ elements.
**Verification:** For any two distinct elements $a, b \in S$, both satisfy $a, b \geq 45$, so
$$ab \geq 45 \cdot 46 = 2070 > 1983.$$
Thus ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000734 |
Programming | - | hard | Suggest a machine learning algorithm to solve a binary classification problem, and provide a detailed explanation of how the algorithm works. Discuss the pros and cons of the algorithm and provide insights into its performance on different types of data. | [
"# Support Vector Machine (SVM) for Binary Classification",
"## Why SVM?",
"If you're tackling a binary classification problem—whether it's spam detection, disease diagnosis, click-through prediction, or customer churn modeling—**Support Vector Machine (SVM)** is one of the most principled, geometrically intuit... | # Support Vector Machine (SVM) for Binary Classification
## Why SVM?
If you're tackling a binary classification problem—whether it's spam detection, disease diagnosis, click-through prediction, or customer churn modeling—**Support Vector Machine (SVM)** is one of the most principled, geometrically intuitive, and broa... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000735 |
Mathematics | - | easy | Let $i$ be the imaginary unit. The imaginary part of $\frac{i}{i + 1}$ is ( )
A: $\frac{1}{2}i$
B: $-\frac{1}{2}i$
C: $-\frac{1}{2}$
D: $\frac{1}{2}$ | [
"# Finding the Imaginary Part of $\\dfrac{i}{i+1}$",
"## Simplifying the Expression",
"I'll rationalize by multiplying the numerator and denominator by the complex conjugate of the denominator.",
"The conjugate of $1+i$ is $1-i$:",
"$$\\frac{i}{i+1}\\cdot\\frac{1-i}{1-i}=\\frac{i(1-i)}{(1+i)(1-i)}$$",
"**... | # Finding the Imaginary Part of $\dfrac{i}{i+1}$
## Simplifying the Expression
I'll rationalize by multiplying the numerator and denominator by the complex conjugate of the denominator. The conjugate of $1+i$ is $1-i$:
$$\frac{i}{i+1}\cdot\frac{1-i}{1-i}=\frac{i(1-i)}{(1+i)(1-i)}$$
**Numerator:**
$$i(1-i)=i-i^2=i-(... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000736 |
Programming | - | hard | You are given a tree consisting of $n$ vertices. A number is written on each vertex; the number on vertex $i$ is equal to $a_i$.
Recall that a simple path is a path that visits each vertex at most once. Let the weight of the path be the bitwise XOR of the values written on vertices it consists of. Let's say that a tre... | [
"Looking at this problem, I need to find the minimum number of vertex value changes so that no simple path has XOR weight 0.",
"**Key Insights:**",
"1. **Root the tree** and compute prefix XORs: $P[v]$ = XOR of values on the path from root to $v$.",
"2. **Characterize bad paths:**\n - *Ancestor-descendant* ... | Looking at this problem, I need to find the minimum number of vertex value changes so that no simple path has XOR weight 0.
**Key Insights:**
1. **Root the tree** and compute prefix XORs: $P[v]$ = XOR of values on the path from root to $v$.
2. **Characterize bad paths:**
- *Ancestor-descendant* (top = $u$, bottom... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000737 |
Programming | - | medium | Way to go! Heidi now knows how many brains there must be for her to get one. But throwing herself in the midst of a clutch of hungry zombies is quite a risky endeavor. Hence Heidi wonders: what is the smallest number of brains that must be in the chest for her to get out at all (possibly empty-handed, but alive)?
The ... | [
"Looking at this problem, I need to figure out the minimum brains Heidi needs to buy enough votes to survive.",
"**Key observations:**\n- There are N total attendees (Heidi + N-1 zombies)\n- Heidi's proposal needs at least ⌈N/2⌉ \"yes\" votes to pass\n- Heidi always votes for her own proposal\n- So she needs ⌈N/2... | Looking at this problem, I need to figure out the minimum brains Heidi needs to buy enough votes to survive.
**Key observations:**
- There are N total attendees (Heidi + N-1 zombies)
- Heidi's proposal needs at least ⌈N/2⌉ "yes" votes to pass
- Heidi always votes for her own proposal
- So she needs ⌈N/2⌉ - 1 additiona... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000738 |
Mathematics | - | medium | Given a sample of size $N$ with variance $\sigma^2$, calculate the sum of all pairwise covariances between different sample values. | [
"# Sum of All Pairwise Covariances in a Sample",
"## Setup",
"Let the sample be $X_1, X_2, \\dots, X_N$ with mean $\\bar{X}$ and variance $\\sigma^2 = \\frac{1}{N}\\sum_{i=1}^N (X_i - \\bar{X})^2$.",
"The \"pairwise covariance\" between two sample values is the product of their deviations from the mean:",
"... | # Sum of All Pairwise Covariances in a Sample
## Setup
Let the sample be $X_1, X_2, \dots, X_N$ with mean $\bar{X}$ and variance $\sigma^2 = \frac{1}{N}\sum_{i=1}^N (X_i - \bar{X})^2$.
The "pairwise covariance" between two sample values is the product of their deviations from the mean:
$$\text{Cov}(X_i, X_j) \;=\; ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000739 |
Programming | - | hard | The goal of 8 Queens Problem is to put eight queens on a chess-board such that none of them threatens any of others. A queen threatens the squares in the same row, in the same column, or on the same diagonals as shown in the following figure.
For a given chess board where $k$ queens are already placed, find the soluti... | [
"Looking at this problem, I need to:\n1.",
"Place the k pre-given queens on the board\n2.",
"Use backtracking to fill in the remaining queens row by row\n3.",
"For rows that already have a pre-placed queen, just move to the next row\n4.",
"Since there's exactly one solution, backtracking will find it determ... | Looking at this problem, I need to:
1. Place the k pre-given queens on the board
2. Use backtracking to fill in the remaining queens row by row
3. For rows that already have a pre-placed queen, just move to the next row
4. Since there's exactly one solution, backtracking will find it deterministically
**Key insight:**... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000740 |
Artificial Intelligence | Logic Puzzle | easy | I need to drop my dog off at the vet, but my car is currently at the mechanic. If I leave the house right now to take my dirty laundry to the dry cleaners, where is my dog? | [
"Your dog is at the house with you... well, not *with* you, since you're heading out.",
"The dog is at home, since you're going to the dry cleaners (not the vet) and the car is at the mechanic.",
"You'll need to figure out a different way to get to the vet when you're ready to take the dog in.",
"(And you mig... | Your dog is at the house with you... well, not *with* you, since you're heading out. The dog is at home, since you're going to the dry cleaners (not the vet) and the car is at the mechanic. You'll need to figure out a different way to get to the vet when you're ready to take the dog in.
(And you might want to make sur... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000741 |
Programming | - | medium | Monk A loves to complete all his tasks just before the deadlines for introducing unwanted thrill in his life. But, there is another Monk D who hates this habit of Monk A and thinks it's risky.
To test Monk A, Monk D provided him tasks for N days in the form of an array Array, where the elements of the array represen... | [
"# Solution",
"## Approach",
"1.",
"For each element in the array, compute the number of set bits (1s in binary representation).\n2.",
"Sort the array using this count as the key.",
"Since Python's sort is **stable**, elements with the same set-bit count will naturally retain their original relative order... | # Solution
## Approach
1. For each element in the array, compute the number of set bits (1s in binary representation).
2. Sort the array using this count as the key. Since Python's sort is **stable**, elements with the same set-bit count will naturally retain their original relative order (satisfying the tie-breaking... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000742 |
Programming | Python | medium | To round an integer a, it is customary to round to some multiple of a power of 10, and you will round it accordingly. This time, rules have changed. Given an int n and an int b, round n to the nearest value which is a multiple of b.
If n is exactly halfway between two multiples of b, print the larger value.
INPUT
Fi... | [
"```python\nimport sys",
"def main():\n data = sys.stdin.read().strip().split()\n if not data:\n return",
"t = int(data[0])\n idx = 1\n ans = []",
"for _ in range(t):\n n = int(data[idx])\n b = int(data[idx + 1])\n idx += 2",
"r = n % b\n lower = (n // b) * b\n... | ```python
import sys
def main():
data = sys.stdin.read().strip().split()
if not data:
return
t = int(data[0])
idx = 1
ans = []
for _ in range(t):
n = int(data[idx])
b = int(data[idx + 1])
idx += 2
r = n % b
lower = (n // b) * b
upper = ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000743 |
Science | - | hard | How can physics-informed neural operators be rigorously trained to simultaneously infer subgrid-scale turbulence closures and predict transient aerosol-cloud interaction feedbacks under varying thermodynamic constraints? | [
"# Rigorous Training of Physics-Informed Neural Operators for SGS Turbulence Closures and Transient Aerosol–Cloud Feedbacks",
"This is a frontier problem that sits at the confluence of operator learning theory, turbulence closure, cloud microphysics, and constrained dynamical-systems estimation.",
"Below is a s... | # Rigorous Training of Physics-Informed Neural Operators for SGS Turbulence Closures and Transient Aerosol–Cloud Feedbacks
This is a frontier problem that sits at the confluence of operator learning theory, turbulence closure, cloud microphysics, and constrained dynamical-systems estimation. Below is a structured trea... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000744 |
Programming | - | hard | Build a complete, single-page maintenance mode page website using only HTML, CSS, and vanilla JavaScript (no frameworks). The design should be retro-inspired. Include: team/about section with profile cards; CSS-only animated background patterns; animated skeleton loading screens for async content areas; CSS card grid f... | [
"# Retro Maintenance Mode Page",
"Here's a complete, single-file solution.",
"Save it as `index.html` and open it in any browser.",
"```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <meta name=\"de... | # Retro Maintenance Mode Page
Here's a complete, single-file solution. Save it as `index.html` and open it in any browser.
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="PIXELCRAFT is... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000745 |
Science | Physics | hard | A.1 Using the graph, determine the resistance $R_{\mathrm{on}}$ of the element $X$ on the upper branch of the $I-V$ characteristics, and $R_{\text {off }}$ on the lower branch, respectively. The middle branch is described by the equation
$$
I=I_{0}-\frac{U}{R_{\text {int }}}
\tag{1}
$$
Find the values of the paramete... | [
"# Determining Parameters from the I-V Characteristic",
"## Reading the Graph – Upper and Lower Branches",
"Both the upper and lower branches are straight lines through (or near) the origin, so their resistances are simply the **inverse slopes**:",
"$$R_{\\text{on}} = \\frac{U}{I}\\bigg|_{\\text{upper branch}... | # Determining Parameters from the I-V Characteristic
## Reading the Graph – Upper and Lower Branches
Both the upper and lower branches are straight lines through (or near) the origin, so their resistances are simply the **inverse slopes**:
$$R_{\text{on}} = \frac{U}{I}\bigg|_{\text{upper branch}}, \qquad R_{\text{of... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000746 |
Programming | - | medium | Pari has a friend who loves palindrome numbers. A palindrome number is a number that reads the same forward or backward. For example 12321, 100001 and 1 are palindrome numbers, while 112 and 1021 are not.
Pari is trying to love them too, but only very special and gifted people can understand the beauty behind palindro... | [
"Looking at this problem, I need to find the n-th even-length palindrome.",
"**Key Insight:** Let me list even-length palindromes and their positions:\n- Position 1-9: 11, 22, 33, ..., 99 (halves: 1-9)\n- Position 10-99: 1001, 1111, 1221, ..., 9999 (halves: 10-99)\n- Position 100-999: 100001, 101101, ... (halves:... | Looking at this problem, I need to find the n-th even-length palindrome.
**Key Insight:** Let me list even-length palindromes and their positions:
- Position 1-9: 11, 22, 33, ..., 99 (halves: 1-9)
- Position 10-99: 1001, 1111, 1221, ..., 9999 (halves: 10-99)
- Position 100-999: 100001, 101101, ... (halves: 100-999)
T... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000747 |
Mathematics | - | medium | In a closed bag lie apples. Three friends tried to lift the bag and guess how many fruits were inside. The first one said that, in his opinion, there were 18 apples, the second thought there were 21, and the third said 22. When the friends opened the bag, it turned out that one of them was off by 2, another by 3, and t... | [
"# Finding the Number of Apples",
"## Setting Up the Problem",
"Let **N** be the actual number of apples.",
"The three guesses are 18, 21, and 22, and the absolute errors must be exactly **{2, 3, 6}** in some order.",
"I need to check all **6 permutations** of assigning the errors to the friends:",
"| Cas... | # Finding the Number of Apples
## Setting Up the Problem
Let **N** be the actual number of apples. The three guesses are 18, 21, and 22, and the absolute errors must be exactly **{2, 3, 6}** in some order.
I need to check all **6 permutations** of assigning the errors to the friends:
| Case | \|N−18\| | \|N−21\| | ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000748 |
Mathematics | - | medium | If \((i^n a_n)_{n=1}^{\infty}\) converges and \(a_n\in\mathbb{R}\) for all \(n\in\mathbb{N}\), does \((a_n)_{n=1}^{\infty}\) necessarily converge to 0? Justify your answer. | [
"# Does $a_n \\to 0$?",
"**Yes.** The sequence $(a_n)$ necessarily converges to $0$.",
"## Key Observation: Real vs.",
"Imaginary Split",
"Since $a_n \\in \\mathbb{R}$, multiplying by $i^n$ (which cycles $i,\\,-1,\\,-i,\\,1,\\,i,\\,-1,\\,-i,\\,1,\\dots$) forces a structural split:",
"| Index | $i^n a_n$ |... | # Does $a_n \to 0$?
**Yes.** The sequence $(a_n)$ necessarily converges to $0$.
## Key Observation: Real vs. Imaginary Split
Since $a_n \in \mathbb{R}$, multiplying by $i^n$ (which cycles $i,\,-1,\,-i,\,1,\,i,\,-1,\,-i,\,1,\dots$) forces a structural split:
| Index | $i^n a_n$ | Nature |
|-------|-----------|------... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000749 |
Science | - | hard | In a high‑resolution ambient ionization mass spectrometry experiment, how can one deconvolute overlapping isotopic patterns to quantitatively distinguish isomeric metabolites differing by a single methyl group in complex plasma matrices? | [
"# Deconvoluting Overlapping Isotopic Envelopes for CH₂-Related Metabolites in Plasma by Ambient-MS",
"## 1.",
"Why the Problem Is Hard",
"Two metabolites that differ by exactly one –CH₂ unit (Δm = 14.01565 Da) present three intertwined difficulties in an ambient-ionisation (DESI, DART, ReSIRS, VDESI…) experi... | # Deconvoluting Overlapping Isotopic Envelopes for CH₂-Related Metabolites in Plasma by Ambient-MS
## 1. Why the Problem Is Hard
Two metabolites that differ by exactly one –CH₂ unit (Δm = 14.01565 Da) present three intertwined difficulties in an ambient-ionisation (DESI, DART, ReSIRS, VDESI…) experiment on plasma:
|... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000750 |
Artificial Intelligence | Logic Puzzle | medium | If someone was born on February 29, 2020, how many birthdays have they celebrated by February 28, 2024? | [
"## Counting the Birthdays",
"The person was born on **February 29, 2020**, so their birthday falls on a day that only exists in leap years.",
"In non-leap years, people born on Feb 29 typically celebrate on **February 28** (or March 1).",
"Let's go year by year:",
"| Year | Leap Year? | Celebration Date | ... | ## Counting the Birthdays
The person was born on **February 29, 2020**, so their birthday falls on a day that only exists in leap years. In non-leap years, people born on Feb 29 typically celebrate on **February 28** (or March 1).
Let's go year by year:
| Year | Leap Year? | Celebration Date | Counted? |
|------|---... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000751 |
Artificial Intelligence | Logic Puzzle | easy | In 6 years, Sarah will be three times as old as Leo was 4 years ago. If Sarah is currently 24, how old is Leo? | [
"## Solving for Leo's Age",
"**Setting up the equation:**",
"- Sarah is currently **24**, so in 6 years she will be **30**.\n- Leo's age 4 years ago is **(Leo − 4)**.\n- The condition: \"In 6 years, Sarah will be three times as old as Leo was 4 years ago.\"",
"$$30 = 3(\\text{Leo} - 4)$$",
"**Solving:**",
... | ## Solving for Leo's Age
**Setting up the equation:**
- Sarah is currently **24**, so in 6 years she will be **30**.
- Leo's age 4 years ago is **(Leo − 4)**.
- The condition: "In 6 years, Sarah will be three times as old as Leo was 4 years ago."
$$30 = 3(\text{Leo} - 4)$$
**Solving:**
$$10 = \text{Leo} - 4$$
$$\... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000752 |
Programming | - | hard | Build a nested resource endpoints (parent → child relationships) REST API for followers using Koa (Node.js). Include: structured logging, soft delete, pagination. Include an OpenAPI spec for the endpoints. | [
"# Nested REST API for Followers — Koa + Structured Logging + Soft Delete + Pagination",
"## Project Structure",
"```\nfollower-api/\n├── package.json\n├── openapi.yaml\n├── src/\n│ ├── server.js\n│ ├── app.js\n│ ├── config.js\n│ ├── middleware/\n│ │ ├── requestContext.js\n│ │ ├── structuredLogg... | # Nested REST API for Followers — Koa + Structured Logging + Soft Delete + Pagination
## Project Structure
```
follower-api/
├── package.json
├── openapi.yaml
├── src/
│ ├── server.js
│ ├── app.js
│ ├── config.js
│ ├── middleware/
│ │ ├── requestContext.js
│ │ ├── structuredLogger.js
│ │ ├── error... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000753 |
Science | Classical Mechanics | hard | A stick is connected to other parts of a static system by hinges at its ends. Show that (1) if the stick is massless, then the forces it feels at the hinges are directed along the stick, but (2) if the stick is massive, then the forces need not point along the stick. | [
"# Forces on a Hinged Stick in a Static System",
"## Setup",
"Consider a rigid stick of length $L$ with pin-joints (hinges) at ends $A$ and $B$.",
"Each hinge can supply a force in any direction in the plane, but no moment.",
"The stick is part of a larger static (equilibrium) system.",
"Place $A$ at the ... | # Forces on a Hinged Stick in a Static System
## Setup
Consider a rigid stick of length $L$ with pin-joints (hinges) at ends $A$ and $B$. Each hinge can supply a force in any direction in the plane, but no moment. The stick is part of a larger static (equilibrium) system.
Place $A$ at the origin and $B$ at $(L,\,0)$... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000754 |
Science | - | hard | What novel CRISPR‑Cas adaptive immune system variants can be engineered to achieve multiplexed, allele‑specific epigenome editing in vivo, and how might off‑target chromatin remodeling be quantitatively modeled using stochastic thermodynamics? | [
"# Multiplexed, Allele-Specific In Vivo Epigenome Editing and Its Stochastic-Thermodynamic Off-Target Landscape",
"This is a two-pronged frontier question.",
"I'll treat each half in depth, then show how they couple at the modelling interface.",
"---",
"## Part I – Engineered CRISPR–Cas Architectures for Mu... | # Multiplexed, Allele-Specific In Vivo Epigenome Editing and Its Stochastic-Thermodynamic Off-Target Landscape
This is a two-pronged frontier question. I'll treat each half in depth, then show how they couple at the modelling interface.
---
## Part I – Engineered CRISPR–Cas Architectures for Multiplexed, Allele-Spec... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000755 |
Science | - | hard | What are the mechanistic implications of stochastic gene expression noise on the stability of multi‑stable attractor states in coupled intracellular signaling–metabolic networks, and how can bifurcation analysis predict transitions between phenotypic states under varying extracellular nutrient fluxes? | [
"# Stochastic Noise, Multi-Stability, and Bifurcation-Driven Phenotypic Transitions in Coupled Signaling–Metabolic Networks",
"This question sits at the confluence of several active subfields—stochastic systems biology, nonequilibrium thermodynamics of cellular decision-making, and dynamical-systems bifurcation t... | # Stochastic Noise, Multi-Stability, and Bifurcation-Driven Phenotypic Transitions in Coupled Signaling–Metabolic Networks
This question sits at the confluence of several active subfields—stochastic systems biology, nonequilibrium thermodynamics of cellular decision-making, and dynamical-systems bifurcation theory. I ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000756 |
Mathematics | Synthetic Amc | hard | For each integer \( n \geq 2 \), let \( T_n \) be the sum of all products \( jk \), where \( j \) and \( k \) are integers, and \( 1 \leq j < k \leq n \). Determine the sum of the 10 least values of \( n \) such that \( T_n \) is divisible by 5.
A) 55
B) 56
C) 57
D) 58
E) 59 | [
"Looking at this problem, I need to find a formula for $T_n$ and determine when it's divisible by 5.",
"## Deriving the Formula",
"Using the identity $(\\sum j)^2 = \\sum j^2 + 2\\sum_{j<k} jk$:",
"$$T_n = \\frac{\\left(\\frac{n(n+1)}{2}\\right)^2 - \\frac{n(n+1)(2n+1)}{6}}{2} = \\frac{n(n-1)(n+1)(3n+2)}{24}$... | Looking at this problem, I need to find a formula for $T_n$ and determine when it's divisible by 5.
## Deriving the Formula
Using the identity $(\sum j)^2 = \sum j^2 + 2\sum_{j<k} jk$:
$$T_n = \frac{\left(\frac{n(n+1)}{2}\right)^2 - \frac{n(n+1)(2n+1)}{6}}{2} = \frac{n(n-1)(n+1)(3n+2)}{24}$$
**Verification:** $T_2 ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000757 |
Science | - | hard | What are the mechanistic consequences of phase-separated membraneless organelles on the nucleation, propagation, and clearance of misfolded α‑synuclein aggregates in dopaminergic neurons, considering altered proteostasis and intracellular ion homeostasis? | [
"# Phase-Separated Compartments and the α-Synuclein Aggregation Lifecycle in Dopaminergic Neurons",
"This question sits at the confluence of biomolecular condensate physics, misfolded-protein biophysics, and the unique physiology of midbrain and cortical dopaminergic neurons.",
"Below is a mechanistic dissectio... | # Phase-Separated Compartments and the α-Synuclein Aggregation Lifecycle in Dopaminergic Neurons
This question sits at the confluence of biomolecular condensate physics, misfolded-protein biophysics, and the unique physiology of midbrain and cortical dopaminergic neurons. Below is a mechanistic dissection organized al... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000758 |
Mathematics | - | medium | Shrek is on a game show trying to win an autobiography DVD. Initially, there are $5$ doors labeled $1$, $2$, $3$, $4$, and $5$, and the DVD has an $x/15$ chance of being behind door $x$. Shrek picks door $1$. The game show host opens doors $2$ and $4$, revealing that the DVD is not behind either of those doors. If Shre... | [
"# Finding Shrek's Maximum Winning Probability",
"## Setting Up the Prior Probabilities",
"The DVD is behind door $x$ with probability $\\frac{x}{15}$:",
"| Door | 1 | 2 | 3 | 4 | 5 |\n|------|---|---|---|---|---|\n| Probability | $\\frac{1}{15}$ | $\\frac{2}{15}$ | $\\frac{3}{15}$ | $\\frac{4}{15}$ | $\\frac... | # Finding Shrek's Maximum Winning Probability
## Setting Up the Prior Probabilities
The DVD is behind door $x$ with probability $\frac{x}{15}$:
| Door | 1 | 2 | 3 | 4 | 5 |
|------|---|---|---|---|---|
| Probability | $\frac{1}{15}$ | $\frac{2}{15}$ | $\frac{3}{15}$ | $\frac{4}{15}$ | $\frac{5}{15}$ |
These sum to ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000759 |
Science | - | hard | How does the coupling between electron transfer kinetics and nanoscale electric double-layer restructuring influence the overpotential and selectivity in heterogeneous electrocatalytic CO2 reduction under variable ionic strength conditions? | [
"# Coupling of Electron-Transfer Kinetics and Nanoscale Double-Layer Restructuring in CO₂ Reduction",
"This is a question that sits at the intersection of interfacial electrochemistry, continuum-to-atomistic electrocatalysis, and reaction-network selectivity, and the honest answer is that a fully predictive treat... | # Coupling of Electron-Transfer Kinetics and Nanoscale Double-Layer Restructuring in CO₂ Reduction
This is a question that sits at the intersection of interfacial electrochemistry, continuum-to-atomistic electrocatalysis, and reaction-network selectivity, and the honest answer is that a fully predictive treatment does... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000760 |
Programming | - | hard | In a game of chess, Check is a game position in which a player's King is under attack by any of the opponent's pieces.
Bob is playing with Chess pieces. He randomly arranges three pieces on 8x8 chessboard: a black's King , a white's King and any one of the white's Queen, Knight, Bishop or Rook. Positions of these piec... | [
"Looking at this problem, I need to determine if a given white piece (Queen, Knight, Bishop, or Rook) attacks the black King's position, while accounting for the white King potentially blocking the path of sliding pieces.",
"**Key observations:**\n- Knight attacks in an L-shape (no blocking possible)\n- Bishop at... | Looking at this problem, I need to determine if a given white piece (Queen, Knight, Bishop, or Rook) attacks the black King's position, while accounting for the white King potentially blocking the path of sliding pieces.
**Key observations:**
- Knight attacks in an L-shape (no blocking possible)
- Bishop attacks diago... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000761 |
Mathematics | - | medium | Calculate the limit: \[ \lim_{x \to \infty}{\frac{1}{x}\int^{3x}_{x/3}} g(t)\, dt \] where the function \( g: (0, +\infty) \rightarrow \mathbb{R} \) is unbounded, continuous, and has a limit at infinity equal to \( \pi \). | [
"# Calculating the Limit",
"## Setting Up the Key Idea",
"Since $\\lim_{t\\to\\infty}g(t)=\\pi$, for every $\\varepsilon>0$ there exists $M>0$ such that",
"$$|g(t)-\\pi|<\\varepsilon \\qquad \\text{for all } t>M.$$",
"When $x>3M$, the **entire** interval $[x/3,\\,3x]$ satisfies $t>M$, so the bound applies t... | # Calculating the Limit
## Setting Up the Key Idea
Since $\lim_{t\to\infty}g(t)=\pi$, for every $\varepsilon>0$ there exists $M>0$ such that
$$|g(t)-\pi|<\varepsilon \qquad \text{for all } t>M.$$
When $x>3M$, the **entire** interval $[x/3,\,3x]$ satisfies $t>M$, so the bound applies throughout the integration range... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000762 |
Artificial Intelligence | Logic Puzzle | easy | I need to pick up my new prescription from the pharmacy, but my neighbor just called to say he already dropped it off at my house. How many miles do I need to drive to the pharmacy to get my medicine? | [
"You don't need to drive anywhere at all — **zero miles**.",
"Your neighbor already brought the prescription to your house, so your medicine is already right there with you.",
"No trip to the pharmacy is necessary."
] | You don't need to drive anywhere at all — **zero miles**. Your neighbor already brought the prescription to your house, so your medicine is already right there with you. No trip to the pharmacy is necessary. | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000763 |
Programming | - | hard | Build a complete, single-page travel agency homepage website using only HTML, CSS, and vanilla JavaScript (no frameworks). The design should be minimalist and modern. Include: dark/light mode toggle with localStorage persistence; contact form with client-side validation; animated statistics/counters section; sticky nav... | [
"# Wanderlust — Single-Page Travel Agency",
"Here's a complete, production-ready single-file website.",
"Save it as `index.html` and open it in any browser — no build steps, no dependencies.",
"```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" conten... | # Wanderlust — Single-Page Travel Agency
Here's a complete, production-ready single-file website. Save it as `index.html` and open it in any browser — no build steps, no dependencies.
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initia... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000764 |
Mathematics | - | hard | Two given quadratic trinomials $f(x)$ and $g(x)$ each have two roots, and the equalities $f(1)=g(2)$ and $g(1)=f(2)$ hold. Find the sum of all four roots of these trinomials. | [
"# Finding the Sum of All Four Roots",
"## Setting Up the Key Symmetry",
"I'll define the auxiliary polynomial:\n$$h(x) = f(x) - g(3 - x)$$",
"Since both $f$ and $g$ are quadratic, $h(x)$ is at most quadratic.",
"Now I evaluate at specific points using the given conditions:",
"$$h(1) = f(1) - g(3-1) = f(1... | # Finding the Sum of All Four Roots
## Setting Up the Key Symmetry
I'll define the auxiliary polynomial:
$$h(x) = f(x) - g(3 - x)$$
Since both $f$ and $g$ are quadratic, $h(x)$ is at most quadratic. Now I evaluate at specific points using the given conditions:
$$h(1) = f(1) - g(3-1) = f(1) - g(2) = 0$$
$$h(2) = f(2... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000765 |
Mathematics | - | easy | Given that \( x + y = 7 \) and \( x^2 - y^2 = 21 \), find the value of \( 2x + 3y \). | [
"# Finding the Value of 2x + 3y",
"## Setting Up the System",
"We are given:\n- $x + y = 7$\n- $x^2 - y^2 = 21$",
"## Solving for x and y",
"**Factor the difference of squares:**",
"$$x^2 - y^2 = (x+y)(x-y) = 21$$",
"Since $x + y = 7$, substitute:",
"$$7(x - y) = 21 \\implies x - y = 3$$",
"**Now so... | # Finding the Value of 2x + 3y
## Setting Up the System
We are given:
- $x + y = 7$
- $x^2 - y^2 = 21$
## Solving for x and y
**Factor the difference of squares:**
$$x^2 - y^2 = (x+y)(x-y) = 21$$
Since $x + y = 7$, substitute:
$$7(x - y) = 21 \implies x - y = 3$$
**Now solve the linear system:**
$$\begin{cases... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000766 |
Programming | - | easy | Write a program which prints multiplication tables in the following format:
1x1=1
1x2=2
.
.
9x8=72
9x9=81
Input
No input.
Output
1x1=1
1x2=2
.
.
9x8=72
9x9=81
Example
Input
Output
Write Python code to solve the problem. Please place the solution code in the following format:
```python
# Your solution code here
... | [
"```python\nfor i in range(1, 10):\n for j in range(1, 10):\n print(f\"{i}x{j}={i*j}\")\n```",
"This program uses nested loops to iterate through all combinations from 1 to 9 for both the row and column, printing each multiplication in the format `i x j = result` (e.g., `1x1=1`, `9x9=81`)."
] | ```python
for i in range(1, 10):
for j in range(1, 10):
print(f"{i}x{j}={i*j}")
```
This program uses nested loops to iterate through all combinations from 1 to 9 for both the row and column, printing each multiplication in the format `i x j = result` (e.g., `1x1=1`, `9x9=81`). | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000767 |
Programming | - | hard | In this problem, you will implement and test a simple neural network using the numpy library. The neural network will have a single hidden layer and will be trained using a given training dataset. Your task is to complete the class `NeuralNetwork` and implement two methods: `train` and `run`.
The `NeuralNetwork` class... | [
"```python\nimport numpy as np",
"class NeuralNetwork:\n def __init__(self, input_nodes, hidden_nodes, output_nodes, learning_rate):\n self.input_nodes = input_nodes\n self.hidden_nodes = hidden_nodes\n self.output_nodes = output_nodes\n self.learning_rate = learning_rate",
"self.... | ```python
import numpy as np
class NeuralNetwork:
def __init__(self, input_nodes, hidden_nodes, output_nodes, learning_rate):
self.input_nodes = input_nodes
self.hidden_nodes = hidden_nodes
self.output_nodes = output_nodes
self.learning_rate = learning_rate
self.weights_inp... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000768 |
Science | Quantum Chemistry | medium | The function \( \Psi (x, t) \) represents a system in a specified state but is not an eigenfunction of the Hamiltonion operator. Determine the condition under which \( \Psi (x, t) \) represents a stationary state. | [
"# Condition for a Stationary State",
"## Key Definitions",
"A **stationary state** is defined not by the wave function being an eigenfunction of $\\hat{H}$, but by the **probability density being independent of time**.",
"That is the single defining criterion.",
"## Deriving the Condition",
"Write the mo... | # Condition for a Stationary State
## Key Definitions
A **stationary state** is defined not by the wave function being an eigenfunction of $\hat{H}$, but by the **probability density being independent of time**. That is the single defining criterion.
## Deriving the Condition
Write the most general form of a time-d... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000769 |
Science | - | hard | How can machine‑learning‑augmented quantum Monte Carlo methods be optimized to accurately predict reaction pathways and activation barriers for multi‑electron transfer processes in heterogeneous catalytic surfaces under realistic temperature and pressure conditions? | [
"# ML-Augmented Quantum Monte Carlo for Multi-Electron Transfer on Catalytic Surfaces",
"This sits at the convergence of several frontier sub-fields, so I'll work through the problem layer by layer—wavefunction construction, sampling, pathway search, thermodynamic realism, and the practical optimization architect... | # ML-Augmented Quantum Monte Carlo for Multi-Electron Transfer on Catalytic Surfaces
This sits at the convergence of several frontier sub-fields, so I'll work through the problem layer by layer—wavefunction construction, sampling, pathway search, thermodynamic realism, and the practical optimization architecture that ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000770 |
Programming | Python | medium | Akash singh is a student of Mathematics at Geekland University. These days he is busy with his girlfriend Jassi. On the other hand, Jassi don't like mathematics that much. One day, Jassi decided to find all the strings of length N (comprising only of characters from '0' to '9') having odd number of 0's.
For Example: 10... | [
"# Solution",
"## Analysis",
"I need to count strings of length N (digits 0-9) with an **odd** number of 0's.",
"**Setting up the recurrence:**\n- Let `b_n` = number of strings of length n with odd number of 0's\n- Let `a_n` = number of strings of length n with even number of 0's",
"Building a string of len... | # Solution
## Analysis
I need to count strings of length N (digits 0-9) with an **odd** number of 0's.
**Setting up the recurrence:**
- Let `b_n` = number of strings of length n with odd number of 0's
- Let `a_n` = number of strings of length n with even number of 0's
Building a string of length n+1:
- Odd zeros: (... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000771 |
Science | Physics | medium | Suppose all cars on a (single-lane) highway are identical. Their length is $l=4 \mathrm{~m}$, their wheels have coefficients of friction $\mu=0.7$, and they all travel at speed $v_{0}$. Find the $v_{0}$ which maximizes the flow rate of cars (i.e. how many cars travel across an imaginary line per minute). Assume that th... | [
"# Maximizing Traffic Flow on a Single-Lane Highway",
"## Setting Up the Spacing Constraint",
"When the leading car stops instantaneously, the following car must brake at maximum deceleration",
"$$a_{\\max} = \\mu\\, g$$",
"Since reaction time is neglected, the **stopping distance** is",
"$$d_{\\text{stop... | # Maximizing Traffic Flow on a Single-Lane Highway
## Setting Up the Spacing Constraint
When the leading car stops instantaneously, the following car must brake at maximum deceleration
$$a_{\max} = \mu\, g$$
Since reaction time is neglected, the **stopping distance** is
$$d_{\text{stop}} = \frac{v_0^2}{2\mu g}$$
... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000772 |
Programming | - | hard | Build a complete, single-page real estate listing page website using only HTML, CSS, and vanilla JavaScript (no frameworks). The design should be retro-inspired. Include: responsive mobile-first layout using CSS Grid; contact form with client-side validation; sticky navigation bar with smooth-scroll anchor links; tabbe... | [
"# Retro Real Estate Listing Page",
"A complete, single-file website with vintage 1970s design sensibilities.",
"Save as `index.html` and open in a browser.",
"```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scal... | # Retro Real Estate Listing Page
A complete, single-file website with vintage 1970s design sensibilities. Save as `index.html` and open in a browser.
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="descript... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000773 |
Mathematics | - | hard | a) There are two ropes. If either of them is lit at one end, it will burn for an hour. The ropes burn unevenly. For example, it cannot be guaranteed that half of the rope will burn in 30 minutes. How can you measure a 15-minute interval using two such ropes?
b) How many time intervals (including the zeroth) can be mea... | [
"# Burning Ropes Problem",
"## Part (a): Measuring 15 Minutes with Two Ropes",
"The key property: if you light a rope at **both ends simultaneously**, it burns out in exactly **30 minutes** (the two flames must meet at the point that divides the total 60 minutes of burn-time in half, regardless of unevenness)."... | # Burning Ropes Problem
## Part (a): Measuring 15 Minutes with Two Ropes
The key property: if you light a rope at **both ends simultaneously**, it burns out in exactly **30 minutes** (the two flames must meet at the point that divides the total 60 minutes of burn-time in half, regardless of unevenness).
**Procedure:... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000774 |
Programming | - | hard | Implement a Fenwick tree (Binary Indexed Tree) for prefix sums with point updates in Java. Include comprehensive test cases. | [
"# Fenwick Tree (Binary Indexed Tree) in Java",
"## Implementation",
"```java\n/**\n * Fenwick Tree (Binary Indexed Tree) supporting:\n * - Point updates: add a delta to a single position\n * - Prefix queries: sum of elements from index 1 to index i\n * - Range queries: sum of elements in [l, r]\n *\n *... | # Fenwick Tree (Binary Indexed Tree) in Java
## Implementation
```java
/**
* Fenwick Tree (Binary Indexed Tree) supporting:
* - Point updates: add a delta to a single position
* - Prefix queries: sum of elements from index 1 to index i
* - Range queries: sum of elements in [l, r]
*
* All operations run ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000775 |
Programming | - | hard | Create a file duplicate finder using SHA-256 content hashing with interactive delete prompt as a Python CLI utility. Support --dry-run and --verbose flags. Include argument validation and helpful error messages. | [
"```python\n#!/usr/bin/env python3\n\"\"\"\ndupfinder – Find and remove duplicate files by SHA-256 content hash.",
"Usage:\n python dupfinder.py /path/to/dir [more paths...] [options]",
"Examples:\n python dupfinder.py ~/Downloads --dry-run\n python dupfinder.py ./photos ./backups -v\n python dupfin... | ```python
#!/usr/bin/env python3
"""
dupfinder – Find and remove duplicate files by SHA-256 content hash.
Usage:
python dupfinder.py /path/to/dir [more paths...] [options]
Examples:
python dupfinder.py ~/Downloads --dry-run
python dupfinder.py ./photos ./backups -v
python dupfinder.py file1.bin file2.... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000776 |
Programming | - | hard | Show the Mediator design pattern in Ruby in the context of a real-world e-commerce scenario. Explain when and why you would use this pattern, and when you would not. | [
"# The Mediator Pattern in Ruby: E-Commerce Order Processing",
"## The Problem",
"Imagine an e-commerce order lifecycle.",
"When a customer places an order, several subsystems must coordinate:",
"- **FraudDetection** – screen the order before anything happens\n- **PaymentGateway** – authorize and capture th... | # The Mediator Pattern in Ruby: E-Commerce Order Processing
## The Problem
Imagine an e-commerce order lifecycle. When a customer places an order, several subsystems must coordinate:
- **FraudDetection** – screen the order before anything happens
- **PaymentGateway** – authorize and capture the charge
- **Inventory*... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000777 |
Programming | - | hard | Refactor the following C# code smell: a C# class with 1407 lines doing data fetching, transformation, caching, validation, and UI rendering — a clear God Object. Apply replace magic values with typed enumerations and value objects. Show a clear before-and-after and explain each improvement and its benefit. | [
"# Refactoring a C# God Object: From Monolith to Value-Driven Design",
"## The Problem",
"A single `ProductManager` class (1,407 lines) handles data fetching, transformation, caching, validation, and UI rendering.",
"Pervasive magic values (`0`, `1`, `2`, `300`, `\"US\"`, `0.15`, `5000`, …) make the code unre... | # Refactoring a C# God Object: From Monolith to Value-Driven Design
## The Problem
A single `ProductManager` class (1,407 lines) handles data fetching, transformation, caching, validation, and UI rendering. Pervasive magic values (`0`, `1`, `2`, `300`, `"US"`, `0.15`, `5000`, …) make the code unreadable, fragile, and... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000778 |
Programming | - | hard | Build a complete, single-page digital products marketplace website using only HTML, CSS, and vanilla JavaScript (no frameworks). The design should be playful and vibrant. Include: accessible ARIA labels and semantic HTML5 landmark elements; FAQ accordion with smooth expand/collapse; animated statistics/counters section... | [
"# Pixel Market — Digital Products Marketplace",
"Here's a complete, production-quality single-file marketplace.",
"Save it as `index.html` and open in any browser.",
"```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, in... | # Pixel Market — Digital Products Marketplace
Here's a complete, production-quality single-file marketplace. Save it as `index.html` and open in any browser.
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta na... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000779 |
Artificial Intelligence | Logic Puzzle | easy | The sun is setting in the west and a man is standing facing north, casting a long shadow. In which direction is his shadow pointing? | [
"## The shadow points **east**.",
"Here's the reasoning:",
"- The **sun** is in the **west** (it's setting).\n- A shadow is always cast in the direction **opposite** the light source.\n- Since the light is coming *from* the west, the shadow stretches *away* from the west → **east**.",
"The fact that the man i... | ## The shadow points **east**.
Here's the reasoning:
- The **sun** is in the **west** (it's setting).
- A shadow is always cast in the direction **opposite** the light source.
- Since the light is coming *from* the west, the shadow stretches *away* from the west → **east**.
The fact that the man is facing north is a... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000780 |
Programming | - | hard | Write a code to generate all possible binary strings of length N, where N is an input parameter. Additionally, ensure that each binary string contains an equal number of 0s and 1s. The code should be optimized to minimize time complexity and should handle cases where N is a large number efficiently. | [
"# Generating Balanced Binary Strings (Equal 0s and 1s)",
"## Key Insight",
"A binary string of length `N` has equal 0s and 1s **only if N is even**.",
"In that case, we need exactly `N/2` zeros and `N/2` ones.",
"The total count of such strings is **C(N, N/2)**.",
"## Solution (Python)",
"```python\nde... | # Generating Balanced Binary Strings (Equal 0s and 1s)
## Key Insight
A binary string of length `N` has equal 0s and 1s **only if N is even**. In that case, we need exactly `N/2` zeros and `N/2` ones. The total count of such strings is **C(N, N/2)**.
## Solution (Python)
```python
def generate_balanced_binary_strin... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000781 |
Mathematics | - | medium | Example 8 Find the largest positive integer $x$, such that for every positive integer $y$, $x$ divides $7^{y}+12 y-1$.
---
The translation maintains the original text's format and line breaks as requested. | [
"# Finding the Largest $x$ Such That $x \\mid 7^y + 12y - 1$ for All Positive Integers $y$",
"## Setting Up Constraints from Specific Values",
"Since $x$ must divide $7^y + 12y - 1$ for **every** positive integer $y$, I can plug in specific values:",
"| $y$ | $7^y + 12y - 1$ | Constraint |\n|-----|-----------... | # Finding the Largest $x$ Such That $x \mid 7^y + 12y - 1$ for All Positive Integers $y$
## Setting Up Constraints from Specific Values
Since $x$ must divide $7^y + 12y - 1$ for **every** positive integer $y$, I can plug in specific values:
| $y$ | $7^y + 12y - 1$ | Constraint |
|-----|-----------------|------------... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000782 |
Artificial Intelligence | Logic Puzzle | easy | Six gears are linked in a line: gear A turns B, B turns C, C turns D, D turns E, and E turns F. If gear A rotates clockwise, which direction does gear F turn? | [
"## Gear F turns **counterclockwise**.",
"Here's why: each pair of meshed gears rotates in **opposite** directions.",
"Tracing the chain:",
"| Gear | Direction |\n|------|-----------|\n| A | Clockwise (given) |\n| B | Counterclockwise |\n| C | Clockwise |\n| D | Counterclockwise |\n| E | Clockwise |\n| **F** ... | ## Gear F turns **counterclockwise**.
Here's why: each pair of meshed gears rotates in **opposite** directions. Tracing the chain:
| Gear | Direction |
|------|-----------|
| A | Clockwise (given) |
| B | Counterclockwise |
| C | Clockwise |
| D | Counterclockwise |
| E | Clockwise |
| **F** | **Counterclockwise** |
... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000783 |
Programming | Python | hard | Farmer John has a farm that consists of $n$ pastures connected by one-directional roads. Each road has a weight, representing the time it takes to go from the start to the end of the road. The roads could have negative weight, where the cows go so fast that they go back in time! However, Farmer John guarantees that it ... | [
"Looking at this problem, I need to find the minimum total edge weight of a directed graph consistent with given shortest distances from node 1.",
"**Key Insights:**",
"1. **Edge weight constraint:** For any edge $(u,v)$, we need $d_v \\leq d_u + w$, so $w \\geq d_v - d_u$.",
"To minimize, set $w = d_v - d_u$... | Looking at this problem, I need to find the minimum total edge weight of a directed graph consistent with given shortest distances from node 1.
**Key Insights:**
1. **Edge weight constraint:** For any edge $(u,v)$, we need $d_v \leq d_u + w$, so $w \geq d_v - d_u$. To minimize, set $w = d_v - d_u$.
2. **No negative ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000784 |
Programming | - | hard | Walk through a system design for a live online auction platform. Key constraints: real-time bid broadcast via WebSockets to 5K concurrent viewers; anti-sniping (auction time extension on last-second bids). Cover: database choice and justification, functional and non-functional requirements, API design, failure modes an... | [
"# Live Online Auction Platform — System Design Walkthrough",
"---",
"## 1.",
"Requirements",
"### 1.1 Functional Requirements",
"| ID | Requirement |\n|---|---|\n| F1 | Users can create, list, and manage auction items (images, reserve, duration). |\n| F2 | Authenticated bidders can place a bid; the syste... | # Live Online Auction Platform — System Design Walkthrough
---
## 1. Requirements
### 1.1 Functional Requirements
| ID | Requirement |
|---|---|
| F1 | Users can create, list, and manage auction items (images, reserve, duration). |
| F2 | Authenticated bidders can place a bid; the system validates it exceeds the cu... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000785 |
Mathematics | - | easy | How many ordered pairs \((m, n)\) of positive integers are solutions to the equation \(\frac{4}{m} + \frac{2}{n} = 1\)? | [
"# Finding Ordered Pairs (m, n) for $\\frac{4}{m} + \\frac{2}{n} = 1$",
"## Setting Up the Equation",
"Starting with the given equation and multiplying both sides by $mn$:",
"$$4n + 2m = mn$$",
"Rearranging:",
"$$mn - 2m - 4n = 0$$",
"## Applying Simon's Favorite Factoring Trick",
"Add 8 to both sides... | # Finding Ordered Pairs (m, n) for $\frac{4}{m} + \frac{2}{n} = 1$
## Setting Up the Equation
Starting with the given equation and multiplying both sides by $mn$:
$$4n + 2m = mn$$
Rearranging:
$$mn - 2m - 4n = 0$$
## Applying Simon's Favorite Factoring Trick
Add 8 to both sides to make the left side factorable:
... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000786 |
Science | - | hard | How does the inclusion of higher‑order curvature corrections in the effective action of string‑inspired quantum gravity modify the renormalization group flow of the cosmological constant and impact the emergence of de Sitter vacua at Planckian scales? | [
"# Higher-Order Curvature Corrections, RG Flow, and Planckian de Sitter Vacua",
"## 1.",
"The Modified Effective Action",
"The low-energy (worldsheet-α′) effective action in four dimensions, after Weyl-rescaling to the Einstein frame and suppressing dilaton and matter couplings for clarity, takes the schemati... | # Higher-Order Curvature Corrections, RG Flow, and Planckian de Sitter Vacua
## 1. The Modified Effective Action
The low-energy (worldsheet-α′) effective action in four dimensions, after Weyl-rescaling to the Einstein frame and suppressing dilaton and matter couplings for clarity, takes the schematic form
$$
S_{\tex... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000787 |
Mathematics | - | medium | Determine the position of point \( T \) (Torricelli's point) inside triangle \( ABC \) such that \( \angle A, \angle B, \angle C < 90^\circ \) and \( TA + TB + TC \) is minimized. | [
"# Torricelli's (Fermat) Point",
"## Characterizing Property",
"The point $T$ inside $\\triangle ABC$ that minimises $TA+TB+TC$ is the **unique** interior point satisfying",
"$$\\angle ATB = \\angle BTC = \\angle CTA = 120^\\circ.$$",
"Because every angle of $\\triangle ABC$ is $<90°<120°$, this point is gu... | # Torricelli's (Fermat) Point
## Characterizing Property
The point $T$ inside $\triangle ABC$ that minimises $TA+TB+TC$ is the **unique** interior point satisfying
$$\angle ATB = \angle BTC = \angle CTA = 120^\circ.$$
Because every angle of $\triangle ABC$ is $<90°<120°$, this point is guaranteed to lie **strictly ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000788 |
Programming | - | hard | Write a Kotlin program that implements a parallel prefix-sum (scan) over an array of 5,907,548 integers. Demonstrate correct use of locks/channels/atomics and explain your approach to avoiding data races. | [
"# Parallel Prefix-Sum (Scan) in Kotlin",
"## Approach Overview",
"The scan is parallelised using **Blelloch's divide-and-conquer** adapted to a fixed number of worker coroutines:",
"| Phase | Work | Concurrency |\n|-------|------|-------------|\n| 1 – *local up-sweep* | Each worker computes an inclusive pref... | # Parallel Prefix-Sum (Scan) in Kotlin
## Approach Overview
The scan is parallelised using **Blelloch's divide-and-conquer** adapted to a fixed number of worker coroutines:
| Phase | Work | Concurrency |
|-------|------|-------------|
| 1 – *local up-sweep* | Each worker computes an inclusive prefix-sum over its con... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000789 |
Programming | - | medium | Write a MySQL statement to select the first 5 customers in the 'customers' table, ordered by the date they made their first purchase, in descending order. | [
"## MySQL Statement",
"Assuming the `customers` table has a column that stores each customer's first purchase date (e.g., `first_purchase_date`):",
"```sql\nSELECT *\nFROM customers\nORDER BY first_purchase_date DESC\nLIMIT 5;\n```",
"### Breakdown",
"| Clause | Purpose |\n|---|---|\n| `SELECT *` | Retrieve... | ## MySQL Statement
Assuming the `customers` table has a column that stores each customer's first purchase date (e.g., `first_purchase_date`):
```sql
SELECT *
FROM customers
ORDER BY first_purchase_date DESC
LIMIT 5;
```
### Breakdown
| Clause | Purpose |
|---|---|
| `SELECT *` | Retrieve all columns for each custom... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000790 |
Programming | - | hard | Implement a concurrent web scraper that fetches 95 URLs using a semaphore-limited goroutine/thread pool in Kotlin. Handle synchronization, race conditions, and deadlock prevention. | [
"# Concurrent Web Scraper in Kotlin (Semaphore-Limited Coroutine Pool)",
"## Architecture Overview",
"```\n┌─────────────────────────────────────────────────────────────────┐\n│ Main Coroutine │\n│ ┌───────────────────────────────────────────────────────────┐ │... | # Concurrent Web Scraper in Kotlin (Semaphore-Limited Coroutine Pool)
## Architecture Overview
```
┌─────────────────────────────────────────────────────────────────┐
│ Main Coroutine │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000791 |
Mathematics | - | medium | Given $\sin \left(\theta- \frac {\pi}{3}\right)= \frac {1}{3}$, then $\sin \left(\theta+ \frac {2\pi}{3}\right)=$ ______, $\cos \left(\theta- \frac {5\pi}{6}\right)=$ ______. | [
"# Finding the Two Trigonometric Expressions",
"## Setting Up a Substitution",
"Let $\\alpha = \\theta - \\dfrac{\\pi}{3}$, so that $\\sin\\alpha = \\dfrac{1}{3}$.",
"Then $\\theta = \\alpha + \\dfrac{\\pi}{3}$.",
"## First Blank: $\\sin\\!\\left(\\theta + \\dfrac{2\\pi}{3}\\right)$",
"$$\\theta + \\frac{... | # Finding the Two Trigonometric Expressions
## Setting Up a Substitution
Let $\alpha = \theta - \dfrac{\pi}{3}$, so that $\sin\alpha = \dfrac{1}{3}$.
Then $\theta = \alpha + \dfrac{\pi}{3}$.
## First Blank: $\sin\!\left(\theta + \dfrac{2\pi}{3}\right)$
$$\theta + \frac{2\pi}{3} = \left(\alpha + \frac{\pi}{3}\right... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000792 |
Mathematics | - | medium | If $-3 \le x < \frac{3}{2}$ and $x \ne 1$, define $C(x) = \frac{x^3}{1 - x}$. The real root of the cubic $2x^3 + 3x - 7$ is of the form $p C^{-1}(q)$, where $p$ and $q$ are rational numbers. What is the ordered pair $(p, q)$? | [
"# Finding $(p, q)$ for the Root of $2x^3 + 3x - 7$",
"## Setting Up the Inverse",
"Given $C(x) = \\frac{x^3}{1-x}$, I need to characterize $C^{-1}(q)$.",
"Setting $y = C(x)$:",
"$$y(1-x) = x^3 \\implies x^3 + yx - y = 0$$",
"So $t = C^{-1}(q)$ satisfies:\n$$t^3 + qt - q = 0$$",
"## Substituting the For... | # Finding $(p, q)$ for the Root of $2x^3 + 3x - 7$
## Setting Up the Inverse
Given $C(x) = \frac{x^3}{1-x}$, I need to characterize $C^{-1}(q)$. Setting $y = C(x)$:
$$y(1-x) = x^3 \implies x^3 + yx - y = 0$$
So $t = C^{-1}(q)$ satisfies:
$$t^3 + qt - q = 0$$
## Substituting the Form $x = p \cdot t$
The root $x = ... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000793 |
Artificial Intelligence | Logic Puzzle | medium | A person was born on February 29, 2024. How many birthdays will they have celebrated by January 1, 2032? | [
"## Answer: **1**",
"This is a classic trick question that hinges on the date **February 29**.",
"A person born on February 29 is a *leap-year baby*, and their actual birthday only exists in leap years (every 4 years).",
"Between their birth (Feb 29, 2024) and January 1, 2032, the only leap year is **2028**."... | ## Answer: **1**
This is a classic trick question that hinges on the date **February 29**.
A person born on February 29 is a *leap-year baby*, and their actual birthday only exists in leap years (every 4 years).
Between their birth (Feb 29, 2024) and January 1, 2032, the only leap year is **2028**.
| Year | Leap Ye... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000794 |
Artificial Intelligence | Logic Puzzle | easy | I currently have 3 apples. If I had 20 apples and gave 5 to a friend, how many apples do I have now? | [
"You have **3 apples**.",
"The \"if I had 20 apples and gave 5 away\" part is a hypothetical — it didn't actually happen.",
"Your actual, current situation is the one stated at the start: you have 3 apples."
] | You have **3 apples**.
The "if I had 20 apples and gave 5 away" part is a hypothetical — it didn't actually happen. Your actual, current situation is the one stated at the start: you have 3 apples. | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000795 |
Programming | - | hard | Develop a Python script that employs the method "get_name" to query the end-user for their comprehensive legal identity, and then uses a method "validate_name" to check the entered name against a given list of patterns or regular expressions for valid names. After this, it should echo the name back to the user only if ... | [
"# Python Name Validation Script — Analysis, Fix, and Tests",
"## Flaw Analysis of the Provided Code",
"```python\ndef get_name():\n name = input(\"Enter your name: \")\n print(\"Your name is\", name)",
"get_name()\n```",
"| # | Flaw | Impact |\n|---|------|--------|\n| 1 | **No validation** | Any inp... | # Python Name Validation Script — Analysis, Fix, and Tests
## Flaw Analysis of the Provided Code
```python
def get_name():
name = input("Enter your name: ")
print("Your name is", name)
get_name()
```
| # | Flaw | Impact |
|---|------|--------|
| 1 | **No validation** | Any input (e.g. `12345`, `!@#$`) is ac... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000796 |
Programming | - | hard | Implement a production-ready REST API for managing tags with Ruby on Rails (Ruby). Include: pagination, cursor-based pagination, filtering by field, database transactions, search / full-text query, structured logging. Show the database schema and migration files. | [
"# Production-Ready Tags REST API — Ruby on Rails",
"## Architecture Overview",
"```\napp/\n├── controllers/\n│ ├── concerns/\n│ │ └── paginatable.rb\n│ └── api/v1/\n│ ├── base_controller.rb\n│ └── tags_controller.rb\n├── services/\n│ ├── tags/\n│ │ ├── list_tags.rb\n│ │ ├── create... | # Production-Ready Tags REST API — Ruby on Rails
## Architecture Overview
```
app/
├── controllers/
│ ├── concerns/
│ │ └── paginatable.rb
│ └── api/v1/
│ ├── base_controller.rb
│ └── tags_controller.rb
├── services/
│ ├── tags/
│ │ ├── list_tags.rb
│ │ ├── create_tag.rb
│ │ ├── upda... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000797 |
Programming | - | hard | Write a code snippet to query the Internet Movie Database for the release dates of all movies directed by Christopher Nolan, ensuring that the code is asynchronous and uses a callback function to handle the response. Additionally, the code should handle any potential errors that may occur during the API request and pro... | [
"# Querying IMDb for Christopher Nolan's Movies (Async + Callback + Pagination)",
"Below is a Node.js solution that queries the **OMDb API** (a widely-used third-party API that serves IMDb data) to retrieve release dates for all movies directed by Christopher Nolan.",
"It uses an **asynchronous callback pattern... | # Querying IMDb for Christopher Nolan's Movies (Async + Callback + Pagination)
Below is a Node.js solution that queries the **OMDb API** (a widely-used third-party API that serves IMDb data) to retrieve release dates for all movies directed by Christopher Nolan. It uses an **asynchronous callback pattern**, implements... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000798 |
Science | - | hard | What are the mechanistic pathways linking deep mantle redox gradients to the isotopic fractionation of sulfur and iron during subduction, and how can coupled thermodynamic–kinetic models reconcile observed mantle plume geochemistry with high-pressure experimental constraints? | [
"# Redox-Driven Isotope Fractionation of S and Fe During Subduction: Mechanisms and Modelling",
"## 1.",
"The Redox-Gradient Landscape",
"The critical premise is that the mantle is not redox-homogeneous.",
"Conventional estimates place the upper-mantle buffer near fayalite–magnetite–quartz (QFM) to QFM + 1,... | # Redox-Driven Isotope Fractionation of S and Fe During Subduction: Mechanisms and Modelling
## 1. The Redox-Gradient Landscape
The critical premise is that the mantle is not redox-homogeneous. Conventional estimates place the upper-mantle buffer near fayalite–magnetite–quartz (QFM) to QFM + 1, but the geometry chang... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000799 |
Mathematics | - | hard | Let $A B C D$ be a square and $E$ a point on the segment $[B D]$ such that $E B=A B$. We define the point $F$ as the intersection of the lines $(C E)$ and $(A D)$. Find the value of the angle $\widehat{F E A}$. | [
"# Finding Angle $\\widehat{FEA}$",
"## Setting Up Coordinates",
"I'll place the unit square as:\n$$A = (0,0),\\quad B = (1,0),\\quad C = (1,1),\\quad D = (0,1)$$",
"**Finding $E$:** Diagonal $BD$ runs from $(1,0)$ to $(0,1)$ with length $\\sqrt{2}$.",
"Since $EB = AB = 1$, point $E$ lies at distance 1 from... | # Finding Angle $\widehat{FEA}$
## Setting Up Coordinates
I'll place the unit square as:
$$A = (0,0),\quad B = (1,0),\quad C = (1,1),\quad D = (0,1)$$
**Finding $E$:** Diagonal $BD$ runs from $(1,0)$ to $(0,1)$ with length $\sqrt{2}$. Since $EB = AB = 1$, point $E$ lies at distance 1 from $B$ along $BD$:
$$E = B + \... | Review the intermediate steps and independently check the final result against the question. | Skipping an assumption or accepting the final result without an independent check. | the-forge-000800 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.