messages listlengths 2 2 |
|---|
[
{
"role": "user",
"content": "You are given a string s=s_1s_2... s_n of length n, which only contains digits 1, 2, ..., 9.\n\nA substring s[l ... r] of s is a string s_l s_{l + 1} s_{l + 2} … s_r. A substring s[l ... r] of s is called even if the number represented by it is even. \n\nFind the number of even... |
[
{
"role": "user",
"content": "Write a function to find the minimum difference between the maximum and minimum values of any subarray of size k.\n\nSolve the problem starting with the provided function header.\n\nFunction header:\n```\ndef min_diff_subarray(arr, k):\n```\n\nPlease place the solution code in ... |
[
{
"role": "user",
"content": "Given two strings `ransomNote` and `magazine`, return `true` _if_ `ransomNote` _can be constructed by using the letters from_ `magazine` _and_ `false` _otherwise_.\n\nEach letter in `magazine` can only be used once in `ransomNote`.\n\n**Example 1:**\n\n**Input:** ransomNote = \... |
[
{
"role": "user",
"content": "Write a python function that takes a list of numbers as input and returns a list of tuples. Each tuple represents the minimum and maximum value from the original list excluding the current number at the index.\n\nSolve the problem starting with the provided function header.\n\n... |
[
{
"role": "user",
"content": "Write a Python function that takes a string as input and returns the string with the characters replaced according to the given rules. The function should replace all occurrences of a digit x in the string with a digit y, and return the modified string. The function should hand... |
[
{
"role": "user",
"content": "Takahashi had a pair of two positive integers not exceeding N, (a,b), which he has forgotten. He remembers that the remainder of a divided by b was greater than or equal to K. Find the number of possible pairs that he may have had.\n\nConstraints\n\n* 1 \\leq N \\leq 10^5\n* 0 ... |
[
{
"role": "user",
"content": "Dora the explorer has decided to use her money after several years of juicy royalties to go shopping. What better place to shop than Nlogonia?\n\nThere are n stores numbered from 1 to n in Nlogonia. The i-th of these stores offers a positive integer a_i.\n\nEach day among the l... |
[
{
"role": "user",
"content": "Write a function to check if a string contains any repeating characters within a given character window.\n\nSolve the problem starting with the provided function header.\n\nFunction header:\n```\ndef has_repeating_chars_within_window(input_string, window_size):\n```\n\nPlease p... |
[
{
"role": "user",
"content": "If you have not ever heard the term **Arithmetic Progrossion**, refer to: \nhttp://www.codewars.com/kata/find-the-missing-term-in-an-arithmetic-progression/python\n\nAnd here is an unordered version. Try if you can survive lists of **MASSIVE** numbers (which means time limit sh... |
[
{
"role": "user",
"content": "An undirected graph of `n` nodes is defined by `edgeList`, where `edgeList[i] = [ui, vi, disi]` denotes an edge between nodes `ui` and `vi` with distance `disi`. Note that there may be multiple edges between two nodes, and the graph may not be connected.\n\nImplement the `Dista... |
[
{
"role": "user",
"content": "A TV show called \"Guess a number!\" is gathering popularity. The whole Berland, the old and the young, are watching the show.\n\nThe rules are simple. The host thinks of an integer y and the participants guess it by asking questions to the host. There are four types of accepta... |
[
{
"role": "user",
"content": "Hasan loves playing games and has recently discovered a game called TopScore. In this soccer-like game there are p players doing penalty shoot-outs. Winner is the one who scores the most. In case of ties, one of the top-scorers will be declared as the winner randomly with equal... |
[
{
"role": "user",
"content": "Solve the query ,\n\ngiven f(0)=0 , f(1)=1 , f(2)=1 \n\nf(n) = f(n-2) + f(n-3) + n*2 \n\nInput\n\nFirst line denotes the number of test cases T\n\nT lines follow each containing a number n\n\nOutput\n\nOutput T lines, As the number can be very large, output the answer modulo 10... |
[
{
"role": "user",
"content": "The new camp by widely-known over the country Spring Programming Camp is going to start soon. Hence, all the team of friendly curators and teachers started composing the camp's schedule. After some continuous discussion, they came up with a schedule $s$, which can be represente... |
End of preview. Expand in Data Studio
All prompts were taken from Modotte/CodeX-2M-Thinking, which contains multiple traces per prompt whereas this dataset only provides one trace per prompt. Generations were with https://huggingface.co/nvidia/Gemma-4-31B-IT-NVFP4 (a mix of BF16/FP8 weights that NVIDIA configured with FP8 KV cache; benchmarks show performs similarly to BF16 for coding). No system prompt was used.
- Downloads last month
- 16