messages list | tools string | prompt_id string | source string | subset string | source_file string | expected_answer string | extracted_answer string | metadata string |
|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Salem gave you n sticks with integer positive lengths a_1, a_2, …, a_n.\n\nFor every stick, you can change its length to any other positive integer length (that is, either shrink or stretch it). The cost of changing the stick's length from a to b is |a - b|, where |x| means the... | [] | c92a22297fa1a2e3db90-5 | OpenCodeReasoning-2 | nemotron-curated-OpenCodeReasoning-2 | data-00001.parquet | n = int(input())
a = list(map(int, input().split()))
t_candidates = set()
for num in a:
t_candidates.add(num - 1)
t_candidates.add(num)
t_candidates.add(num + 1)
t_candidates = [t for t in t_candidates if t >= 1]
min_cost = float('inf')
best_t = None
for t in t_candidates:
allowed_x = []
if t - 1... | import sys
def solve() -> None:
data = sys.stdin.read().strip().split()
if not data:
return
n = int(data[0])
a = list(map(int, data[1:1 + n]))
max_a = max(a)
best_cost = 10**9
best_t = 1
for t in range(1, max_a + 2): # inclusive upper bound max_a+1
total = 0
... | {"dataset":"nemotron-curated-traces","format":"qwen36","source":"OpenCodeReasoning-2","subset":"nemotron-curated-OpenCodeReasoning-2","source_file":"data-00001.parquet","source_path":"nemotron-curated-OpenCodeReasoning-2/data-00001.parquet","prompt_id":"c92a22297fa1a2e3db90-5"} |
[
{
"role": "user",
"content": "Petya wrote a programme on C++ that calculated a very interesting function f(n). Petya ran the program with a certain value of n and went to the kitchen to have some tea. The history has no records concerning how long the program had been working. By the time Petya returned, it... | [] | a8ebe09f3e973f3dc1e9-7 | OpenCodeReasoning-2 | nemotron-curated-OpenCodeReasoning-2 | data-00001.parquet | import sys
import re
def tokenize(s):
tokens = []
i = 0
n = len(s)
while i < n:
if s[i].isspace():
i += 1
continue
if i+1 < n and s[i:i+2] in ('==', '<=', '>='):
tokens.append(s[i:i+2])
i += 2
elif s[i] in ('>', '<', '=', '+', '-',... | #include <bits/stdc++.h>
using namespace std;
const int MOD = 32768;
struct Token {
enum Type { NUMBER, IDENT, OP, END } type;
string text; // for IDENT and OP
int value; // for NUMBER
};
vector<Token> tokenize(const string& s) {
vector<Token> tokens;
size_t i = 0;
while (i < s.size()) ... | {"dataset":"nemotron-curated-traces","format":"qwen36","source":"OpenCodeReasoning-2","subset":"nemotron-curated-OpenCodeReasoning-2","source_file":"data-00001.parquet","source_path":"nemotron-curated-OpenCodeReasoning-2/data-00001.parquet","prompt_id":"a8ebe09f3e973f3dc1e9-7"} |
[
{
"role": "user",
"content": "Problem Statement\n\n\nFind the minimum prime number greater than or equal to X.\n\nInput\n\n\nInput is given from Standard Input in the following format:\nX\n\nOutput\n\n\nPrint the minimum prime number greater than or equal to X.\n\nConstraints\n\n\n\n- 2 \\le X \\le 10^5 \n... | [] | daacff1fc752a15b3e34-7 | HARDTESTS-7x-transpiled | nemotron-curated-HARDTESTS-V4-transpiled | data-00006.parquet | ```python
import sys
MAX = 1000000
def sieve():
prime = [True] * MAX
prime[0] = prime[1] = False
for i in range(2, MAX):
if prime[i]:
step = i
start = i * i
if start < MAX:
for j in range(start, MAX, step):
prime[j] = False
... | import sys
def main():
X = int(sys.stdin.readline().strip())
# Since X <= 100000 and prime gaps are small, a limit of 200000 is safe.
limit = 200000
is_prime = [True] * (limit + 1)
is_prime[0] = is_prime[1] = False
for i in range(2, int(limit ** 0.5) + 1):
if is_prime[i]:
st... | {"dataset":"nemotron-curated-traces","format":"qwen36","source":"HARDTESTS-7x-transpiled","subset":"nemotron-curated-HARDTESTS-V4-transpiled","source_file":"data-00006.parquet","source_path":"nemotron-curated-HARDTESTS-V4-transpiled/data-00006.parquet","prompt_id":"daacff1fc752a15b3e34-7"} |
[{"role":"user","content":"## Problem Statement\n\nYou are given a string $s$, consisting of lowerca(...TRUNCATED) | [] | acb0037279cd4f9728df-1 | HARDTESTS-7x-transpiled | nemotron-curated-HARDTESTS-V4-transpiled | data-00005.parquet | "```python\nimport sys\n\ndef solve() -> None:\n data = sys.stdin.read().split()\n if not data(...TRUNCATED) | "import sys\n\ndef solve() -> None:\n data = sys.stdin.read().split()\n if not data:\n (...TRUNCATED) | "{\"dataset\":\"nemotron-curated-traces\",\"format\":\"qwen36\",\"source\":\"HARDTESTS-7x-transpiled(...TRUNCATED) |
[{"role":"user","content":"## Problem Statement\n\nOver time, Alexey's mail box got littered with to(...TRUNCATED) | [] | b8ba4fc1bb3b51c13150-3 | HARDTESTS | nemotron-curated-HARDTESTS-V4Flash | data-00001.parquet | "```cpp\n#include <bits/stdc++.h>\n#define ri register int\nusing namespace std;\nint a[1001],ans=0,(...TRUNCATED) | "#include <iostream>\n#include <vector>\nusing namespace std;\n\nint main() {\n int n;\n cin >(...TRUNCATED) | "{\"dataset\":\"nemotron-curated-traces\",\"format\":\"qwen36\",\"source\":\"HARDTESTS\",\"subset\":(...TRUNCATED) |
[{"role":"user","content":"# Feynman's squares\nRichard Phillips Feynman was a well-known American p(...TRUNCATED) | [] | 3a265198570ebb741e67-8 | HARDTESTS | nemotron-curated-HARDTESTS-V4Flash | data-00000.parquet | ```python
def count_squares(n):
return sum([i * i for i in range(n + 1)])
``` | "long long count_squares(int n) {\n // Use long long to avoid overflow\n long long N = n;\n (...TRUNCATED) | "{\"dataset\":\"nemotron-curated-traces\",\"format\":\"qwen36\",\"source\":\"HARDTESTS\",\"subset\":(...TRUNCATED) |
[{"role":"user","content":"Heidi has now broken the first level of encryption of the Death Star plan(...TRUNCATED) | [] | ab352d32a2da1297301c-1 | OpenCodeReasoning-2 | nemotron-curated-OpenCodeReasoning-2-V4Flash | data-00000.parquet | "def main():\n import sys\n input = sys.stdin.read().split()\n idx = 0\n N = int(input[i(...TRUNCATED) | "import sys\n\ndef solve() -> None:\n data = sys.stdin.buffer.read().split()\n if not data:\n (...TRUNCATED) | "{\"dataset\":\"nemotron-curated-traces\",\"format\":\"qwen36\",\"source\":\"OpenCodeReasoning-2\",\(...TRUNCATED) |
[{"role":"user","content":"The Manager Manoj has thought of another way to generate revenue for his (...TRUNCATED) | [] | d65bde7a6bdfaa3b910f-6 | HARDTESTS | nemotron-curated-HARDTESTS-V4Flash | data-00001.parquet | "```python\n'''\n# Read input from stdin and provide input before running code\n\nname = raw_input('(...TRUNCATED) | "#include <bits/stdc++.h>\nusing namespace std;\n\nconst int INF = 1e9;\n\nstruct Edge {\n int to(...TRUNCATED) | "{\"dataset\":\"nemotron-curated-traces\",\"format\":\"qwen36\",\"source\":\"HARDTESTS\",\"subset\":(...TRUNCATED) |
[{"role":"user","content":"## Problem Description\n\nIn JOI country, soccer is very popular, and the(...TRUNCATED) | [] | 4a0b6ce839b046c9914a-6 | HARDTESTS | nemotron-curated-HARDTESTS-V4Flash | data-00000.parquet | "```cpp\n#include <bits/stdc++.h>\r\nusing namespace std;\r\nusing ll=long long;\r\ntemplate<typenam(...TRUNCATED) | "#include <iostream>\n#include <vector>\n#include <algorithm>\nusing namespace std;\n\nint main() {\(...TRUNCATED) | "{\"dataset\":\"nemotron-curated-traces\",\"format\":\"qwen36\",\"source\":\"HARDTESTS\",\"subset\":(...TRUNCATED) |
[{"role":"user","content":"Bajtek is learning to skate on ice. He's a beginner, so his only mode of (...TRUNCATED) | [] | 28491d93f0c2521f4802-8 | OpenCodeReasoning-2 | nemotron-curated-OpenCodeReasoning-2-V4Flash | data-00000.parquet | "class DSU:\n def __init__(self, n):\n self.parent = list(range(n))\n self.rank = [(...TRUNCATED) | "#include <iostream>\n#include <vector>\n#include <set>\nusing namespace std;\n\nstruct DSU {\n v(...TRUNCATED) | "{\"dataset\":\"nemotron-curated-traces\",\"format\":\"qwen36\",\"source\":\"OpenCodeReasoning-2\",\(...TRUNCATED) |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 18