Dataset Viewer
Auto-converted to Parquet Duplicate
info
stringlengths
120
50k
question
stringlengths
504
10.4k
avg@8_qwen3_4b_instruct_2507
float64
0
0.88
{"tests": "{\"inputs\": [\"\\\"51230100\\\"\", \"\\\"123\\\"\", \"\\\"61\\\"\", \"\\\"680\\\"\", \"\\\"561\\\"\", \"\\\"563000\\\"\", \"\\\"2400000\\\"\", \"\\\"231400\\\"\", \"\\\"68085000000\\\"\", \"\\\"601626560\\\"\", \"\\\"8438682911711716633214751365219626743737461956719455758661336162737333413873348734551161599...
Given a positive integer num represented as a string, return the integer num without trailing zeros as a string. Example 1: Input: num = "51230100" Output: "512301" Explanation: Integer "51230100" has 2 trailing zeros, we remove them and return integer "512301". Example 2: Input: num = "123" Output: "123" Explanat...
0.375
{"tests": "{\"inputs\": [\"[2, 1, 3]\", \"[1, 3, 3, 2]\", \"[1, 1]\", \"[3, 4, 4, 1, 2, 1]\", \"[1, 1]\", \"[1, 2, 2]\", \"[1, 4, 2, 3]\", \"[1, 3, 4, 4, 2]\", \"[3, 2, 5, 5, 1, 4]\", \"[4, 1, 2, 6, 6, 5, 3]\", \"[3, 7, 7, 6, 5, 4, 1, 2]\", \"[10, 9, 2, 7, 1, 4, 8, 5, 11, 3, 6, 11]\", \"[18, 14, 16, 20, 33, 3, 24, 11, ...
You are given an integer array nums. We consider an array good if it is a permutation of an array base[n]. base[n] = [1, 2, ..., n - 1, n, n] (in other words, it is an array of length n + 1 which contains 1 to n - 1 exactly once, plus two occurrences of n). For example, base[1] = [1, 1] and base[3] = [1, 2, 3, 3]. Retu...
0.75
{"tests": "{\"inputs\": [\"[2, 2, 1]\\n4\", \"[2, 1, 3]\\n5\", \"[2, 3, 3, 2, 3]\\n6\", \"[2]\\n114\", \"[17, 17]\\n3\", \"[25, 81]\\n48\", \"[20, 33, 1]\\n4\", \"[33, 89, 9]\\n200\", \"[14, 5, 7, 20]\\n5\", \"[47, 27, 74]\\n200\", \"[68, 46, 28]\\n200\", \"[2, 4, 26, 20, 49, 13, 47, 22, 3, 3, 28, 18, 11, 20, 39, 5, 8,...
You are given an array nums of length n and an integer m. You need to determine if it is possible to split the array into n non-empty arrays by performing a series of steps. In each step, you can select an existing array (which may be the result of previous steps) with a length of at least two and split it into two sub...
0
{"tests": "{\"inputs\": [\"5\\n2\", \"3\\n3\", \"2\\n5\", \"1\\n7\", \"1\\n4\", \"6\\n2\", \"6\\n1\", \"1\\n1\", \"1\\n3\", \"2\\n1\", \"48\\n42\", \"49\\n41\", \"50\\n49\", \"49\\n48\"], \"outputs\": [\"3\", \"10\", \"6\", \"3\", \"3\", \"1\", \"0\", \"3\", \"3\", \"3\", \"1162\", \"1167\", \"1323\", \"1272\"], \"fn_n...
You are given two positive integers n and limit. Return the total number of ways to distribute n candies among 3 children such that no child gets more than limit candies. Example 1: Input: n = 5, limit = 2 Output: 3 Explanation: There are 3 ways to distribute 5 candies such that no child gets more than 2 candies: (1...
0.125
{"tests": "{\"inputs\": [\"\\\"aaaaa\\\"\", \"\\\"abddez\\\"\", \"\\\"zyxyxyz\\\"\", \"\\\"\\\"\", \"\\\"x\\\"\", \"\\\"k\\\"\", \"\\\"e\\\"\", \"\\\"a\\\"\", \"\\\"i\\\"\", \"\\\"d\\\"\", \"\\\"s\\\"\", \"\\\"b\\\"\", \"\\\"tuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghij...
You are given a 0-indexed string word. In one operation, you can pick any index i of word and change word[i] to any lowercase English letter. Return the minimum number of operations needed to remove all adjacent almost-equal characters from word. Two characters a and b are almost-equal if a == b or a and b are adjacent...
0
{"tests": "{\"inputs\": [\"\\\"accca\\\"\\n2\", \"\\\"aabaab\\\"\\n3\", \"\\\"xxyz\\\"\\n1\", \"\\\"abcde\\\"\\n5\", \"\\\"aaaaaa\\\"\\n2\", \"\\\"wjlcta\\\"\\n5\", \"\\\"eictzzwx\\\"\\n1\", \"\\\"fvcalcqn\\\"\\n3\", \"\\\"zcjvkodq\\\"\\n5\", \"\\\"eifhjtmuj\\\"\\n7\", \"\\\"cxdzvmcbcv\\\"\\n3\", \"\\\"rnqrabcxrh\\\"\\...
You are given a 0-indexed string s and an integer k. You are to perform the following partitioning operations until s is empty: Choose the longest prefix of s containing at most k distinct characters. Delete the prefix from s and increase the number of partitions by one. The remaining characters (if any) in s maintain...
0
{"tests": "{\"inputs\": [\"[1, 2, 3, 4, 5, 6]\\n[1, 1]\", \"[1, 4, 4, 1, 3, 5, 5, 3]\\n[1, 0, -1]\", \"[81, 50]\\n[-1]\", \"[7, 57, 88]\\n[-1]\", \"[28, 53, 21]\\n[0]\", \"[5, 47, 63, 48]\\n[-1, 0]\", \"[46, 60, 80, 98, 90]\\n[0, 1]\", \"[9, 83, 77, 75, 39, 32, 68, 60]\\n[0]\", \"[73, 26, 7, 20, 30, 48, 97]\\n[-1, 1]\"...
You are given a 0-indexed integer array nums of size n, and a 0-indexed integer array pattern of size m consisting of integers -1, 0, and 1. A subarray nums[i..j] of size m + 1 is said to match the pattern if the following conditions hold for each element pattern[k]: nums[i + k + 1] > nums[i + k] if pattern[k] == 1. n...
0.75
{"tests": "{\"inputs\": [\"[8, 4, 2, 30, 15]\", \"[1, 2, 3, 4, 5]\", \"[3, 16, 8, 4, 2]\", \"[29]\", \"[14]\", \"[34]\", \"[99]\", \"[206]\", \"[159]\", \"[249]\", \"[6, 31]\", \"[47, 247]\", \"[9, 148, 121]\", \"[73786976294838206463, 4294967295, 1048575, 4194303, 281474976710655, 75557863725914323419135, 3, 360287970...
You are given a 0-indexed array of positive integers nums. In one operation, you can swap any two adjacent elements if they have the same number of set bits. You are allowed to do this operation any number of times (including zero). Return true if you can sort the array, else return false. Example 1: Input: nums = [...
0.5
{"tests": "{\"inputs\": [\"[1, 1, 2, 2, 3, 4]\", \"[1, 1, 1, 1]\", \"[5, 9]\", \"[5, 3]\", \"[24, 32]\", \"[2, 1, 1, 2]\", \"[9, 7, 7, 9]\", \"[4, 1, 3, 2]\", \"[1, 1, 3, 2]\", \"[1, 1, 1, 1]\", \"[10, 4, 4, 6]\", \"[1, 1, 1, 2, 3, 4]\", \"[5, 84, 22, 86, 87, 78, 53, 86, 49, 6, 31, 75, 96, 86, 37, 5, 84, 1, 96, 9, 17, ...
You are given an integer array nums of even length. You have to split the array into two parts nums1 and nums2 such that: nums1.length == nums2.length == nums.length / 2. nums1 should contain distinct elements. nums2 should also contain distinct elements. Return true if it is possible to split the array, and false ot...
0.125
{"tests": "{\"inputs\": [\"3\\n3 5 10\\n4 3 3\\n2 2 6\\n\", \"3\\n3 5 10\\n4 3 3\\n2 2 3\\n\", \"2\\n4 8\\n3 1 100\\n4 10000 100\\n\", \"1\\n1\\n1 1 1\\n1 1 1\\n\", \"1\\n1328\\n1 73192516 779\\n1 468279677 682\\n\", \"1\\n1093\\n1 150127956 237\\n1 905660966 894\\n\", \"1\\n14807\\n43 583824808 729\\n15 917174828 159\...
As the factory manager of Keyence, you want to monitor several sections on a conveyor belt. There are a total of N sections you want to monitor, and the length of the i-th section is D_i meters. There are two types of sensors to choose from, and below is some information about each sensor. - Type-j sensor (1\leq j \le...
0
{"tests": "{\"inputs\": [\"4 5\\n1 2 3 4 5\\n6 7 8 9 10\\n11 12 13 14 15\\n16 17 18 19 20\\n1 3 2 5 4\\n11 13 12 15 14\\n6 8 7 10 9\\n16 18 17 20 19\\n\", \"2 2\\n1 1\\n1 1\\n1 1\\n1 1000000000\\n\", \"3 3\\n8 1 6\\n3 5 7\\n4 9 2\\n8 1 6\\n3 5 7\\n4 9 2\\n\", \"5 5\\n710511029 136397527 763027379 644706927 447672230\\n...
You are given two grids, A and B, each with H rows and W columns. For each pair of integers (i, j) satisfying 1 \leq i \leq H and 1 \leq j \leq W, let (i, j) denote the cell in the i-th row and j-th column. In grid A, cell (i, j) contains the integer A_{i, j}. In grid B, cell (i, j) contains the integer B_{i, j}. You w...
0.625
{"tests": "{\"inputs\": [\"3 1\\n\", \"2 1\\n\", \"2 2\\n\", \"3 1\\n\", \"3 3\\n\", \"4 1\\n\", \"4 2\\n\", \"4 3\\n\", \"4 4\\n\", \"100 30\\n\", \"100 93\\n\", \"100 89\\n\", \"100 100\\n\"], \"outputs\": [\"2\\n1 2 \\n1 3 \\n2\\n\", \"1\\n1 2 \\n2\\n\", \"1\\n1 2 \\n1\\n\", \"2\\n1 2 \\n1 3 \\n2\\n\", \"2\\n1 2 \\n...
This is an interactive problem (a type of problem where your program interacts with the judge program through Standard Input and Output). There are N bottles of juice, numbered 1 to N. It has been discovered that exactly one of these bottles has gone bad. Even a small sip of the spoiled juice will cause stomach upset t...
0
{"tests": "{\"inputs\": [\"3 4\\n1 2 5\\n2 1 -3\\n2 3 -4\\n3 1 100\\n\", \"3 2\\n1 2 0\\n2 1 0\\n\", \"5 9\\n1 2 -246288\\n4 5 -222742\\n3 1 246288\\n3 4 947824\\n5 2 -178721\\n4 3 -947824\\n5 4 756570\\n2 5 707902\\n5 1 36781\\n\", \"2 1\\n2 1 0\\n\", \"6 8\\n1 5 -4\\n2 1 -803\\n3 1 -1595\\n3 4 -5960\\n3 5 -1599\\n5 2...
There is a weighted simple directed graph with N vertices and M edges. The vertices are numbered 1 to N, and the i-th edge has a weight of W_i and extends from vertex U_i to vertex V_i. The weights can be negative, but the graph does not contain negative cycles. Determine whether there is a walk that visits each vert...
0
{"tests": "{\"inputs\": [\"2 5\\n\", \"0 0\\n\", \"7 1\\n\", \"1 0\\n\", \"2 0\\n\", \"2 1\\n\", \"1 3\\n\", \"2 3\\n\", \"0 6\\n\", \"3 4\\n\", \"0 8\\n\", \"5 4\\n\"], \"outputs\": [\"2\\n\", \"9\\n\", \"4\\n\", \"2\\n\", \"3\\n\", \"4\\n\", \"5\\n\", \"6\\n\", \"7\\n\", \"8\\n\", \"9\\n\", \"0\\n\"], \"fn_name\": nu...
You are given two integers A and B, each between 0 and 9, inclusive. Print any integer between 0 and 9, inclusive, that is not equal to A + B. Input The input is given from Standard Input in the following format: A B Output Print any integer between 0 and 9, inclusive, that is not equal to A + B. Constraints - 0...
0
{"tests": "{\"inputs\": [\"840 84 7\\n\", \"343 34 3\\n\", \"0 0 0\\n\", \"951 154 495\\n\", \"744 621 910\\n\", \"866 178 386\\n\", \"1029 1029 1029\\n\", \"0 0 343\\n\", \"915 51 4\\n\", \"596 176 27\\n\", \"339 210 90\\n\", \"359 245 60\\n\", \"546 210 21\\n\", \"343 343 0\\n\"], \"outputs\": [\"Yes\\n0 0 0 0 6 0 6 ...
In a coordinate space, we want to place three cubes with a side length of 7 so that the volumes of the regions contained in exactly one, two, three cube(s) are V_1, V_2, V_3, respectively. For three integers a, b, c, let C(a,b,c) denote the cubic region represented by (a\leq x\leq a+7) \land (b\leq y\leq b+7) \land (c...
0
{"tests": "{\"inputs\": [\"3 2 10 20\\n\", \"3 2 20 20\\n\", \"314159265358979323 4 223606797 173205080\\n\", \"1000000000000000000 5 678409449 462213765\\n\", \"1000000000000000000 4 19417779 15359224\\n\", \"1000000000000000000 2 1000000000 1000000000\\n\", \"1000000000000000000 6 1000000000 1\\n\", \"100000000000000...
You are given an integer N. You can perform the following two types of operations: - Pay X yen to replace N with \displaystyle\left\lfloor\frac{N}{A}\right\rfloor. - Pay Y yen to roll a die (dice) that shows an integer between 1 and 6, inclusive, with equal probability. Let b be the outcome of the die, and replace N w...
0.125
{"tests": "{\"inputs\": [\"0 0 3 3\\n\", \"-1 -2 1 3\\n\", \"-1000000000 -1000000000 1000000000 1000000000\\n\", \"593578395 -294607744 709130348 746175204\\n\", \"-678601079 -990141434 909949145 506736933\\n\", \"-420376129 -732520502 229097481 -243073819\\n\", \"-1 -1 0 0\\n\", \"-880976965 -698845539 -841240811 7992...
The pattern of AtCoder's wallpaper can be represented on the xy-plane as follows: - The plane is divided by the following three types of lines: - x = n (where n is an integer) - y = n (where n is an even number) - x + y = n (where n is an even number) - Each region is painted black or white. Any two regions...
0
{"tests": "{\"inputs\": [\"[1, 2, 3, 4]\\n3\", \"[2, 2]\\n2\", \"[4, 3, -1]\\n2\", \"[100000000, 99999999, 99999998, 99999997, 99999996, 99999995, 99999994, 99999993, 99999992, 99999991]\\n10\", \"[3,369009,745365,1129173,1520619,1919958,2327340,2742999,3167043,3599574,4040745,4490808,4950051,5418543,5896347,6383565,68...
You are given an integer array nums of length n, and a positive integer k. The power of a subsequence is defined as the minimum absolute difference between any two elements in the subsequence. Return the sum of powers of all subsequences of nums which have length equal to k. Since the answer may be large, return it mod...
0.625
{"tests": "{\"inputs\": [\"5 0\\n2 5\\n\", \"3 1\\n4 1\\n\", \"2552608206527595 5411232866732612\\n771856005518028 7206210729152763\\n\", \"4781732879448891 183482112471753\\n4781732879448891 9644257416479985\\n\", \"6544605838412317 5090865519680273\\n3731935893323877 2278195574591833\\n\", \"0 0\\n10000000000000000 0...
The coordinate plane is covered with 2\times1 tiles. The tiles are laid out according to the following rules: - For an integer pair (i,j), the square A _ {i,j}=\lbrace(x,y)\mid i\leq x\leq i+1\wedge j\leq y\leq j+1\rbrace is contained in one tile. - When i+j is even, A _ {i,j} and A _ {i + 1,j} are contained in the sa...
0
{"tests": "{\"inputs\": [\"363\\n\", \"101\\n\", \"3154625100\\n\", \"146659312800\\n\", \"248961081600\\n\", \"963761198400\\n\", \"936888861285\\n\", \"637822752336\\n\", \"549755813888\\n\", \"240940299600\\n\", \"442597478400\\n\", \"110649369600\\n\", \"39571817593\\n\", \"771852316660\\n\", \"607588581600\\n\", \...
You are given an integer N. Print a string S that satisfies all of the following conditions. If no such string exists, print -1. - S is a string of length between 1 and 1000, inclusive, consisting of the characters 1, 2, 3, 4, 5, 6, 7, 8, 9, and * (multiplication symbol). - S is a palindrome. - The first character of ...
0
{"tests": "{\"inputs\": [\"4 8 4\\n1 5\\n3 2\\n4 1\\n5 3\\n\", \"2 1 1\\n3 2\\n3 2\\n\", \"2 100 100\\n3 2\\n3 2\\n\", \"6 364 463\\n230 381\\n154 200\\n328 407\\n339 94\\n193 10\\n115 309\\n\", \"18 10000 10000\\n5790 8778\\n9995 9908\\n9016 2300\\n2633 3650\\n2312 5582\\n8853 6097\\n8881 8620\\n6427 3925\\n9355 5240\...
Takahashi has prepared N dishes for Snuke. The dishes are numbered from 1 to N, and dish i has a sweetness of A_i and a saltiness of B_i. Takahashi can arrange these dishes in any order he likes. Snuke will eat the dishes in the order they are arranged, but if at any point the total sweetness of the dishes he has eaten...
0
{"tests": "{\"inputs\": [\"3\\n2\\n[1, 3]\\n[5]\", \"2\\n2\\n[7]\\n[4]\", \"10\\n10\\n[420, 1, 597, 1, 905, 1, 261, 1, 681]\\n[101, 1, 333, 1, 502, 1, 409, 1, 787]\", \"6\\n2\\n[1,3,2,3,1]\\n[1]\", \"17\\n18\\n[781, 307, 573, 596, 536, 761, 591, 848, 858, 302, 652, 540, 770, 607, 809, 322]\\n[841, 828, 682, 480, 391, 9...
There is an m x n cake that needs to be cut into 1 x 1 pieces. You are given integers m, n, and two arrays: horizontalCut of size m - 1, where horizontalCut[i] represents the cost to cut along the horizontal line i. verticalCut of size n - 1, where verticalCut[j] represents the cost to cut along the vertical line j. ...
0
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
2,481

Collection including PrimeIntellect/INTELLECT-3-RL