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 digital virus doubles its size every 15 minutes. If the server is completely full at 4:00 PM, at what time was it exactly 25% full? | [
"## Finding When the Server Was 25% Full",
"Since the virus **doubles** every 15 minutes, we can work **backwards** from 4:00 PM by **halving** each step:",
"| Time | Fullness |\n|---|---|\n| **4:00 PM** | 100% |\n| 3:45 PM (−15 min) | 50% |\n| **3:30 PM (−30 min)** | **25%** |",
"Each step back in time, the ... | ## Finding When the Server Was 25% Full
Since the virus **doubles** every 15 minutes, we can work **backwards** from 4:00 PM by **halving** each step:
| Time | Fullness |
|---|---|
| **4:00 PM** | 100% |
| 3:45 PM (−15 min) | 50% |
| **3:30 PM (−30 min)** | **25%** |
Each step back in time, the size is half of what ... | 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-000601 |
Science | - | hard | What are the mechanistic links between deep mantle phase transitions of post‑perovskite, anisotropic seismic attenuation, and the generation of observed ultra‑low velocity zones beneath subduction slabs? | [
"# Post-Perovskite, Anisotropic Attenuation, and ULVZs at Subduction-Slab CMB Interfaces",
"This is a question that sits at the intersection of mineral physics, seismic mineralogy, and deep mantle convection, and the honest answer is that the mechanistic chain you are asking about is only partially resolved.",
... | # Post-Perovskite, Anisotropic Attenuation, and ULVZs at Subduction-Slab CMB Interfaces
This is a question that sits at the intersection of mineral physics, seismic mineralogy, and deep mantle convection, and the honest answer is that the mechanistic chain you are asking about is only partially resolved. Some links ar... | 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-000602 |
Artificial Intelligence | Logic Puzzle | easy | The recipe requires three eggs and a cup of sugar, but you must not include salt for the cake to remain sweet. If I mixed in a teaspoon of salt, did I follow the instructions correctly? | [
"No, you did not follow the instructions correctly.",
"The recipe explicitly states that you **must not** include salt in order for the cake to remain sweet.",
"By mixing in a teaspoon of salt, you directly violated that instruction.",
"Whether or not the cake actually turns out differently, the instruction w... | No, you did not follow the instructions correctly. The recipe explicitly states that you **must not** include salt in order for the cake to remain sweet. By mixing in a teaspoon of salt, you directly violated that instruction. Whether or not the cake actually turns out differently, the instruction was clear: no salt. 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-000603 |
Mathematics | - | medium | $$
\begin{array}{l}
\text { Three. (25 points) Given the quadratic function } \\
y=a x^{2}+b x+c(a<b)
\end{array}
$$
the graph is always above or on the $x$-axis, and $m<\frac{a+b+c}{b-a}$ always holds. Find the range of values for $m$. | [
"# Finding the Range of $m$",
"## Setting Up the Constraints",
"Since $y = ax^2 + bx + c \\geq 0$ for all $x$, I need:\n- $a > 0$ (parabola opens upward)\n- $b^2 - 4ac \\leq 0 \\implies c \\geq \\dfrac{b^2}{4a}$",
"The condition $a < b$ (with $a > 0$) gives $b > a > 0$.",
"## Reducing to a Single Variable",... | # Finding the Range of $m$
## Setting Up the Constraints
Since $y = ax^2 + bx + c \geq 0$ for all $x$, I need:
- $a > 0$ (parabola opens upward)
- $b^2 - 4ac \leq 0 \implies c \geq \dfrac{b^2}{4a}$
The condition $a < b$ (with $a > 0$) gives $b > a > 0$.
## Reducing to a Single Variable
Since $c \geq \dfrac{b^2}{4a... | 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-000604 |
Programming | Python | hard | Alice and Bob love playing one-dimensional battle ships. They play on the field in the form of a line consisting of n square cells (that is, on a 1 × n table).
At the beginning of the game Alice puts k ships on the field without telling their positions to Bob. Each ship looks as a 1 × a rectangle (that is, it occupies... | [
"Looking at this problem, I need to find the first shot after which it's impossible to place k ships of size `a` on the field (with no touching) while treating all shot cells as empty.",
"**Key Insight:** After blocking some cells, the remaining cells form contiguous segments.",
"In a segment of length `L`, the... | Looking at this problem, I need to find the first shot after which it's impossible to place k ships of size `a` on the field (with no touching) while treating all shot cells as empty.
**Key Insight:** After blocking some cells, the remaining cells form contiguous segments. In a segment of length `L`, the maximum numbe... | 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-000605 |
Programming | - | hard | can you write a script that audits my npm packages for unused dependencies | [
"# Unused Dependency Auditor",
"Here's a self-contained Node.js script (zero external deps) you can drop into your project and run with `node audit-deps.js`.",
"```js\n#!/usr/bin/env node\n/**\n * audit-deps.js\n * Scans your source files for require/import usage and\n * reports dependencies declared in package... | # Unused Dependency Auditor
Here's a self-contained Node.js script (zero external deps) you can drop into your project and run with `node audit-deps.js`.
```js
#!/usr/bin/env node
/**
* audit-deps.js
* Scans your source files for require/import usage and
* reports dependencies declared in package.json that are nev... | 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-000606 |
Mathematics | - | medium | ## Problem Statement
Find the derivative.
$$
y=\frac{(1+x) \operatorname{arctg} \sqrt{x}}{x^{2}}+\frac{1}{3 x \sqrt{x}}
$$ | [
"# Finding the Derivative",
"## Setting Up the Derivative",
"I'll differentiate each term separately.",
"Write the function as:",
"$$y = \\frac{(1+x)\\arctan\\sqrt{x}}{x^2} + \\frac{1}{3}\\,x^{-3/2}$$",
"## First Term (Quotient Rule)",
"Let $u=(1+x)\\arctan\\sqrt{x}$ and $v=x^2$.",
"First I need $u'$:... | # Finding the Derivative
## Setting Up the Derivative
I'll differentiate each term separately. Write the function as:
$$y = \frac{(1+x)\arctan\sqrt{x}}{x^2} + \frac{1}{3}\,x^{-3/2}$$
## First Term (Quotient Rule)
Let $u=(1+x)\arctan\sqrt{x}$ and $v=x^2$. First I need $u'$:
$$u' = \arctan\sqrt{x} + (1+x)\cdot\frac... | 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-000607 |
Artificial Intelligence | Logic Puzzle | medium | Sarah is standing in front of a mirror holding a red rose in her left hand and a blue ribbon in her right hand. If she waves her right hand, which hand is the reflection waving? | [
"## The Reflection Waves Its **Left** Hand",
"When Sarah waves her **right** hand (the one holding the blue ribbon), her mirror image waves the hand on the **same side** of the mirror — the right side from Sarah's point of view.",
"But if you imagine the reflection as a person facing you, that hand is *its* **l... | ## The Reflection Waves Its **Left** Hand
When Sarah waves her **right** hand (the one holding the blue ribbon), her mirror image waves the hand on the **same side** of the mirror — the right side from Sarah's point of view. But if you imagine the reflection as a person facing you, that hand is *its* **left hand**.
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-000608 |
Mathematics | - | medium | Given a regular tetrahedron $P{-}{ABC}$ with edge length $a$, let $O$ be the center of the circumscribed sphere of the tetrahedron. A plane parallel to the base ${ABC}$ and passing through point $O$ intersects the tetrahedron, forming a triangular pyramid $P{-}A_{1}B_{1}C_{1}$ and a triangular prism ${ABC}{-}A_{1}B_{1}... | [
"# Circumscribed Sphere of the Smaller Tetrahedron",
"## Setting Up Key Measurements",
"For a regular tetrahedron $P$-$ABC$ with edge length $a$:",
"**Height:**\n$$h = \\sqrt{a^2 - \\left(\\frac{a}{\\sqrt{3}}\\right)^2} = \\frac{a\\sqrt{6}}{3}$$",
"**Circumradius of the original tetrahedron:**\n$$R = \\frac... | # Circumscribed Sphere of the Smaller Tetrahedron
## Setting Up Key Measurements
For a regular tetrahedron $P$-$ABC$ with edge length $a$:
**Height:**
$$h = \sqrt{a^2 - \left(\frac{a}{\sqrt{3}}\right)^2} = \frac{a\sqrt{6}}{3}$$
**Circumradius of the original tetrahedron:**
$$R = \frac{a\sqrt{6}}{4}$$
**Location 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-000609 |
Mathematics | - | medium | Example: Given $\overrightarrow{O A}=(4,3)$, the graph of the function $y=x^{2}+b x+c$ is translated by the vector $\overrightarrow{O A}$ to obtain a graph that is tangent to the line $4 x+y-8=0$ at point $T(1,4)$. Find the original function's equation. | [
"# Finding the Original Function's Equation",
"## Setting Up the Translated Graph",
"A translation by vector $(4,3)$ sends every point $(x,y)\\to(x+4,\\,y+3)$.",
"So the translated graph of $y=x^2+bx+c$ is obtained by replacing $x\\to x-4$ and $y\\to y-3$:",
"$$y = (x-4)^2 + b(x-4) + c + 3$$",
"## Applyin... | # Finding the Original Function's Equation
## Setting Up the Translated Graph
A translation by vector $(4,3)$ sends every point $(x,y)\to(x+4,\,y+3)$. So the translated graph of $y=x^2+bx+c$ is obtained by replacing $x\to x-4$ and $y\to y-3$:
$$y = (x-4)^2 + b(x-4) + c + 3$$
## Applying the Tangency Conditions at $... | 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-000610 |
Artificial Intelligence | Logic Puzzle | easy | How many 's' letters are in the sentence 'six small snakes slid slowly sideways'? | [
"Let me count each 's' in the sentence **\"six small snakes slid slowly sideways\"**:",
"| Word | 's' count |\n|------|-----------|\n| **s**ix | 1 |\n| **s**mall | 1 |\n| **s**nake**s** | 2 |\n| **s**lid | 1 |\n| **s**lowly | 1 |\n| **s**idewa**y**s → **s**ideawa**ys** | 2 |",
"**Total: 8**"
] | Let me count each 's' in the sentence **"six small snakes slid slowly sideways"**:
| Word | 's' count |
|------|-----------|
| **s**ix | 1 |
| **s**mall | 1 |
| **s**nake**s** | 2 |
| **s**lid | 1 |
| **s**lowly | 1 |
| **s**idewa**y**s → **s**ideawa**ys** | 2 |
**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-000611 |
Artificial Intelligence | Logic Puzzle | easy | I'm already halfway to the post office to mail a package, but I just remembered I left my car keys at the grocery store. Where do I need to go next to retrieve my keys? | [
"You need to head back to the **grocery store** to retrieve your car keys.",
"Since you're already halfway to the post office, you'll just need to turn around and go back to the store, grab your keys, and then you can head back to the post office (or drop off the package some other way if it's easier).",
"Hope ... | You need to head back to the **grocery store** to retrieve your car keys. Since you're already halfway to the post office, you'll just need to turn around and go back to the store, grab your keys, and then you can head back to the post office (or drop off the package some other way if it's easier).
Hope it's a quick 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-000612 |
Programming | Python | hard | Given is a tree T with N vertices. The i-th edge connects Vertex A_i and B_i (1 \leq A_i,B_i \leq N).
Now, each vertex is painted black with probability 1/2 and white with probability 1/2, which is chosen independently from other vertices. Then, let S be the smallest subtree (connected subgraph) of T containing all th... | [
"Looking at this problem, I need to find the expected number of white vertices in the minimal subtree spanning all black vertices.",
"**Key Insight - Linearity of Expectation:**",
"E[holeyness] = Σᵥ P(v is white AND v ∈ S)",
"A white vertex v is in S if and only if black vertices appear in at least **two** di... | Looking at this problem, I need to find the expected number of white vertices in the minimal subtree spanning all black vertices.
**Key Insight - Linearity of Expectation:**
E[holeyness] = Σᵥ P(v is white AND v ∈ S)
A white vertex v is in S if and only if black vertices appear in at least **two** different component... | 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-000613 |
Mathematics | - | hard | The centers of two circles are P and Q with radii R and r, respectively. The circles intersect at two distinct points A and B, and the distance between P and Q is 1. Find the ratio of the areas of triangles PAB and QAB. | [
"# Ratio of Areas of Triangles PAB and QAB",
"## Setting Up Coordinates",
"Place $P = (0,0)$ and $Q = (1,0)$, so $PQ = 1$.",
"The two circles are:",
"$$x^2 + y^2 = R^2 \\qquad\\text{and}\\qquad (x-1)^2 + y^2 = r^2$$",
"## Locating the Common Chord AB",
"Subtracting the two circle equations gives the **r... | # Ratio of Areas of Triangles PAB and QAB
## Setting Up Coordinates
Place $P = (0,0)$ and $Q = (1,0)$, so $PQ = 1$. The two circles are:
$$x^2 + y^2 = R^2 \qquad\text{and}\qquad (x-1)^2 + y^2 = r^2$$
## Locating the Common Chord AB
Subtracting the two circle equations gives the **radical axis** (the line through $... | 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-000614 |
Mathematics | - | medium | Let real numbers $x y$ satisfy the constraint conditions $\left{\begin{array}{l}x+2 y \geqslant 2, \\ 2 x+y \leqslant 4, \\ 4 x-y \geqslant 1 .\end{array}\right.$ Then the range of the objective function $z=3 x+y$ is $\qquad$ | [
"# Finding the Range of $z = 3x + y$",
"## Setting Up the Feasible Region",
"The three boundary lines are:\n- $L_1:\\; x + 2y = 2$\n- $L_2:\\; 2x + y = 4$\n- $L_3:\\; 4x - y = 1$",
"Since the feasible region is a **bounded triangle**, I find the three vertices by solving each pair of boundary equations.",
"... | # Finding the Range of $z = 3x + y$
## Setting Up the Feasible Region
The three boundary lines are:
- $L_1:\; x + 2y = 2$
- $L_2:\; 2x + y = 4$
- $L_3:\; 4x - y = 1$
Since the feasible region is a **bounded triangle**, I find the three vertices by solving each pair of boundary equations.
## Finding the Vertices
**... | 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-000615 |
Artificial Intelligence | Logic Puzzle | easy | What is the seventh letter of the word 'misspelling' when it is spelled backwards? | [
"The word **misspelling** spelled backwards is:",
"**g n i l l e p s s i m**",
"Counting to the seventh letter:",
"1. g\n2. n\n3. i\n4. l\n5. l\n6. e\n7. **p**",
"The seventh letter is **p**."
] | The word **misspelling** spelled backwards is:
**g n i l l e p s s i m**
Counting to the seventh letter:
1. g
2. n
3. i
4. l
5. l
6. e
7. **p**
The seventh letter is **p**. | 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-000616 |
Programming | - | hard | Build an async/await HTTP request batcher that groups requests within a 50 ms window in Kotlin using the language's native concurrency primitives. Show how you avoid deadlock and livelock, and include a stress test. | [
"# Async/Await HTTP Request Batcher in Kotlin",
"## Architecture Overview",
"```\n┌─────────────────────────────────────────────────────────────────────┐\n│ Requesters (N coroutines) │\n│ scope.launch { batcher.execute(req) } → suspends on Deferred │\n└────────────... | # Async/Await HTTP Request Batcher in Kotlin
## Architecture Overview
```
┌─────────────────────────────────────────────────────────────────────┐
│ Requesters (N coroutines) │
│ scope.launch { batcher.execute(req) } → suspends on Deferred │
└──────────────────────────┬──... | 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-000617 |
Science | Electronic Engineering | medium | The input admittance to a triode modeled by the small-signal equivalent circuit of Fig. 7-9(b) is obviously zero; however, there are interelectrode capacitances that must be considered for high-frequency operation. Add these interelectrode capacitances (grid-cathode capacitance \( C_{gk} \); plate-grid, \( C_{pg} \); a... | [
"# Triode High-Frequency Model with Interelectrode Capacitances",
"## Setting Up the Circuit",
"We add three interelectrode capacitances to the small-signal equivalent circuit of Fig. 7-9(b):",
"- **Grid-cathode:** $C_{gk}$\n- **Plate-grid:** $C_{pg}$\n- **Plate-cathode:** $C_{pk}$",
"The resulting circuit ... | # Triode High-Frequency Model with Interelectrode Capacitances
## Setting Up the Circuit
We add three interelectrode capacitances to the small-signal equivalent circuit of Fig. 7-9(b):
- **Grid-cathode:** $C_{gk}$
- **Plate-grid:** $C_{pg}$
- **Plate-cathode:** $C_{pk}$
The resulting circuit is shown in Fig. 7-24.
... | 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-000618 |
Programming | - | hard | Code depth-first search with cycle detection in Rust, building it without using any library sorting or graph utilities. Include time/space complexity analysis and test cases. | [
"# Depth-First Search with Cycle Detection in Rust",
"## Implementation",
"```rust\nuse std::collections::HashSet;\nuse std::fmt;",
"// ─── Color states for DFS traversal ───────────────────────────────────────────",
"#[derive(Debug, Clone, Copy, PartialEq, Eq)]\nenum Color {\n White, // not yet visited\... | # Depth-First Search with Cycle Detection in Rust
## Implementation
```rust
use std::collections::HashSet;
use std::fmt;
// ─── Color states for DFS traversal ───────────────────────────────────────────
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
enum Color {
White, // not yet visited
Gray, // discovered,... | 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-000619 |
Mathematics | - | hard | For a given sequence ${c_n}$, if there exist real constants $p$ and $q$ such that $c_{n+1}=pc_n+q$ ($p\neq 0$) holds for any $n\in \mathbb{N}^*$, we call this sequence ${c_n}$ an "M-class sequence".
1. If $a_n=2n$, $b_n=3\cdot2^n$, $n\in \mathbb{N}^*$, determine whether the sequences ${a_n}$ and ${b_n}$ are "M-class se... | [
"# M-Class Sequences: Complete Solution",
"## Part 1: Testing $\\{a_n\\}$ and $\\{b_n\\}$",
"**Sequence $a_n = 2n$:**",
"$$a_{n+1} = 2(n+1) = 2n + 2 = a_n + 2$$",
"This gives $p=1,\\; q=2$ with $p\\neq 0$. $\\;\\blacksquare$ **$\\{a_n\\}$ is an M-class sequence.**",
"**Sequence $b_n = 3\\cdot 2^n$:**",
... | # M-Class Sequences: Complete Solution
## Part 1: Testing $\{a_n\}$ and $\{b_n\}$
**Sequence $a_n = 2n$:**
$$a_{n+1} = 2(n+1) = 2n + 2 = a_n + 2$$
This gives $p=1,\; q=2$ with $p\neq 0$. $\;\blacksquare$ **$\{a_n\}$ is an M-class sequence.**
**Sequence $b_n = 3\cdot 2^n$:**
$$b_{n+1} = 3\cdot 2^{n+1} = 2\cdot(3\c... | 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-000620 |
Artificial Intelligence | Logic Puzzle | easy | I have exactly one ounce of gold and exactly one ounce of feathers. Which one weighs more? | [
"They weigh the same.",
"Both are **exactly one ounce**, so each weighs precisely one ounce.",
"The material doesn't change the weight you've already specified — gold is just much denser, so that one ounce of gold takes up far less space than the one ounce of feathers, but on a scale they'd both read the same."... | They weigh the same. Both are **exactly one ounce**, so each weighs precisely one ounce. The material doesn't change the weight you've already specified — gold is just much denser, so that one ounce of gold takes up far less space than the one ounce of feathers, but on a scale they'd both read the same.
(It's the same... | 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-000621 |
Programming | - | hard | Build a fully playable Minesweeper game using HTML/CSS/JavaScript and pure JavaScript (no external libraries). Implement the following mechanics: mine counter and elapsed-time timer in the header; left-click to reveal a cell, right-click to flag/unflag; first-click safety guarantee (mines placed after first click); con... | [
"# Minesweeper — Vanilla JS",
"A complete, single-file implementation.",
"The code is organized into three clear modules: **`Game`** (state + logic), **`Renderer`** (DOM creation + updates), and **`Input`** (event handling), with a `requestAnimationFrame` loop driving UI refreshes.",
"```html\n<!DOCTYPE html>... | # Minesweeper — Vanilla JS
A complete, single-file implementation. The code is organized into three clear modules: **`Game`** (state + logic), **`Renderer`** (DOM creation + updates), and **`Input`** (event handling), with a `requestAnimationFrame` loop driving UI refreshes.
```html
<!DOCTYPE html>
<html lang="en">
<... | 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-000622 |
Mathematics | - | hard | Let \(ABC\) be a triangle with a point \(P\) inside such that \(\angle PBA = \angle PCA\), \(\angle PCB = 2 \angle PAB\), and \(\angle PAC = \angle PCA + \angle PAB\). Calculate the value of \(\angle PAC\) in degrees. | [
"# Finding ∠PAC",
"## Setting Up Angle Variables",
"Let me define the key angles:\n- $\\angle PAB = \\alpha$, $\\angle PBA = \\beta$, $\\angle PCA = \\gamma$\n- $\\angle PCB = \\psi$, $\\angle PAC = \\varepsilon$, $\\angle PBC = \\phi$",
"**Applying the given conditions:**\n1. $\\angle PBA = \\angle PCA \\imp... | # Finding ∠PAC
## Setting Up Angle Variables
Let me define the key angles:
- $\angle PAB = \alpha$, $\angle PBA = \beta$, $\angle PCA = \gamma$
- $\angle PCB = \psi$, $\angle PAC = \varepsilon$, $\angle PBC = \phi$
**Applying the given conditions:**
1. $\angle PBA = \angle PCA \implies \gamma = \beta$
2. $\angle PCB... | 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-000623 |
Programming | - | hard | Nikki's latest work is writing an story of letters. However, she finds writing story so boring that, after working for three hours, she realized that all she has written are M long words consisting entirely of letters A and B. Having accepted that she will never finish the story in time, poor Nikki has decided to at le... | [
"Looking at this problem, I need to determine for each word whether its letters can be paired (A with A, B with B) such that the arches drawn above the word don't intersect.",
"**Key Insight:** Non-intersecting arches are equivalent to a properly nested (non-crossing) matching, which can be checked with a **stack... | Looking at this problem, I need to determine for each word whether its letters can be paired (A with A, B with B) such that the arches drawn above the word don't intersect.
**Key Insight:** Non-intersecting arches are equivalent to a properly nested (non-crossing) matching, which can be checked with a **stack-based gr... | 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-000624 |
Mathematics | Synthetic Math | easy | Find the greatest integer value of $b$ such that the expression $\frac{9x^3+4x^2+11x+7}{x^2+bx+12}$ has a domain of all real numbers. | [
"# Finding the Greatest Integer Value of $b$",
"## Setting Up the Condition",
"For the expression $\\frac{9x^3+4x^2+11x+7}{x^2+bx+12}$ to have a domain of **all real numbers**, the denominator must **never equal zero** for any real $x$.",
"This means the quadratic $x^2 + bx + 12$ must have **no real roots**."... | # Finding the Greatest Integer Value of $b$
## Setting Up the Condition
For the expression $\frac{9x^3+4x^2+11x+7}{x^2+bx+12}$ to have a domain of **all real numbers**, the denominator must **never equal zero** for any real $x$.
This means the quadratic $x^2 + bx + 12$ must have **no real roots**.
## Applying the 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-000625 |
Programming | - | medium | Write a python function to find the maximum area of a rectangle that can be formed by two vertical lines and the x-axis in the given histogram.
Solve the problem starting with the provided function header.
Function header:
```
class Solution:
def max_rectangle_area(self, height):
```
Please place the solution code ... | [
"```python\nclass Solution:\n def max_rectangle_area(self, height):\n left = 0\n right = len(height) - 1\n max_area = 0",
"while left < right:\n width = right - left\n h = min(height[left], height[right])\n area = width * h\n max_area = max(max_a... | ```python
class Solution:
def max_rectangle_area(self, height):
left = 0
right = len(height) - 1
max_area = 0
while left < right:
width = right - left
h = min(height[left], height[right])
area = width * h
max_area = max(max_are... | 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-000626 |
Mathematics | - | medium | Given that \( x^3 \leq f(x) \) for \( x \in [-1,1] \), use the squeeze theorem to find \( \lim_{x \to 0} f(x) \) if it exists. | [
"# Applying the Squeeze Theorem (or Recognizing You Can't)",
"## What the Squeeze Theorem Requires",
"The Squeeze (Sandwich/Pinching) Theorem states:",
"> If $g(x) \\leq f(x) \\leq h(x)$ near $x = 0$ and $\\lim_{x\\to 0} g(x) = \\lim_{x\\to 0} h(x) = L$, then $\\lim_{x\\to 0} f(x) = L$.",
"Crucially, it req... | # Applying the Squeeze Theorem (or Recognizing You Can't)
## What the Squeeze Theorem Requires
The Squeeze (Sandwich/Pinching) Theorem states:
> If $g(x) \leq f(x) \leq h(x)$ near $x = 0$ and $\lim_{x\to 0} g(x) = \lim_{x\to 0} h(x) = L$, then $\lim_{x\to 0} f(x) = L$.
Crucially, it requires **both** a lower bound ... | 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-000627 |
Programming | Python | medium | In DDU's annual techno-cultural fest – Felicific, the Computer Engineering department is introducing a weird contest this time. In the contest, there are N registered participants, with heights h[1..N]. A coordinator speaks out a number K to all of them. The prize is awarded to any pair of participants whose heights ad... | [
"# Two Sum Check for Felicific Contest",
"## Approach",
"This is a classic **Two Sum** problem.",
"For each participant's height `h[i]`, I need to check if `K - h[i]` has already been seen among earlier participants.",
"A hash set makes this O(N) time.",
"Key detail: since a participant **cannot pair with... | # Two Sum Check for Felicific Contest
## Approach
This is a classic **Two Sum** problem. For each participant's height `h[i]`, I need to check if `K - h[i]` has already been seen among earlier participants. A hash set makes this O(N) time.
Key detail: since a participant **cannot pair with themselves**, I check 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-000628 |
Mathematics | - | medium | Let the complex numbers $z_{1}, z_{2}$ correspond to points $A, B$ in the complex plane, and $\left|z_{1}\right|=4, 4 z_{1}^{2}-2 z_{1} z_{2}+z_{2}^{2}=0$. $O$ is the origin. Then the area of $\triangle O A B$ is
(A) $8 \sqrt{3}$
(B) $4 \sqrt{3}$
(C) $6 \sqrt{3}$
(D) $12 \sqrt{3}$ | [
"# Finding the Area of △OAB",
"## Setting Up the Ratio",
"Given $|z_1| = 4$ and the constraint $4z_1^2 - 2z_1 z_2 + z_2^2 = 0$.",
"Dividing through by $z_1^2$ (valid since $|z_1| = 4 \\neq 0$):",
"$$4 - 2\\frac{z_2}{z_1} + \\left(\\frac{z_2}{z_1}\\right)^2 = 0$$",
"Let $w = \\dfrac{z_2}{z_1}$.",
"This g... | # Finding the Area of △OAB
## Setting Up the Ratio
Given $|z_1| = 4$ and the constraint $4z_1^2 - 2z_1 z_2 + z_2^2 = 0$.
Dividing through by $z_1^2$ (valid since $|z_1| = 4 \neq 0$):
$$4 - 2\frac{z_2}{z_1} + \left(\frac{z_2}{z_1}\right)^2 = 0$$
Let $w = \dfrac{z_2}{z_1}$. This gives the quadratic:
$$w^2 - 2w + 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-000629 |
Programming | - | hard | You are working on a static analysis tool that performs abstract interpretation on programs to infer properties about their behavior. In this context, you are given a code snippet that defines operations on linear expressions and intervals. Your task is to implement a specific operation for the static analysis tool. Y... | [
"# Implementing the `apply` Function for Arithmetic Operations",
"Looking at the provided code, I can see that:",
"- `assign(dom, x, expr)` encodes `x = expr` as the linear constraint `expr - x = 0`\n- The domain `dom_t` works with **linear constraints** (`lincst_t` with `EQUALITY`)\n- Addition and subtraction ... | # Implementing the `apply` Function for Arithmetic Operations
Looking at the provided code, I can see that:
- `assign(dom, x, expr)` encodes `x = expr` as the linear constraint `expr - x = 0`
- The domain `dom_t` works with **linear constraints** (`lincst_t` with `EQUALITY`)
- Addition and subtraction produce linear ... | 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-000630 |
Artificial Intelligence | Logic Puzzle | easy | My sister is 20 years younger than me. In five years, I will be twice as old as she was ten years ago. How old am I now? | [
"## Setting Up the Equation",
"Let my current age be **x**.",
"Then my sister's current age is **x − 20**.",
"- In five years, I will be: **x + 5**\n- Ten years ago, my sister was: **(x − 20) − 10 = x − 30**",
"The problem states:",
"$$x + 5 = 2(x - 30)$$",
"## Solving",
"$$x + 5 = 2x - 60$$\n$$65 = x... | ## Setting Up the Equation
Let my current age be **x**. Then my sister's current age is **x − 20**.
- In five years, I will be: **x + 5**
- Ten years ago, my sister was: **(x − 20) − 10 = x − 30**
The problem states:
$$x + 5 = 2(x - 30)$$
## Solving
$$x + 5 = 2x - 60$$
$$65 = x$$
## Answer
I am **65** years old... | 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-000631 |
Programming | - | medium | implement a ring buffer data structure in JavaScript | [
"# Ring Buffer in JavaScript",
"A ring buffer (circular buffer) stores a fixed number of elements in a circular fashion.",
"When the buffer is full, the next write overwrites the oldest element (or blocks, depending on strategy).",
"## Implementation",
"```js\nclass RingBuffer {\n /**\n * @param {number}... | # Ring Buffer in JavaScript
A ring buffer (circular buffer) stores a fixed number of elements in a circular fashion. When the buffer is full, the next write overwrites the oldest element (or blocks, depending on strategy).
## Implementation
```js
class RingBuffer {
/**
* @param {number} capacity - Maximum numbe... | 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-000632 |
Artificial Intelligence | Logic Puzzle | easy | If the day before tomorrow is Thursday, what day will it be three days before the day after yesterday? | [
"## Working It Out",
"**Step 1: Find today.**\n\"Yesterday\" is the day before tomorrow.",
"If that day is **Thursday**, then today is **Friday**.",
"**Step 2: Find \"the day after yesterday.\"**\nThe day after yesterday is simply **today → Friday**.",
"**Step 3: Count three days back from Friday.**\nFriday... | ## Working It Out
**Step 1: Find today.**
"Yesterday" is the day before tomorrow. If that day is **Thursday**, then today is **Friday**.
**Step 2: Find "the day after yesterday."**
The day after yesterday is simply **today → Friday**.
**Step 3: Count three days back from Friday.**
Friday → Thursday → Wednesday → **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-000633 |
Programming | - | hard | Construct a Python script employing the PyTorch Lightning library aiming to train a sequence-to-sequence model on an extensive collection of textual data for a machine translation task. This fabrication of the script should encapsulate both the mechanism of GPU allocation and the implementation of distributed training. | [
"# PyTorch Lightning Seq2Seq Machine Translation — Distributed Training Script",
"Below is a complete, production-oriented script that defines a Transformer-based encoder-decoder for machine translation, wraps it in a `LightningModule`, supplies a `LightningDataModule`, allocates GPU resources explicitly, and lau... | # PyTorch Lightning Seq2Seq Machine Translation — Distributed Training Script
Below is a complete, production-oriented script that defines a Transformer-based encoder-decoder for machine translation, wraps it in a `LightningModule`, supplies a `LightningDataModule`, allocates GPU resources explicitly, and launches Dis... | 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-000634 |
Science | Electromagnetism | hard | ### 4.6 Effects of Non-uniform Resistivity\n\nTwo geometrically identical cylindrical conductors have both height \( h \) and radius \( a \), but different resistivities \( \rho_1 \) and \( \rho_2 \). The two cylinders are connected in series as in Fig. 4.6, forming a single conducting cylinder of height \( 2h \) and c... | [
"# Effects of Non-Uniform Resistivity in Series Cylinders",
"## Part (a): Fields, Current, and Current Densities",
"### Current",
"Since the two cylinders are in **series**, the same current flows through both.",
"The resistances are",
"$$R_1 = \\frac{\\rho_1\\, h}{\\pi a^2}, \\qquad R_2 = \\frac{\\rho_2\... | # Effects of Non-Uniform Resistivity in Series Cylinders
## Part (a): Fields, Current, and Current Densities
### Current
Since the two cylinders are in **series**, the same current flows through both. The resistances are
$$R_1 = \frac{\rho_1\, h}{\pi a^2}, \qquad R_2 = \frac{\rho_2\, h}{\pi a^2}$$
so the total res... | 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-000635 |
Programming | Cpp | hard | You are given an integer n find its next greater or equal number whose binary representation must not contain consecutive ones.
For eg. given n=6 whose binary is 110 and the next number with no consecutive ones is 8 whose binary is 1000.
INPUT
First line of input contains t, the total number of test cases. Then t l... | [
"Looking at this problem, I need to find the next number ≥ n whose binary representation has no consecutive 1s.",
"**Key Insight:** A number has consecutive 1s in binary if and only if `n & (n >> 1)` is non-zero.",
"This is because shifting right by 1 and AND-ing with the original will produce 1s exactly where ... | Looking at this problem, I need to find the next number ≥ n whose binary representation has no consecutive 1s.
**Key Insight:** A number has consecutive 1s in binary if and only if `n & (n >> 1)` is non-zero. This is because shifting right by 1 and AND-ing with the original will produce 1s exactly where two adjacent 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-000636 |
Science | - | hard | What constraints do high‑precision measurements of seismic anisotropy and mantle tomography place on the rheological coupling between mantle convection and core–mantle boundary heat flux variations, and how do these affect long‑term geomagnetic reversal frequency? | [
"# Seismic Constraints on Core–Mantle Rheological Coupling and Geomagnetic Reversal Modulation",
"This question sits at a genuinely under-constrained intersection in Earth science.",
"I will walk through the logic chain from the observational data to the dynamo-level consequence, flagging where the constraints ... | # Seismic Constraints on Core–Mantle Rheological Coupling and Geomagnetic Reversal Modulation
This question sits at a genuinely under-constrained intersection in Earth science. I will walk through the logic chain from the observational data to the dynamo-level consequence, flagging where the constraints are firm and w... | 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-000637 |
Artificial Intelligence | Causal Judgement | medium | How would a typical person answer each of the following questions about causation?
Lauren and Jane work for the same company. They each need to use a computer for work sometimes. Unfortunately, the computer isn't very powerful. If two people are logged on at the same time, it usually crashes. So the company decided to ... | [
"**No**",
"A typical person would answer \"No.\"",
"This scenario is a classic example studied in the psychology of causal reasoning.",
"Even though Jane logging on was a *necessary* physical condition for the crash (without her, the computer wouldn't have been double-logged-on), most people attribute the cau... | **No**
A typical person would answer "No."
This scenario is a classic example studied in the psychology of causal reasoning. Even though Jane logging on was a *necessary* physical condition for the crash (without her, the computer wouldn't have been double-logged-on), most people attribute the cause of the crash 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-000638 |
Mathematics | - | hard | Let $n>k>1$ be positive integers. Determine all positive real numbers $a_{1}, a_{2}, \ldots, a_{n}$ which satisfy
$$
\sum_{i=1}^{n} \sqrt{\frac{k a_{i}^{k}}{(k-1) a_{i}^{k}+1}}=\sum_{i=1}^{n} a_{i}=n
$$ | [
"# Finding All Solutions",
"## Setting Up the Key Inequality",
"Define $f(x) = \\sqrt{\\dfrac{kx^k}{(k-1)x^k+1}}$ for $x>0$.",
"The problem requires:\n$$\\sum_{i=1}^n f(a_i) = \\sum_{i=1}^n a_i = n.$$",
"I will prove that for every $x>0$:\n$$\\boxed{f(x) \\le \\frac{x+1}{2}}, \\quad \\text{with equality iff... | # Finding All Solutions
## Setting Up the Key Inequality
Define $f(x) = \sqrt{\dfrac{kx^k}{(k-1)x^k+1}}$ for $x>0$. The problem requires:
$$\sum_{i=1}^n f(a_i) = \sum_{i=1}^n a_i = n.$$
I will prove that for every $x>0$:
$$\boxed{f(x) \le \frac{x+1}{2}}, \quad \text{with equality iff } x=1.$$
## Proof of the Key In... | 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-000639 |
Programming | - | easy | Create a for loop which prints a Fibonacci series up to 10 numbers. Write corresponding code in Python. | [
"# Fibonacci Series (10 Numbers) using a `for` Loop in Python",
"```python\n# Initialize the first two Fibonacci numbers\na, b = 0, 1",
"# Loop to print 10 numbers in the Fibonacci series\nfor i in range(10):\n print(a, end=\" \")\n a, b = b, a + b # update: a becomes old b, b becomes next sum",
"prin... | # Fibonacci Series (10 Numbers) using a `for` Loop in Python
```python
# Initialize the first two Fibonacci numbers
a, b = 0, 1
# Loop to print 10 numbers in the Fibonacci series
for i in range(10):
print(a, end=" ")
a, b = b, a + b # update: a becomes old b, b becomes next sum
print() # newline after 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-000640 |
Programming | - | medium | Many computer strategy games require building cities, recruiting army, conquering tribes, collecting resources. Sometimes it leads to interesting problems.
Let's suppose that your task is to build a square city. The world map uses the Cartesian coordinates. The sides of the city should be parallel to coordinate axes.... | [
"Looking at this problem, I need to find the minimum area square (with sides parallel to axes) that contains all given points.",
"**Key Insight:** For a square with sides parallel to axes to contain all points:\n- The horizontal span needed is `max_x - min_x`\n- The vertical span needed is `max_y - min_y`\n- The ... | Looking at this problem, I need to find the minimum area square (with sides parallel to axes) that contains all given points.
**Key Insight:** For a square with sides parallel to axes to contain all points:
- The horizontal span needed is `max_x - min_x`
- The vertical span needed is `max_y - min_y`
- The square's sid... | 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-000641 |
Artificial Intelligence | Logic Puzzle | easy | If a statue is facing North and its shadow is pointing exactly toward the Northeast, which cardinal direction is the sun in? | [
"## The Sun is in the **Southwest**.",
"A shadow is always cast directly *away* from the light source.",
"So the shadow and the sun sit on opposite sides of the object:",
"- **Shadow → Northeast**\n- **Sun → Southwest** (the exact opposite of Northeast)",
"The statue facing North is essentially a red herrin... | ## The Sun is in the **Southwest**.
A shadow is always cast directly *away* from the light source. So the shadow and the sun sit on opposite sides of the object:
- **Shadow → Northeast**
- **Sun → Southwest** (the exact opposite of Northeast)
The statue facing North is essentially a red herring; the direction it fac... | 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-000642 |
Science | - | hard | In what ways can equivariant graph neural networks be mathematically constrained to preserve detailed balance and thermodynamic consistency when learning potential energy surfaces for reactive molecular dynamics simulations of enzymatic catalysis? | [
"# Constrained Equivariant GNNs for Thermodynamically Consistent Reactive PES in Enzymatic Catalysis",
"This is a genuinely hard problem because it sits at the intersection of representation learning, differential geometry, nonequilibrium statistical mechanics, and reactive electronic-structure physics.",
"I'll... | # Constrained Equivariant GNNs for Thermodynamically Consistent Reactive PES in Enzymatic Catalysis
This is a genuinely hard problem because it sits at the intersection of representation learning, differential geometry, nonequilibrium statistical mechanics, and reactive electronic-structure physics. I'll organize 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-000643 |
Science | Electrical Engineering | medium | A two-element series circuit, with \( R = 20 \, \Omega \) and \( L = 20 \, \text{mH} \), has an impedance \( 40.0 / \theta \, \Omega \). Determine the angle \(\theta\) and the frequency. \n**Ans.** \( 60^\circ, 276 \, \text{Hz} \) | [
"# Series RL Circuit – Finding θ and f",
"## Given",
"| Parameter | Value |\n|-----------|-------|\n| R | 20 Ω |\n| L | 20 mH = 0.020 H |\n| \\|Z\\| | 40.0 Ω |",
"## Finding the Impedance Angle θ",
"For a series RL circuit:",
"$$Z = R + j\\omega L \\qquad\\Longrightarrow\\qquad |Z|=\\sqrt{R^2+(\\omega L)^... | # Series RL Circuit – Finding θ and f
## Given
| Parameter | Value |
|-----------|-------|
| R | 20 Ω |
| L | 20 mH = 0.020 H |
| \|Z\| | 40.0 Ω |
## Finding the Impedance Angle θ
For a series RL circuit:
$$Z = R + j\omega L \qquad\Longrightarrow\qquad |Z|=\sqrt{R^2+(\omega L)^2}$$
The phase angle is:
$$\cos\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-000644 |
Science | - | hard | How does the interplay between spin–orbit coupling and electron–phonon interactions modify the topological phase diagram of twisted bilayer graphene under varying moiré strain, and what measurable signatures would distinguish these effects in angle‑resolved photoemission spectroscopy? | [
"# Spin–Orbit Coupling, Electron–Phonon Coupling, and Moiré Strain in Twisted Bilayer Graphene",
"This question sits at a genuinely active frontier, so I will lay out the established physics, the leading theoretical expectations for their interplay, and the spectroscopic fingerprints one would look for, while fla... | # Spin–Orbit Coupling, Electron–Phonon Coupling, and Moiré Strain in Twisted Bilayer Graphene
This question sits at a genuinely active frontier, so I will lay out the established physics, the leading theoretical expectations for their interplay, and the spectroscopic fingerprints one would look for, while flagging whe... | 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-000645 |
Mathematics | - | easy | How many weeks are equivalent to 2016 hours?
A 6
B 8
C 10
D 12
E 16 | [
"## Converting 2016 Hours to Weeks",
"To convert hours to weeks, I need to use these relationships:",
"- 1 day = 24 hours\n- 1 week = 7 days = **168 hours**",
"**Calculation:**",
"$$2016 \\div 168 = 12$$",
"The answer is **D) 12**."
] | ## Converting 2016 Hours to Weeks
To convert hours to weeks, I need to use these relationships:
- 1 day = 24 hours
- 1 week = 7 days = **168 hours**
**Calculation:**
$$2016 \div 168 = 12$$
The answer is **D) 12**. | 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-000646 |
Programming | - | hard | Write a Node.js script that backs up files older than 49 days to a dated archive folder, sends a summary email on completion, and logs each operation. Include retry logic for transient errors and structured logging to a file. | [
"# Node.js File Backup Script with Email Summary",
"## `package.json`",
"```json\n{\n \"name\": \"file-backup\",\n \"version\": \"1.0.0\",\n \"description\": \"Back up files older than 49 days with email notification and structured logging\",\n \"main\": \"backup.js\",\n \"scripts\": {\n \"backup\": \"n... | # Node.js File Backup Script with Email Summary
## `package.json`
```json
{
"name": "file-backup",
"version": "1.0.0",
"description": "Back up files older than 49 days with email notification and structured logging",
"main": "backup.js",
"scripts": {
"backup": "node backup.js"
},
"engines": {
"n... | 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-000647 |
Mathematics | - | hard | Is every smooth automorphism of a Lie Group $G$ a diffeomorphism? | [
"# Smooth Automorphisms of a Lie Group Are Diffeomorphisms",
"**Yes.** If $f: G \\to G$ is a smooth group automorphism (i.e. a bijective group homomorphism that is $C^\\infty$), then $f$ is automatically a diffeomorphism.",
"The proof rests on three standard facts.",
"## Proof",
"**Step 1 – The differential... | # Smooth Automorphisms of a Lie Group Are Diffeomorphisms
**Yes.** If $f: G \to G$ is a smooth group automorphism (i.e. a bijective group homomorphism that is $C^\infty$), then $f$ is automatically a diffeomorphism. The proof rests on three standard facts.
## Proof
**Step 1 – The differential is an isomorphism.**
Th... | 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-000648 |
Mathematics | - | hard | A math competition has a total of 15 questions. The table below shows the number of people who got $n$ $(n=0,1,2, \cdots, 15)$ questions correct:
\begin{tabular}{c|c|c|c|c|c|c|c|c|c}
$n$ & 0 & 1 & 2 & 3 & $\cdots$ & 12 & 13 & 14 & 15 \\
\hline Number of people who got $n$ questions correct & 7 & 8 & 10 & 21 & $\cdots$ ... | [
"Looking at this problem, I need to find the minimum total number of students given partial information and two average conditions.",
"## Setting Up Variables",
"Let $a_n$ = number of students who got exactly $n$ correct.",
"From the table:\n- $a_0=7,\\; a_1=8,\\; a_2=10,\\; a_3=21$ (sum = 46)\n- $a_{12}=15,\... | Looking at this problem, I need to find the minimum total number of students given partial information and two average conditions.
## Setting Up Variables
Let $a_n$ = number of students who got exactly $n$ correct. From the table:
- $a_0=7,\; a_1=8,\; a_2=10,\; a_3=21$ (sum = 46)
- $a_{12}=15,\; a_{13}=6,\; a_{14}=3,... | 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-000649 |
Programming | - | hard | Polycarp is practicing his problem solving skill. He has a list of $n$ problems with difficulties $a_1, a_2, \dots, a_n$, respectively. His plan is to practice for exactly $k$ days. Each day he has to solve at least one problem from his list. Polycarp solves the problems in the order they are given in his list, he cann... | [
"Looking at this problem, I need to split the array into exactly `k` contiguous segments to maximize the sum of segment maximums.",
"**Key Insight:** The maximum possible total profit equals the sum of the `k` largest elements in the array.",
"This is because:\n- Each segment's maximum is one of the array eleme... | Looking at this problem, I need to split the array into exactly `k` contiguous segments to maximize the sum of segment maximums.
**Key Insight:** The maximum possible total profit equals the sum of the `k` largest elements in the array. This is because:
- Each segment's maximum is one of the array elements, so the sum... | 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-000650 |
Mathematics | Olympiads | hard | There is a $2n \times 2n$ checkerboard. Petya has placed $(n+1)^{2}$ chips on it. The cat can swipe any single chip onto the floor with one swipe, or it can swipe two chips that are in adjacent squares or diagonally adjacent squares with one swipe. What is the minimum number of swipes the cat will need to certainly kno... | [
"# Minimum Number of Swipes on a $2n \\times 2n$ Checkerboard",
"## Setting Up the Problem",
"Each swipe removes either **1 chip** (always) or **2 chips** (if they sit in edge- or corner-adjacent squares).",
"To minimize swipes, the cat wants to maximize the number of disjoint adjacent pairs — i.e., the **max... | # Minimum Number of Swipes on a $2n \times 2n$ Checkerboard
## Setting Up the Problem
Each swipe removes either **1 chip** (always) or **2 chips** (if they sit in edge- or corner-adjacent squares). To minimize swipes, the cat wants to maximize the number of disjoint adjacent pairs — i.e., the **maximum matching** in ... | 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-000651 |
Programming | - | hard | Demonstrate the Event Sourcing design pattern in TypeScript with a practical a plugin or extension architecture example. Discuss the trade-offs: what complexity does it add, and what problem does it solve? | [
"# Event Sourcing with a Plugin Architecture in TypeScript",
"## The Problem It Solves",
"A plugin system has a discrete, auditable history: *who installed what, when, what config was applied, what got enabled/disabled*.",
"Traditional state management (read/write a `plugins.json` or database row) gives you *... | # Event Sourcing with a Plugin Architecture in TypeScript
## The Problem It Solves
A plugin system has a discrete, auditable history: *who installed what, when, what config was applied, what got enabled/disabled*. Traditional state management (read/write a `plugins.json` or database row) gives you **now** but destroy... | 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-000652 |
Mathematics | - | hard | How many solutions does the equation
$$
\frac{1}{(x-1)^{2}}+\frac{1}{(x-2)^{2}}=\frac{2}{x^{2}} ?
$$ | [
"# Solving the Equation",
"## Setting Up the Polynomial",
"The equation is defined for $x \\neq 0, 1, 2$.",
"Multiplying both sides by $x^2(x-1)^2(x-2)^2$:",
"$$x^2(x-2)^2 + x^2(x-1)^2 = 2(x-1)^2(x-2)^2$$",
"**Left side:**\n$$x^2\\big[(x-2)^2+(x-1)^2\\big] = x^2(2x^2-6x+5) = 2x^4 - 6x^3 + 5x^2$$",
"**Ri... | # Solving the Equation
## Setting Up the Polynomial
The equation is defined for $x \neq 0, 1, 2$. Multiplying both sides by $x^2(x-1)^2(x-2)^2$:
$$x^2(x-2)^2 + x^2(x-1)^2 = 2(x-1)^2(x-2)^2$$
**Left side:**
$$x^2\big[(x-2)^2+(x-1)^2\big] = x^2(2x^2-6x+5) = 2x^4 - 6x^3 + 5x^2$$
**Right side:**
$$2\big[(x-1)(x-2)\big... | 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-000653 |
Programming | - | hard | Build a multi-select tag input with keyboard-driven chip creation and removal using Angular. Add smooth animations using CSS transitions or the Web Animations API. Ensure it is accessible. | [
"# Angular Multi-Select Tag Input",
"A standalone Angular component with full keyboard support, CSS + Web Animations API, and screen-reader announcements.",
"## File structure",
"```\nsrc/app/tag-input/\n tag-input.component.ts\n tag-input.component.html\n tag-input.component.scss\n```",
"## `tag-input.c... | # Angular Multi-Select Tag Input
A standalone Angular component with full keyboard support, CSS + Web Animations API, and screen-reader announcements.
## File structure
```
src/app/tag-input/
tag-input.component.ts
tag-input.component.html
tag-input.component.scss
```
## `tag-input.component.ts`
```ts
import... | 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-000654 |
Artificial Intelligence | Logic Puzzle | medium | A rare virus affects 1 in 10,000 people. A test is 99% accurate for both positive and negative results. If you test positive, what is the likelihood you actually have the virus? | [
"# The Base Rate Problem",
"This is one of the most counterintuitive results in probability, and the answer will surprise most people.",
"## Setting Up with Bayes' Theorem",
"| Quantity | Value |\n|---|---|\n| Prevalence: P(Virus) | 1/10,000 = 0.0001 |\n| Sensitivity: P(+ \\| Virus) | 0.99 |\n| False positive... | # The Base Rate Problem
This is one of the most counterintuitive results in probability, and the answer will surprise most people.
## Setting Up with Bayes' Theorem
| Quantity | Value |
|---|---|
| Prevalence: P(Virus) | 1/10,000 = 0.0001 |
| Sensitivity: P(+ \| Virus) | 0.99 |
| False positive rate: P(+ \| No Virus... | 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-000655 |
Science | Physical Chemistry | easy | For a certain gas which deviates a little from ideal behaviour. A plot between \( P/\rho \) vs \( P \) was found to be non-linear, the intercept on y-axis will be:\n - (a) \( \frac{RT}{M} \)\n - (b) \( \frac{M}{RT} \)\n - (c) \( \frac{MZ}{RT} \)\n - (d) \( \frac{R}{TM} \) | [
"# Plot of P/ρ vs P for a Real Gas",
"## Setting Up the Equation",
"For a real gas, we use the compressibility factor $Z$:",
"$$PV = Z \\cdot \\frac{m}{M}RT$$",
"Dividing both sides by $V$ and using $\\rho = m/V$:",
"$$\\frac{P}{\\rho} = \\frac{ZRT}{M}$$",
"## Analyzing the Y-Intercept",
"The y-interc... | # Plot of P/ρ vs P for a Real Gas
## Setting Up the Equation
For a real gas, we use the compressibility factor $Z$:
$$PV = Z \cdot \frac{m}{M}RT$$
Dividing both sides by $V$ and using $\rho = m/V$:
$$\frac{P}{\rho} = \frac{ZRT}{M}$$
## Analyzing the Y-Intercept
The y-intercept corresponds to $P \to 0$.
**Key p... | 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-000656 |
Science | - | hard | In single‑cell multi‑omics of tumor heterogeneity, how can Bayesian hierarchical frameworks integrate stochastic gene expression noise, epigenetic state transitions, and spatial lineage tracing to infer causal driver pathways? | [
"# Bayesian Hierarchical Integration of Multi-Omics for Causal Pathway Inference in Tumor Heterogeneity",
"## 1.",
"The Core Challenge",
"Tumor heterogeneity is simultaneously a *stochastic*, *spatiotemporal*, and *multilayered regulatory* phenomenon.",
"No single omics readout captures the causal architect... | # Bayesian Hierarchical Integration of Multi-Omics for Causal Pathway Inference in Tumor Heterogeneity
## 1. The Core Challenge
Tumor heterogeneity is simultaneously a *stochastic*, *spatiotemporal*, and *multilayered regulatory* phenomenon. No single omics readout captures the causal architecture: transcriptomics re... | 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-000657 |
Programming | - | hard | Create a program that rotates the pattern of 8 characters x 8 lines clockwise by 90 degrees, 180 degrees, and 270 degrees and outputs it.
Input
A pattern consisting of 8 characters x 8 lines is given. Characters consist of alphanumeric characters, half-width pound'#', and asterisk'*'.
Output
Output the rotated patte... | [
"Looking at this problem, I need to read an 8×8 character grid and output three rotations (90°, 180°, 270° clockwise).",
"**Rotation formulas for an n×n grid (n=8):**\n- **90° CW:** `new[i][j] = old[n-1-j][i]`\n- **180°:** `new[i][j] = old[n-1-i][n-1-j]`\n- **270° CW:** `new[i][j] = old[j][n-1-i]`",
"**Verifica... | Looking at this problem, I need to read an 8×8 character grid and output three rotations (90°, 180°, 270° clockwise).
**Rotation formulas for an n×n grid (n=8):**
- **90° CW:** `new[i][j] = old[n-1-j][i]`
- **180°:** `new[i][j] = old[n-1-i][n-1-j]`
- **270° CW:** `new[i][j] = old[j][n-1-i]`
**Verification with Exampl... | 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-000658 |
Mathematics | - | hard | Two spheres $O_{1}$ and $O_{2}$, both with a radius of 1, are tangent to each other, and they are also tangent to the two half-planes of a dihedral angle $\alpha-l-\beta$ of $60^{\circ}$. There is another larger sphere $O$ that is tangent to both half-planes of the dihedral angle and is externally tangent to spheres $O... | [
"# Finding the Radius of the Larger Sphere",
"## Setting Up Coordinates",
"I place the edge $l$ of the dihedral angle along the $z$-axis.",
"In a cross-section perpendicular to $l$, the two half-planes appear as two rays from the origin separated by $60°$:",
"- **Half-plane $\\alpha$:** the positive $x$-axi... | # Finding the Radius of the Larger Sphere
## Setting Up Coordinates
I place the edge $l$ of the dihedral angle along the $z$-axis. In a cross-section perpendicular to $l$, the two half-planes appear as two rays from the origin separated by $60°$:
- **Half-plane $\alpha$:** the positive $x$-axis (ray at $0°$)
- **Hal... | 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-000659 |
Programming | - | hard | Construct a function to check for an anagram in Python, but the function should have a time complexity of O(log n), where n is the length of the input strings. Additionally, the function should not use any built-in functions or libraries for sorting or manipulating strings. | [
"# Anagram Checker: Why O(log n) Is Impossible (and the Best We Can Do)",
"## The Fundamental Problem with the Constraint",
"**O(log n) time complexity is not achievable for an anagram check**, and here's why:",
"An anagram check requires you to account for **every single character** in both strings.",
"Con... | # Anagram Checker: Why O(log n) Is Impossible (and the Best We Can Do)
## The Fundamental Problem with the Constraint
**O(log n) time complexity is not achievable for an anagram check**, and here's why:
An anagram check requires you to account for **every single character** in both strings. Consider the adversarial ... | 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-000660 |
Programming | - | hard | Write a C dynamic programming solution for: counting the number of distinct ways to tile a 2×11 board with 1×2 dominoes. Reconstruct the optimal solution (not just its value) and trace through the backtracking. | [
"# 2×11 Domino Tiling — DP with Backtracking Reconstruction",
"## The Recurrence",
"For a 2×*n* board, the last column is covered in exactly two ways:",
"| Move | Effect |\n|------|--------|\n| **V** – one vertical domino in column *n* | leaves a 2×(*n*−1) sub-board → `dp[n-1]` |\n| **HH** – two horizontal do... | # 2×11 Domino Tiling — DP with Backtracking Reconstruction
## The Recurrence
For a 2×*n* board, the last column is covered in exactly two ways:
| Move | Effect |
|------|--------|
| **V** – one vertical domino in column *n* | leaves a 2×(*n*−1) sub-board → `dp[n-1]` |
| **HH** – two horizontal dominoes spanning colu... | 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-000661 |
Science | Solid State Physics | hard | Derive a linear equation for \( \delta n(r) \) by substituting \( n(r) = n_0 + \delta n(r) \) into the Thomas-Fermi equation and expanding \( n^{2/3}(r) \) in terms of \( \delta n(r) \) up to the first order in \( \delta n(r) \). | [
"# Linearising the Thomas–Fermi Equation",
"## 1.",
"Starting point: the Thomas–Fermi equation",
"The TF equation relating the electron density to the total potential is",
"$$\nA\\; n^{2/3}(r) \\;=\\; \\mu - V_{\\text{ext}}(r) - \\int \\frac{n(r')}{|\\mathbf{r}-\\mathbf{r}'|}\\,d^3r',\n$$",
"where",
"$$... | # Linearising the Thomas–Fermi Equation
## 1. Starting point: the Thomas–Fermi equation
The TF equation relating the electron density to the total potential is
$$
A\; n^{2/3}(r) \;=\; \mu - V_{\text{ext}}(r) - \int \frac{n(r')}{|\mathbf{r}-\mathbf{r}'|}\,d^3r',
$$
where
$$
A \;\equiv\; \left(\frac{3\pi^2\hbar^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-000662 |
Mathematics | Synthetic Math | medium | The Aces are playing the Kings in a playoff series, where the first team to win 5 games wins the series. Each game's outcome leads to the Aces winning with a probability of $\dfrac{7}{10}$, and there are no draws. Calculate the probability that the Aces win the series. | [
"# Probability the Aces Win the Best-of-9 Series",
"## Setting Up the Problem",
"The Aces win the series by reaching **5 wins before the Kings do**.",
"This can happen in **5, 6, 7, 8, or 9 games**.",
"If the Aces win the series in exactly $k$ games, the first $k-1$ games must contain exactly **4 Aces wins*... | # Probability the Aces Win the Best-of-9 Series
## Setting Up the Problem
The Aces win the series by reaching **5 wins before the Kings do**. This can happen in **5, 6, 7, 8, or 9 games**.
If the Aces win the series in exactly $k$ games, the first $k-1$ games must contain exactly **4 Aces wins** and $k-5$ Kings wins... | 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-000663 |
Programming | - | hard | Walk through a system design for a social-media news feed / timeline system. Key constraints: hotspot handling for celebrity accounts with 39M followers; ranked feed using a lightweight ML scoring service. Cover: failure modes and resiliency, API design, scaling bottlenecks and mitigation, data model / schema. | [
"# Social-Media News Feed / Timeline — System Design Walkthrough",
"---",
"## 0.",
"Problem Framing & Non-Functional Targets",
"| Metric | Target |\n|---|---|\n| Feed render (P50 / P99) | ≤ 80 ms / ≤ 250 ms |\n| Post-to-visible-for-follower (P50) | ≤ 2 s |\n| Post-to-visible-for-celebrity-follower (39 M) | ... | # Social-Media News Feed / Timeline — System Design Walkthrough
---
## 0. Problem Framing & Non-Functional Targets
| Metric | Target |
|---|---|
| Feed render (P50 / P99) | ≤ 80 ms / ≤ 250 ms |
| Post-to-visible-for-follower (P50) | ≤ 2 s |
| Post-to-visible-for-celebrity-follower (39 M) | ≤ 60 s (acceptable degrada... | 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-000664 |
Programming | - | hard | You are the planning manager of an animation production company. What animation production companies produce these days is not limited to animation itself. Related products, such as figures of characters and character song CDs, are also important sources of revenue. How much this profit can be increased depends solely ... | [
"# Solution",
"Looking at this problem, I need to:\n1.",
"Track which characters appear at each time slot (0-29)\n2.",
"Score each character: if `k` characters share a time slot, each gets `(n - k + 1)` points\n3.",
"Find the character with minimum total points (tie-break: lexicographically smallest name)",... | # Solution
Looking at this problem, I need to:
1. Track which characters appear at each time slot (0-29)
2. Score each character: if `k` characters share a time slot, each gets `(n - k + 1)` points
3. Find the character with minimum total points (tie-break: lexicographically smallest name)
**Key insight:** The scorin... | 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-000665 |
Programming | - | hard | A client at 30 ms RTT must transfer a 420 MB file. Calculate and compare the download time over HTTP/1.1 (no pipelining, 2 parallel connections), HTTP/2 (single multiplexed connection), and HTTP/3 (QUIC). Account for TCP slow-start with an initial window of 10 segments (each 1439 bytes) and a 4.5% packet-loss rate. | [
"# File-Download Time Analysis: HTTP/1.1 vs HTTP/2 vs HTTP/3",
"## 1.",
"Fundamental Parameters",
"| Parameter | Value |\n|---|---|\n| File size | 420 MiB = 420 × 1024² = **440 401 920 bytes** |\n| Segment (MSS) | **1 439 bytes** |\n| Total segments **N** | ⌈440 401 920 / 1 439⌉ = **305 978** |\n| RTT | **30 ... | # File-Download Time Analysis: HTTP/1.1 vs HTTP/2 vs HTTP/3
## 1. Fundamental Parameters
| Parameter | Value |
|---|---|
| File size | 420 MiB = 420 × 1024² = **440 401 920 bytes** |
| Segment (MSS) | **1 439 bytes** |
| Total segments **N** | ⌈440 401 920 / 1 439⌉ = **305 978** |
| RTT | **30 ms** |
| Initial TCP wi... | 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-000666 |
Mathematics | - | hard | Suppose that $a$ is an integer. A sequence $x_{1}, x_{2}, x_{3}, x_{4}, \ldots$ is constructed with
- $x_{1}=a$,
- $x_{2 k}=2 x_{2 k-1}$ for every integer $k \geq 1$, and
- $x_{2 k+1}=x_{2 k}-1$ for every integer $k \geq 1$.
For example, if $a=2$, then
$$
x_{1}=2 \quad x_{2}=2 x_{1}=4 \quad x_{3}=x_{2}-1=3 \quad x_{... | [
"# Finding the Smallest Valid N > 1395",
"## Establishing the General Formula",
"Let me compute the first several terms to find the pattern:",
"| n | Term | Expression |\n|---|------|-----------|\n| 1 | a | $2^0(a-1)+1$ |\n| 2 | 2a | $2^1(a-1)+2$ |\n| 3 | 2a−1 | $2^1(a-1)+1$ |\n| 4 | 4a−2 | $2^2(a-1)+2$ |\n| ... | # Finding the Smallest Valid N > 1395
## Establishing the General Formula
Let me compute the first several terms to find the pattern:
| n | Term | Expression |
|---|------|-----------|
| 1 | a | $2^0(a-1)+1$ |
| 2 | 2a | $2^1(a-1)+2$ |
| 3 | 2a−1 | $2^1(a-1)+1$ |
| 4 | 4a−2 | $2^2(a-1)+2$ |
| 5 | 4a−3 | $2^2(a-1)+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-000667 |
Programming | - | hard | Implement the Template Method design pattern in Python using a user authentication flow. Discuss the trade-offs: what complexity does it add, and what problem does it solve? | [
"# Template Method Pattern: User Authentication Flow",
"## The Core Idea",
"The Template Method pattern defines the *skeleton* of an algorithm in a base class, with placeholder steps that subclasses fill in.",
"The caller invokes one method on the base type; the base method orchestrates the sequence, calling ... | # Template Method Pattern: User Authentication Flow
## The Core Idea
The Template Method pattern defines the *skeleton* of an algorithm in a base class, with placeholder steps that subclasses fill in. The caller invokes one method on the base type; the base method orchestrates the sequence, calling into overridable h... | 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-000668 |
Mathematics | - | hard | If permutation matrices are conjugate in \(\operatorname{GL}(n,\mathbb{F})\), are the corresponding permutations conjugate in the symmetric group \(S_n\)? Assume there is a standard embedding of \(S_n\) into \(\operatorname{GL}(n,\mathbb{F})\) that maps each permutation to its corresponding permutation matrix. Given th... | [
"# Conjugacy of Permutation Matrices in $\\operatorname{GL}(n,\\mathbb{F})$ Implies Conjugacy in $S_n$",
"## Answer",
"**Yes.** If $P_\\alpha$ and $P_\\beta$ are similar in $\\operatorname{GL}(n,\\mathbb{F})$, then $\\alpha$ and $\\beta$ are conjugate in $S_n$.",
"The converse of the forward direction (conjug... | # Conjugacy of Permutation Matrices in $\operatorname{GL}(n,\mathbb{F})$ Implies Conjugacy in $S_n$
## Answer
**Yes.** If $P_\alpha$ and $P_\beta$ are similar in $\operatorname{GL}(n,\mathbb{F})$, then $\alpha$ and $\beta$ are conjugate in $S_n$. The converse of the forward direction (conjugate permutations $\Rightar... | 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-000669 |
Programming | - | medium | Linked Lists - Sorted Insert
Write a SortedInsert() function which inserts a node into the correct location of a pre-sorted linked list which is sorted in ascending order. SortedInsert takes the head of a linked list and data used to create a node as arguments. SortedInsert() should also return the head of the list.
... | [
"```python\nclass Node:\n def __init__(self, data):\n self.data = data\n self.next = None",
"def push(head, data):\n new_node = Node(data)\n new_node.next = head\n return new_node",
"def buildOneTwoThree():\n head = None\n head = push(head, 3)\n head = push(head, 2)\n head ... | ```python
class Node:
def __init__(self, data):
self.data = data
self.next = None
def push(head, data):
new_node = Node(data)
new_node.next = head
return new_node
def buildOneTwoThree():
head = None
head = push(head, 3)
head = push(head, 2)
head = push(head, 1)
retu... | 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-000670 |
Programming | - | hard | A client at 237 ms RTT must transfer a 265 MB file. Calculate and compare the download time over HTTP/1.1 (no pipelining, 3 parallel connections), HTTP/2 (single multiplexed connection), and HTTP/3 (QUIC). Account for TCP slow-start with an initial window of 10 segments (each 1458 bytes) and a 3.1% packet-loss rate. | [
"# Transfer-Time Analysis: 265 MB over 237 ms RTT with 3.1 % Loss",
"## 0 · Shared Parameters",
"| Symbol | Value |\n|---|---|\n| RTT (*R*) | 237 ms = 0.237 s |\n| File size | 265 MB = 277 083 136 bytes |\n| Segment (MSS) | 1 458 bytes |\n| **Total segments** *N* | ⌈277 083 136 / 1 458⌉ = **190 044** |\n| Initi... | # Transfer-Time Analysis: 265 MB over 237 ms RTT with 3.1 % Loss
## 0 · Shared Parameters
| Symbol | Value |
|---|---|
| RTT (*R*) | 237 ms = 0.237 s |
| File size | 265 MB = 277 083 136 bytes |
| Segment (MSS) | 1 458 bytes |
| **Total segments** *N* | ⌈277 083 136 / 1 458⌉ = **190 044** |
| Initial congestion windo... | 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-000671 |
Programming | - | hard | How can a user increase performance with SQL queries in a database with a large number of records and multiple tables while adhering to strict resource limitations and minimizing the use of indexes and temporary tables? | [
"# Optimizing SQL Under Strict Resource Constraints",
"This is a genuinely difficult optimization problem because you're removing two of the most powerful levers (indexes and temp tables) while facing scale.",
"The good news is that significant performance gains still come from **query structure, data organizat... | # Optimizing SQL Under Strict Resource Constraints
This is a genuinely difficult optimization problem because you're removing two of the most powerful levers (indexes and temp tables) while facing scale. The good news is that significant performance gains still come from **query structure, data organization, and disci... | 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-000672 |
Science | Physics | hard | The equation of motion of the rod will remain unaltered; in the equation of motion of the wedge one should take into account the presence of the force of kinetic friction \( T = \mu (Q \cos \alpha + m_1 g) \).\n\n\n*Fig. 5.4.*\n\ndirected opposite to the acceleration (Fig. 5.4). Thus\n\n\[ -m_2 g + Q \cos \alpha = m_2 ... | [
"# Verification and Explanation of the Wedge-and-Rod Problem with Friction",
"## Setup",
"A vertical rod of mass $m_2$ (constrained to a vertical guide) rests on the inclined face of a wedge of mass $m_1$ at angle $\\alpha$.",
"The wedge sits on a rough horizontal surface with kinetic friction coefficient $\\... | # Verification and Explanation of the Wedge-and-Rod Problem with Friction
## Setup
A vertical rod of mass $m_2$ (constrained to a vertical guide) rests on the inclined face of a wedge of mass $m_1$ at angle $\alpha$. The wedge sits on a rough horizontal surface with kinetic friction coefficient $\mu$. The normal cont... | 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-000673 |
Mathematics | - | easy | The parabola \( y = x^2 + bx + c \) has the vertex at \( V(2, -3) \). Find \( b \) and \( c \). | [
"# Finding *b* and *c* from the Vertex",
"## Setting Up the Vertex Formula",
"For a parabola $y = x^2 + bx + c$, the x-coordinate of the vertex is",
"$$x_v = -\\frac{b}{2a} = -\\frac{b}{2}$$",
"Since the vertex is at $(2, -3)$, we set this equal to 2:",
"$$-\\frac{b}{2} = 2 \\quad\\Longrightarrow\\quad b ... | # Finding *b* and *c* from the Vertex
## Setting Up the Vertex Formula
For a parabola $y = x^2 + bx + c$, the x-coordinate of the vertex is
$$x_v = -\frac{b}{2a} = -\frac{b}{2}$$
Since the vertex is at $(2, -3)$, we set this equal to 2:
$$-\frac{b}{2} = 2 \quad\Longrightarrow\quad b = -4$$
## Solving for *c*
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-000674 |
Science | - | hard | In the context of differentiable programming for materials discovery, how can one integrate equivariant graph neural networks with ab‑initio quantum Monte Carlo data to simultaneously optimize electronic structure accuracy and computational efficiency across diverse chemical spaces? | [
"# Integrating Equivariant GNNs with QMC in a Differentiable Materials-Discovery Pipeline",
"This is a genuinely open research problem that sits at the intersection of several active threads.",
"Below is a structured treatment of the architecture, the data loop, the differentiable wiring, and the multi-objectiv... | # Integrating Equivariant GNNs with QMC in a Differentiable Materials-Discovery Pipeline
This is a genuinely open research problem that sits at the intersection of several active threads. Below is a structured treatment of the architecture, the data loop, the differentiable wiring, and the multi-objective optimization... | 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-000675 |
Programming | - | hard | Build a fully playable Tetris game using HTML5 Canvas and pure JavaScript (no external libraries). Implement the following mechanics: piece rotation with wall-kick correction; level and speed increasing every 10 cleared lines; left/right movement, soft drop, and hard drop controls; pause/resume functionality; next-piec... | [
"# Tetris — HTML5 Canvas + Pure JavaScript",
"Save this as `tetris.html` and open in any browser.",
"All code is organized into three clear concerns: **Game State**, **Game Logic/Update**, **Rendering**, and **Input**.",
"```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<title>T... | # Tetris — HTML5 Canvas + Pure JavaScript
Save this as `tetris.html` and open in any browser. All code is organized into three clear concerns: **Game State**, **Game Logic/Update**, **Rendering**, and **Input**.
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Tetris</title>
<style>
bod... | 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-000676 |
Programming | - | hard | Build a fully playable Whack-a-Mole game using HTML/CSS/JavaScript and pure JavaScript (no external libraries). Implement the following mechanics: final score screen with high score tracking via localStorage; 30-second countdown timer; random hole selection with randomized visible duration; penalty deduction for clicki... | [
"# Whack-a-Mole — Single File, Pure JS",
"Save this as `whack-a-mole.html` and open it in a browser.",
"Everything (state, rendering, input) is separated into clearly labeled modules, and the game loop runs on `requestAnimationFrame` — even mole appearances are timestamp-driven rather than `setTimeout`-driven, ... | # Whack-a-Mole — Single File, Pure JS
Save this as `whack-a-mole.html` and open it in a browser. Everything (state, rendering, input) is separated into clearly labeled modules, and the game loop runs on `requestAnimationFrame` — even mole appearances are timestamp-driven rather than `setTimeout`-driven, so everything ... | 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-000677 |
Mathematics | - | hard | Given are the lines $l_1, l_2, \ldots, l_k$ in the plane, no two of which are parallel and no three of which are concurrent. For which values of $k$ can one label the intersection points of these lines by $1, 2, \ldots, k-1$ so that in each of the given lines all the labels appear exactly once? | [
"# Labeling Intersection Points of Lines",
"## Reformulating as a Graph Problem",
"Each intersection point is determined by a pair of lines, so the $\\binom{k}{2}$ intersection points correspond bijectively to the edges of the complete graph $K_k$ (with vertices $1, 2, \\ldots, k$ representing the lines $l_1, \... | # Labeling Intersection Points of Lines
## Reformulating as a Graph Problem
Each intersection point is determined by a pair of lines, so the $\binom{k}{2}$ intersection points correspond bijectively to the edges of the complete graph $K_k$ (with vertices $1, 2, \ldots, k$ representing the lines $l_1, \ldots, l_k$).
... | 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-000678 |
Programming | - | medium | Write a function to determine if two rectangles overlap. Rectangles are defined by their top-left and bottom-right coordinates.
Solve the problem starting with the provided function header.
Function header:
```
class Solution:
def rectangle_overlap(self, rect1, rect2):
```
Please place the solution code in the foll... | [
"```python\nclass Solution:\n def rectangle_overlap(self, rect1, rect2):\n x1, y1, x2, y2 = rect1 # top-left (x1,y1), bottom-right (x2,y2)\n x3, y3, x4, y4 = rect2 # top-left (x3,y3), bottom-right (x4,y4)",
"# Two rectangles do NOT overlap if one is entirely\n # to the left, right, above... | ```python
class Solution:
def rectangle_overlap(self, rect1, rect2):
x1, y1, x2, y2 = rect1 # top-left (x1,y1), bottom-right (x2,y2)
x3, y3, x4, y4 = rect2 # top-left (x3,y3), bottom-right (x4,y4)
# Two rectangles do NOT overlap if one is entirely
# to the left, right, abo... | 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-000679 |
Programming | - | hard | Solve using dynamic programming in C#: the 0/1 Knapsack problem for 6 items with capacity 18. Show the recurrence relation and filled DP table on a small example. | [
"# 0/1 Knapsack — Dynamic Programming in C#",
"## 1.",
"Problem Definition",
"| Item | Weight | Value |\n|------|--------|-------|\n| 1 | 2 | 3 |\n| 2 | 3 | 4 |\n| 3 | 4 | 5 |\n| 4 | 5 | 8 |\n| 5 | 9 | 10 |\n| 6 | 5 | 5 |",
"**Capacity:** 18",
"---",
"## 2.",
"Recurrence Relation",
"Let `dp[i][w]` =... | # 0/1 Knapsack — Dynamic Programming in C#
## 1. Problem Definition
| Item | Weight | Value |
|------|--------|-------|
| 1 | 2 | 3 |
| 2 | 3 | 4 |
| 3 | 4 | 5 |
| 4 | 5 | 8 |
| 5 | 9 | 10 |
| 6 | 5 | 5 |
**Capacity:** 18
---
## 2. Recurrence Relation
Let `dp[i][w]` = maximum value achievable using the first `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-000680 |
Programming | - | hard | Solve using dynamic programming in PHP: minimum edit distance (Levenshtein) between strings of length ~19, with path reconstruction. Analyze time and space complexity, then show a space-optimized version. | [
"# Levenshtein Distance in PHP — DP with Path Reconstruction",
"## 1.",
"Full Solution (O(m×n) space, with edit path)",
"```php\n<?php",
"/**\n * Levenshtein (minimum edit) distance with full path reconstruction.\n *\n * @param string $s1 source string\n * @param string $s2 target string\n * @return array{d... | # Levenshtein Distance in PHP — DP with Path Reconstruction
## 1. Full Solution (O(m×n) space, with edit path)
```php
<?php
/**
* Levenshtein (minimum edit) distance with full path reconstruction.
*
* @param string $s1 source string
* @param string $s2 target string
* @return array{distance: int, operations: st... | 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-000681 |
Science | Chemistry | easy | 3. At 773 K, the reaction \( 2\text{NO}(g) + \text{O}_2(g) \rightleftharpoons 2\text{NO}_2(g) \) produces the following concentrations: \([ \text{NO} ] = 3.49 \times 10^{-4} \, \text{M}\), \([ \text{O}_2 ] = 0.80 \, \text{M}\); \([ \text{NO}_2 ] = 0.25 \, \text{M}\).\n\na. What is the equilibrium constant expression fo... | [
"# Equilibrium Constant for 2NO(g) + O₂(g) ⇌ 2NO₂(g)",
"## Part (a) — Equilibrium Constant Expression",
"The equilibrium constant expression is the ratio of product concentrations to reactant concentrations, each raised to the power of their stoichiometric coefficients:",
"$$\\boxed{K_c = \\frac{[\\text{NO}_2... | # Equilibrium Constant for 2NO(g) + O₂(g) ⇌ 2NO₂(g)
## Part (a) — Equilibrium Constant Expression
The equilibrium constant expression is the ratio of product concentrations to reactant concentrations, each raised to the power of their stoichiometric coefficients:
$$\boxed{K_c = \frac{[\text{NO}_2]^2}{[\text{NO}]^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-000682 |
Programming | Python | hard | Om Nom is the main character of a game "Cut the Rope". He is a bright little monster who likes visiting friends living at the other side of the park. However the dark old parks can scare even somebody as fearless as Om Nom, so he asks you to help him.
The park consists of 2n + 1 - 1 squares connected by roads so that ... | [
"Looking at this problem, I need to find the minimum lights to add so all root-to-leaf paths have equal sums in a full binary tree.",
"**Key Insight:** Process bottom-up.",
"For each internal node, the two child subtrees must have equal total path sums.",
"The minimum fix is to add lights equal to the differe... | Looking at this problem, I need to find the minimum lights to add so all root-to-leaf paths have equal sums in a full binary tree.
**Key Insight:** Process bottom-up. For each internal node, the two child subtrees must have equal total path sums. The minimum fix is to add lights equal to the difference between the lar... | 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-000683 |
Programming | - | hard | Create a diff tool that compares two JSON or YAML files and reports semantic differences as a C# CLI utility. Write comprehensive help text, handle all common error cases, and add at least one test. | [
"# JsonDiff – Semantic JSON/YAML Diff CLI",
"## Project Structure",
"```\nJsonDiff/\n├── JsonDiff.sln\n├── src/\n│ └── JsonDiff/\n│ ├── JsonDiff.csproj\n│ ├── Program.cs\n│ ├── DiffEngine.cs\n│ ├── DiffResult.cs\n│ ├── DocumentNormalizer.cs\n│ ├── FileLoader.cs\n│ ├──... | # JsonDiff – Semantic JSON/YAML Diff CLI
## Project Structure
```
JsonDiff/
├── JsonDiff.sln
├── src/
│ └── JsonDiff/
│ ├── JsonDiff.csproj
│ ├── Program.cs
│ ├── DiffEngine.cs
│ ├── DiffResult.cs
│ ├── DocumentNormalizer.cs
│ ├── FileLoader.cs
│ ├── HelpText.cs
│ └──... | 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-000684 |
Artificial Intelligence | Logic Puzzle | medium | I placed three gears in a triangle so that each gear is touching the other two. If I spin the first gear clockwise, which direction does the third gear turn? | [
"This is a classic trick question, and the answer is: **it can't.** The three gears would be locked and unable to turn at all.",
"Here's why:",
"- If **Gear 1** spins **clockwise**, then **Gear 2** (meshed with it) must spin **counter-clockwise**.\n- **Gear 3**, meshed with Gear 2, must then spin **clockwise**.... | This is a classic trick question, and the answer is: **it can't.** The three gears would be locked and unable to turn at all.
Here's why:
- If **Gear 1** spins **clockwise**, then **Gear 2** (meshed with it) must spin **counter-clockwise**.
- **Gear 3**, meshed with Gear 2, must then spin **clockwise**.
- But Gear 3 ... | 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-000685 |
Programming | - | medium | In JavaScript, implement a DP solution for the maximum sum path through a triangle of 6 rows. Include bottom-up tabulation and top-down memoization versions. | [
"# Maximum Sum Path in a Triangle — DP (JavaScript)",
"Given a 6-row triangle, find the maximum sum obtainable by starting at the top and moving to adjacent numbers on the row below.",
"```\n 7\n 3 8\n 8 1 0\n 2 7 4 4\n4 5 2 6 5\n2 3 8 0 6 1\n```",
"## Triangle Da... | # Maximum Sum Path in a Triangle — DP (JavaScript)
Given a 6-row triangle, find the maximum sum obtainable by starting at the top and moving to adjacent numbers on the row below.
```
7
3 8
8 1 0
2 7 4 4
4 5 2 6 5
2 3 8 0 6 1
```
## Triangle Data
```js
const triangle... | 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-000686 |
Programming | - | hard | Solve in C++: Implement an algorithm to serialize and deserialize a binary tree. Show a brute-force approach first, then optimize it. | [
"# Binary Tree Serialization & Deserialization in C++",
"## Strategy Overview",
"| | Brute-Force | Optimized |\n|---|---|---|\n| **Serialize** | Recursive DFS + repeated `+=` (many reallocations) | Pre-allocated buffer, single-pass write |\n| **Deserialize** | Split into `vector<string>` tokens, then rebuild | ... | # Binary Tree Serialization & Deserialization in C++
## Strategy Overview
| | Brute-Force | Optimized |
|---|---|---|
| **Serialize** | Recursive DFS + repeated `+=` (many reallocations) | Pre-allocated buffer, single-pass write |
| **Deserialize** | Split into `vector<string>` tokens, then rebuild | Single index cur... | 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-000687 |
Artificial Intelligence | Logic Puzzle | easy | I have 16 troy ounces of gold bars and 16 avoirdupois ounces of silver bars. Which collection is heavier? | [
"## The gold bars are heavier.",
"The key is that a **troy ounce** and an **avoirdupois ounce** are different units:",
"| Collection | Unit | Conversion | Total mass |\n|---|---|---|---|\n| 16 oz gold | troy oz | 1 troy oz ≈ **31.103 g** | ≈ **497.66 g** |\n| 16 oz silver | avoirdupois oz | 1 avoirdupois oz ≈ *... | ## The gold bars are heavier.
The key is that a **troy ounce** and an **avoirdupois ounce** are different units:
| Collection | Unit | Conversion | Total mass |
|---|---|---|---|
| 16 oz gold | troy oz | 1 troy oz ≈ **31.103 g** | ≈ **497.66 g** |
| 16 oz silver | avoirdupois oz | 1 avoirdupois oz ≈ **28.350 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-000688 |
Programming | Cpp | medium | Chef and his little brother are playing with sticks. They have total N sticks. Length of i-th stick is Ai.
Chef asks his brother to choose any four sticks and to make a rectangle with those sticks its sides. Chef warns his brother to not to break any of the sticks, he has to use sticks as a whole. Also, he wants that ... | [
"# Solution",
"## Analysis",
"To form a rectangle, we need exactly **4 sticks** that can be arranged as two pairs of equal lengths (the two sides of the rectangle).",
"**Key Insight:** For each stick length, we can form `floor(count/2)` pairs.",
"We then need to pick exactly **2 pairs** from all available p... | # Solution
## Analysis
To form a rectangle, we need exactly **4 sticks** that can be arranged as two pairs of equal lengths (the two sides of the rectangle).
**Key Insight:** For each stick length, we can form `floor(count/2)` pairs. We then need to pick exactly **2 pairs** from all available pairs. To maximize are... | 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-000689 |
Programming | - | hard | Write a Ruby script that backs up files older than 81 days to a dated archive folder, sends a summary email on completion, and logs each operation. Include retry logic for transient errors and structured logging to a file. | [
"```ruby\n#!/usr/bin/env ruby\n# frozen_string_literal: true",
"# ============================================================================\n# backup_archive.rb\n#\n# Backs up files older than 81 days into a dated archive folder,\n# sends a summary email on completion, and logs every operation.\n#\n# Usage:\n#... | ```ruby
#!/usr/bin/env ruby
# frozen_string_literal: true
# ============================================================================
# backup_archive.rb
#
# Backs up files older than 81 days into a dated archive folder,
# sends a summary email on completion, and logs every operation.
#
# Usage:
# ruby backup_arc... | 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-000690 |
Mathematics | - | medium | Rohan wants to cut a piece of string into nine pieces of equal length. He marks his cutting points on the string. Jai wants to cut the same piece of string into only eight pieces of equal length. He marks his cutting points on the string. Yuvraj then cuts the string at all the cutting points that are marked. How many p... | [
"# Finding the Number of String Pieces",
"## Setting Up the Cutting Points",
"Let me represent the string as length 1.",
"**Rohan's cuts** (9 equal pieces → 8 cut points):\n$$\\frac{1}{9}, \\frac{2}{9}, \\frac{3}{9}, \\frac{4}{9}, \\frac{5}{9}, \\frac{6}{9}, \\frac{7}{9}, \\frac{8}{9}$$",
"**Jai's cuts** (8... | # Finding the Number of String Pieces
## Setting Up the Cutting Points
Let me represent the string as length 1.
**Rohan's cuts** (9 equal pieces → 8 cut points):
$$\frac{1}{9}, \frac{2}{9}, \frac{3}{9}, \frac{4}{9}, \frac{5}{9}, \frac{6}{9}, \frac{7}{9}, \frac{8}{9}$$
**Jai's cuts** (8 equal pieces → 7 cut points):... | 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-000691 |
Science | - | hard | What are the mechanistic implications of non‑adiabatic electron–phonon coupling on the rate constants of barrierless reactions in condensed phase, and how can path‑integral molecular dynamics quantify these effects? | [
"# Non-Adiabatic Electron–Phonon Coupling in Barrierless Condensed-Phase Reactions: Mechanism and Path-Integral Quantification",
"## 1.",
"Setting the Problem",
"A barrierless reaction in condensed phase (geminate recombination, activationless electron transfer, dissociation of a solvated ion pair, proton rel... | # Non-Adiabatic Electron–Phonon Coupling in Barrierless Condensed-Phase Reactions: Mechanism and Path-Integral Quantification
## 1. Setting the Problem
A barrierless reaction in condensed phase (geminate recombination, activationless electron transfer, dissociation of a solvated ion pair, proton relay in the barrierl... | 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-000692 |
Programming | Python | medium | Chef and Roma are playing a game. Rules of the game are quite simple.
Initially there are N piles of stones on the table.
In each turn, a player can choose one pile and remove it from the table.
Each player want to maximize the total number of stones removed by him.
Chef takes the first turn.
Please tell Chef the max... | [
"# Solution",
"## Analysis",
"Since each turn simply involves picking one pile (no splitting, no combining), there's no complex strategy beyond **always picking the largest remaining pile**.",
"Here's why:",
"- If you pick a smaller pile, you gain fewer stones, and the opponent still gets the largest pile n... | # Solution
## Analysis
Since each turn simply involves picking one pile (no splitting, no combining), there's no complex strategy beyond **always picking the largest remaining pile**. Here's why:
- If you pick a smaller pile, you gain fewer stones, and the opponent still gets the largest pile next.
- There's no bene... | 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-000693 |
Mathematics | Synthetic Math | easy | Define the operation $\spadesuit$ as $a\, \spadesuit\, b = |a - b|$. What is the value of $(5 \cdot (2\, \spadesuit\, (6\, \spadesuit\, 9)))$? | [
"# Evaluating the Expression",
"## Given\n$$a\\, \\spadesuit\\, b = |a - b|$$",
"## Step-by-Step Evaluation",
"**Innermost parentheses:** $6\\, \\spadesuit\\, 9 = |6 - 9| = |-3| = 3$",
"**Next level:** $2\\, \\spadesuit\\, 3 = |2 - 3| = |-1| = 1$",
"**Final multiplication:** $5 \\cdot 1 = 5$",
"$$\\boxe... | # Evaluating the Expression
## Given
$$a\, \spadesuit\, b = |a - b|$$
## Step-by-Step Evaluation
**Innermost parentheses:** $6\, \spadesuit\, 9 = |6 - 9| = |-3| = 3$
**Next level:** $2\, \spadesuit\, 3 = |2 - 3| = |-1| = 1$
**Final multiplication:** $5 \cdot 1 = 5$
$$\boxed{5}$$ | 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-000694 |
Programming | - | medium | You are given an array A of size N, and Q queries to deal with. For each query, you are given an integer X, and you're supposed to find out if X is present in the array A or not.
Input:
The first line contains two integers, N and Q, denoting the size of array A and number of queries. The second line contains N space se... | [
"# Solution",
"**Approach:** Use a **hash set** for O(1) average-time lookups per query.",
"With N, Q up to 10⁵, a naive O(N·Q) scan would be far too slow (10¹⁰ operations), but a set gives us O(N + Q) total time.",
"## Code (Python)",
"```python\nimport sys\ninput = sys.stdin.readline",
"def main():\n ... | # Solution
**Approach:** Use a **hash set** for O(1) average-time lookups per query. With N, Q up to 10⁵, a naive O(N·Q) scan would be far too slow (10¹⁰ operations), but a set gives us O(N + Q) total time.
## Code (Python)
```python
import sys
input = sys.stdin.readline
def main():
data = sys.stdin.buffer.read... | 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-000695 |
Mathematics | Synthetic Amc | easy | How many primes less than $50$ have $7$ as the ones digit?
$\text{(A)} \ 2 \qquad \text{(B)} \ 3 \qquad \text{(C)} \ 4 \qquad \text{(D)} \ 5 \qquad \text{(E)} \ 6$ | [
"# Finding Primes Less Than 50 Ending in 7",
"## Step 1: List all numbers less than 50 with 7 in the ones digit",
"The candidates are: **7, 17, 27, 37, 47**",
"## Step 2: Check each for primality",
"| Number | Prime? | Reasoning |\n|--------|--------|-----------|\n| 7 | ✅ Yes | No divisors other than 1 and ... | # Finding Primes Less Than 50 Ending in 7
## Step 1: List all numbers less than 50 with 7 in the ones digit
The candidates are: **7, 17, 27, 37, 47**
## Step 2: Check each for primality
| Number | Prime? | Reasoning |
|--------|--------|-----------|
| 7 | ✅ Yes | No divisors other than 1 and 7 |
| 17 | ✅ Yes | No 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-000696 |
Science | Physics | easy | a) What is the efficiency of the prototype power plant? Write down the numerical estimate. | [
"I'd be happy to help, but I don't have enough context to identify **which** prototype power plant you're referring to.",
"The phrasing \"the prototype power plant\" and \"write down the numerical estimate\" suggests this is part of a specific problem set, exam, or document (e.g., a case study, a table of thermal... | I'd be happy to help, but I don't have enough context to identify **which** prototype power plant you're referring to. The phrasing "the prototype power plant" and "write down the numerical estimate" suggests this is part of a specific problem set, exam, or document (e.g., a case study, a table of thermal/electrical da... | 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-000697 |
Programming | - | hard | Build a fully playable Whack-a-Mole game using HTML/CSS/JavaScript and pure JavaScript (no external libraries). Implement the following mechanics: 30-second countdown timer; easy/medium/hard difficulty affecting mole visibility duration; 9-hole grid with CSS-animated mole pop-up from each hole; final score screen with ... | [
"# Whack-a-Mole — Complete Single-File Game",
"Save this as `whack-a-mole.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<title>Whack-a-Mole</title>\n<style>\n /* ==... | # Whack-a-Mole — Complete Single-File Game
Save this as `whack-a-mole.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">
<title>Whack-a-Mole</title>
<style>
/* ============ GLOBAL STYLES ====... | 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-000698 |
Science | - | hard | In the context of high-resolution mass spectrometry coupled with ion mobility, how can one quantitatively deconvolute overlapping isomeric peptide signals to extract accurate collision cross‑section distributions for post‑translational modification site localization? | [
"# Quantitative Deconvolution of Overlapping Isomeric Peptide Signals in IMS-HRMS for PTM Site Localization",
"## 1.",
"Problem Formulation",
"Consider a peptide carrying a single PTM (phosphorylation, acetylation, oxidation, etc.) at one of *n* possible sites.",
"All *n* isomers share an identical exact ma... | # Quantitative Deconvolution of Overlapping Isomeric Peptide Signals in IMS-HRMS for PTM Site Localization
## 1. Problem Formulation
Consider a peptide carrying a single PTM (phosphorylation, acetylation, oxidation, etc.) at one of *n* possible sites. All *n* isomers share an identical exact mass (same elemental comp... | 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-000699 |
Artificial Intelligence | Logic Puzzle | easy | I have 20 apples and I give 8 to my friend. How many apples would I have if I hadn't given any away? | [
"If you hadn't given any away, you'd still have **20** apples.",
"The question asks what would happen in the scenario where you *didn't* give any away, so the 8 apples given to your friend is a distractor.",
"You'd still have all your original 20."
] | If you hadn't given any away, you'd still have **20** apples.
The question asks what would happen in the scenario where you *didn't* give any away, so the 8 apples given to your friend is a distractor. You'd still have all your original 20. | 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-000700 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.