Search is not available for this dataset
instruction_seed stringlengths 29 14k | solutions stringlengths 2 1.9M | starter_code stringlengths 0 1.47k | input_output stringlengths 29 79.2M | difficulty stringclasses 6
values | raw_tags stringlengths 2 277 | name stringlengths 3 100 ⌀ | source stringclasses 10
values | tags stringlengths 2 183 | skill_types stringclasses 113
values | url stringlengths 34 138 ⌀ | Expected Auxiliary Space stringclasses 299
values | time_limit stringclasses 130
values | date stringlengths 10 10 ⌀ | picture_num stringclasses 8
values | memory_limit stringclasses 27
values | Expected Time Complexity stringclasses 634
values | embedding sequencelengths 3.07k 3.07k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
This is an interactive problem.
In good old times dwarves tried to develop extrasensory abilities:
* Exactly n dwarves entered completely dark cave.
* Each dwarf received a hat — white or black. While in cave, none of the dwarves was able to see either his own hat or hats of other Dwarves.
* Dwarves went out ... | [] | {"inputs": ["hack\n30\n1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "random\n22\n2\n", "random\n20\n11\n", "random\n10\n1\n", "random\n20\n12\n", "random\n30\n14\n", "random\n23\n1\n", "predefined\n15\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 0\n", "random\n21\n2\n", "random\n22\n1\n", "random\n28\n1\n", "random\... | HARD | ['interactive', 'binary search', 'geometry', 'constructive algorithms'] | null | codeforces | ['Geometry', 'Sorting', 'Constructive algorithms'] | ['Sorting'] | https://codeforces.com/problemset/problem/1063/C | null | 2.0 seconds | null | null | 256.0 megabytes | null | [
0.007298862095922232,
-0.07029411196708679,
-0.0006856563268229365,
-0.019779473543167114,
0.03523588553071022,
-0.005796155426651239,
0.005788752809166908,
0.06721467524766922,
0.020282842218875885,
0.0046561709605157375,
-0.042667992413043976,
0.0006366147426888347,
0.023465916514396667,
... | |
Little Petya likes to play a lot. Most of all he likes to play a game «Holes». This is a game for one person with following rules:
There are N holes located in a single row and numbered from left to right with numbers from 1 to N. Each hole has it's own power (hole number i has the power ai). If you throw a ball into ... | [] | {"inputs": ["10 10\n5 1 2 4 1 7 3 8 10 8\n0 5 6\n1 8\n1 1\n0 10 3\n1 5\n1 3\n1 2\n0 6 1\n1 9\n1 1\n", "10 10\n5 1 2 8 1 7 3 8 10 8\n0 5 6\n1 8\n1 1\n0 10 3\n1 5\n1 3\n1 2\n0 6 1\n1 9\n1 1\n", "8 5\n1 1 1 1 1 1 8 2\n1 1\n0 1 3\n1 1\n0 3 4\n1 2\n", "8 5\n1 1 1 1 1 2 11 2\n1 1\n0 1 3\n1 1\n0 3 4\n1 2\n", "8 5\n1 1 1 1 1 2... | VERY_HARD | ['data structures', 'dsu'] | null | codeforces | ['Spanning trees', 'Data structures'] | ['Data structures'] | https://codeforces.com/problemset/problem/13/E | null | 1.0 seconds | null | null | 64.0 megabytes | null | [
-0.001230821362696588,
-0.033479779958724976,
0.001268637366592884,
0.0006779871764592826,
0.00630987249314785,
0.02377006784081459,
0.02061513066291809,
0.03941509500145912,
0.0032125606667250395,
0.036418624222278595,
-0.003846429055556655,
0.035294950008392334,
-0.014564569108188152,
0.... | |
"If you visit Aizu Akabeko shrine, you will find a unique paper fortune on which a number with more (...TRUNCATED) | "[\"def sub(maxs, mins):\\n\\tfor i in range(len(maxs)):\\n\\t\\tif maxs[i] != mins[i]:\\n\\t\\t\\ti(...TRUNCATED) | "{\"inputs\": [\"9714431\", \"16612328\", \"23422731\", \"754526\", \"955577\", \"75547\", \"2112\",(...TRUNCATED) | UNKNOWN_DIFFICULTY | [] | null | aizu | [] | [] | null | null | 1.0 seconds | null | null | 268.435456 megabytes | null | [0.024838225916028023,-0.047773465514183044,0.0020858286879956722,-0.019356491044163704,-0.003626679(...TRUNCATED) | |
"The number obtained by multiplying 1 by 2, 3, 5 several times (0 or more times) is called the Hammi(...TRUNCATED) | "[\"import sys\\nfrom sys import stdin\\nfrom bisect import bisect_right, bisect_left\\nfrom math im(...TRUNCATED) | "{\"inputs\": [\"3 8\\n2 27\\n1 86\\n0\", \"3 9\\n2 27\\n1 86\\n0\", \"3 8\\n1 35\\n1 86\\n0\", \"5 (...TRUNCATED) | UNKNOWN_DIFFICULTY | [] | null | aizu | [] | [] | null | null | 1.0 seconds | null | null | 134.217728 megabytes | null | [-0.020179923623800278,-0.014768985100090504,-0.013827952556312084,0.034138575196266174,0.0418236739(...TRUNCATED) | |
"Given a number s(in string form). Find the Smallest number (Not leading Zeros) which can be obtaine(...TRUNCATED) | "[\"class Solution:\\n\\n\\tdef minimum_Number(self, s):\\n\\t\\tl = list(s)\\n\\t\\tl.sort()\\n\\t\(...TRUNCATED) | "#User function Template for python3\n\n\n\nclass Solution:\n\n\tdef minimum_Number(self, s):\n\n\t\(...TRUNCATED) | "{\"inputs\": [\"s = \\\"846903\\\"\", \"s = \\\"55010\\\"\"], \"outputs\": [\"304689\", \"10055\"]}(...TRUNCATED) | EASY | ['Algorithms', 'Mathematical'] | null | geeksforgeeks | ['Mathematics'] | [] | https://practice.geeksforgeeks.org/problems/smallest-number-by-rearranging-digits-of-a-given-number0820/1 | O(1) | null | null | 0 | null | O(N * log(N)) where N is the number of digits of the given number | [0.009848089888691902,0.016729768365621567,0.005163755267858505,0.00954845268279314,0.00211494229733(...TRUNCATED) |
"Dilpreet wants to paint his dog's home that has n boards with different lengths. The length of i^{t(...TRUNCATED) | "[\"class Solution:\\n\\n\\tdef minTime(self, arr, n, k):\\n\\n\\t\\tdef numofPainter(maxLen):\\n\\t(...TRUNCATED) | "#User function Template for python3\n\nclass Solution:\n def minTime (self, arr, n, k):\n (...TRUNCATED) | "{\"inputs\": [\"n = 5\\nk = 3\\narr[] = {5,10,30,20,15}\", \"n = 4\\nk = 2\\narr[] = {10,20,30,40}\(...TRUNCATED) | MEDIUM_HARD | ['Algorithms', 'Searching', 'Binary Search', 'Divide and Conquer', 'Dynamic Programming'] | null | geeksforgeeks | ['Dynamic programming', 'Sorting', 'Divide and conquer', 'Complete search'] | ['Dynamic programming', 'Sorting', 'Complete search'] | https://practice.geeksforgeeks.org/problems/the-painters-partition-problem1535/1 | O(1) | null | null | 0 | null | O(n log m) , m = sum of all boards' length | [0.019095785915851593,-0.007324746809899807,-0.006029442418366671,-0.017442205920815468,0.0402738600(...TRUNCATED) |
"An **anagram** is the result of rearranging the letters of a word to produce a new word.\n\n**Note:(...TRUNCATED) | "[\"def is_anagram(test, original):\\n\\treturn sorted(original.lower()) == sorted(test.lower())\\n\(...TRUNCATED) | def is_anagram(test, original):
| "{\"fn_name\": \"is_anagram\", \"inputs\": [[\"foefet\", \"toffee\"], [\"Buckethead\", \"DeathCubeK\(...TRUNCATED) | EASY | ['Strings', 'Fundamentals'] | null | codewars | ['String algorithms', 'Fundamentals'] | [] | https://www.codewars.com/kata/529eef7a9194e0cbc1000255 | null | null | null | null | null | null | [-0.03089795634150505,-0.01268829870969057,-0.006035602651536465,-0.009061523713171482,-0.0084119522(...TRUNCATED) |
"Arkady decides to observe a river for n consecutive days. The river's water level on each day is eq(...TRUNCATED) | "[\"import sys\\nn = int(input())\\na = [int(x) for x in input().split(' ')]\\nmaxm = 0\\nidx = 0\\n(...TRUNCATED) | "{\"inputs\": [\"3\\n0 1 1\\n\", \"4\\n0 0 1 2\\n\", \"2\\n0 0\\n\", \"4\\n0 1 1 0\\n\", \"3\\n0 1 0(...TRUNCATED) | MEDIUM_HARD | ['data structures', 'greedy', 'dp'] | null | codeforces | ['Dynamic programming', 'Data structures', 'Greedy algorithms'] | ['Dynamic programming', 'Data structures', 'Greedy algorithms'] | https://codeforces.com/problemset/problem/957/D | null | 1.0 seconds | null | null | 256.0 megabytes | null | [-0.0033331862650811672,-0.035058315843343735,0.002961432095617056,-0.023905687034130096,0.049323596(...TRUNCATED) | |
"Define a $k$-periodic string as follows:\n\nA string $s$ is $k$-periodic if the length of the strin(...TRUNCATED) | [] | "{\"inputs\": [\"aaaaaaaa\\n\", \"abbaabbaabba\\n\", \"abcdef\\n\", \"abccabbcaabc\\n\"], \"outputs\(...TRUNCATED) | EASY | ['strings'] | null | kattis | ['String algorithms'] | [] | https://open.kattis.com/problems/periodicstrings | null | null | null | null | null | null | [0.01552705280482769,0.003003471065312624,0.006951466202735901,0.016033871099352837,0.03943963348865(...TRUNCATED) | |
"Tom has finally taken over the business empire and now looking for \na new Name of the business to(...TRUNCATED) | "[\"s = input().lower()\\nvow = ['a', 'e', 'i', 'o', 'u', 'y']\\nans = ''\\nfor ch in s:\\n\\tif ch (...TRUNCATED) | {"inputs": [["CodeSprInT"]], "outputs": [[".c.d.s.p.r.n.t"]]} | UNKNOWN_DIFFICULTY | [] | null | codechef | [] | [] | https://www.codechef.com/SPRT2020/problems/EMPRNM | null | null | null | null | null | null | [0.0401652529835701,-0.000341692561050877,-0.0021350730676203966,0.034109409898519516,0.037577286362(...TRUNCATED) |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 11