data_source stringclasses 4
values | prompt listlengths 2 2 | ability stringclasses 1
value | reward_model dict | extra_info dict |
|---|---|---|---|---|
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Polycarp owns a shop in the capital of Berland. Recently the criminal activity in the capital increased, so Polycarp is thinking about establishing s... | code | {
"ground_truth": "{\"inputs\": [\"50 5\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxx.x\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nxxxxx\\nx.xxx\\nxxxxx\\nxxxxx\\nxxxx... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "There is a weighted tree with n nodes and n-1 edges. The nodes are conveniently labeled from 1 to n. The weights are positive integers at most 100. D... | code | {
"ground_truth": "{\"inputs\": [\"2\\n5\\n9\\n6\\n10\\n9\\n10\\n2\\n99\\n\", \"2\\n5\\n1 2 3\\n2 3 4\\n2 4 5\\n4 5 1\\n2\\n1 2 99\\n\", \"2\\n5\\n1 3 3\\n2 3 4\\n2 4 5\\n4 5 1\\n2\\n1 2 99\\n\", \"2\\n5\\n9\\n12\\n10\\n9\\n10\\n2\\n99\\n\", \"2\\n5\\n17\\n12\\n10\\n9\\n10\\n2\\n99\\n\", \"2\\n5\\n1 3 4\\n2 3 4\\n2 4... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Given a rooted tree with n nodes. The Night King removes exactly one node from the tree and all the edges associated with it. Doing this splits the t... | code | {
"ground_truth": "{\"inputs\": [\"2\\n2 1\\n0 2\\n\", \"10\\n0 1\\n1 2\\n1 3\\n1 4\\n2 5\\n2 6\\n3 7\\n4 8\\n4 9\\n5 10\\n\", \"15\\n0 1\\n1 2\\n1 3\\n3 4\\n1 5\\n2 6\\n6 7\\n5 8\\n8 9\\n6 10\\n5 11\\n10 12\\n2 13\\n11 14\\n1 15\\n\", \"12\\n0 1\\n1 2\\n1 3\\n1 4\\n4 5\\n1 6\\n1 7\\n5 8\\n2 9\\n8 10\\n1 11\\n6 12\\n... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given a string s, consisting of lowercase Latin letters. While there is at least one character in the string s that is repeated at least twic... | code | {
"ground_truth": "{\"inputs\": [\"6\\ncodeforces\\naezakmi\\nabacaba\\nconvexhull\\nswflldjgpaxs\\nmyneeocktxpqjpz\\n\", \"1\\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "There are N towns in a coordinate plane. Town i is located at coordinates (x_i, y_i). The distance between Town i and Town j is \\sqrt{\\left(x_i-x_j... | code | {
"ground_truth": "{\"inputs\": [\"3\\n0 0\\n1 0\\n0 1\\n\", \"2\\n-879 981\\n-866 890\\n\", \"8\\n-406 10\\n512 859\\n494 362\\n-955 -475\\n128 553\\n-986 -885\\n763 77\\n449 310\\n\", \"8\\n0 -656\\n0 -709\\n0 76\\n0 184\\n0 -985\\n0 -822\\n0 418\\n0 -247\\n\", \"8\\n898 1000\\n85 1000\\n980 1000\\n359 1000\\n-560 ... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Example\n\nInput\n\n2 2 2 0 0 0 5\n\n\nOutput\n\n1 3 3 1 0\n\nWrite Python code to solve the problem. Present the code in \n```python\nYour code\n```... | code | {
"ground_truth": "{\"inputs\": [\"4 2 2 0 0 0 5\", \"4 2 2 0 0 0 10\", \"4 2 2 0 0 0 14\", \"4 2 2 0 0 0 6\", \"2 2 3 0 0 0 5\", \"4 2 3 0 0 0 14\", \"4 2 3 0 0 0 6\", \"4 2 2 1 0 0 10\", \"4 2 4 0 0 0 6\", \"2 2 3 0 0 0 3\", \"4 2 3 0 0 0 8\", \"4 2 3 0 0 1 6\", \"2 2 2 0 0 1 5\", \"2 2 2 1 0 0 10\", \"4 2 4 0 0 0 ... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Mishka started participating in a programming contest. There are $n$ problems in the contest. Mishka's problem-solving skill is equal to $k$.\n\nMish... | code | {
"ground_truth": "{\n \"inputs\": [\n \"8 4\\n4 2 3 1 5 1 6 4\\n\",\n \"5 2\\n3 1 2 1 3\\n\",\n \"5 100\\n12 34 55 43 21\\n\",\n \"100 100\\n44 47 36 83 76 94 86 69 31 2 22 77 37 51 10 19 25 78 53 25 1 29 48 95 35 53 22 72 49 86 60 38 13 91 89 18 54 19 71 2 25 33 65 49 53 5 95 90 100 68 25 5 87 48 45 72... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "The restaurant AtCoder serves the following five dishes:\n\n* ABC Don (rice bowl): takes A minutes to serve.\n* ARC Curry: takes B minutes to serve.\... | code | {
"ground_truth": "{\"inputs\": [\"123\\n123\\n123\\n123\\n123\", \"29\\n20\\n7\\n35\\n120\", \"101\\n86\\n119\\n108\\n57\", \"123\\n123\\n161\\n123\\n123\", \"29\\n20\\n13\\n35\\n120\", \"101\\n86\\n119\\n108\\n92\", \"123\\n123\\n161\\n123\\n163\", \"29\\n20\\n9\\n35\\n120\", \"101\\n86\\n119\\n125\\n92\", \"123\\n... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "The New Year holidays are over, but Resha doesn't want to throw away the New Year tree. He invited his best friends Kerim and Gural to help him to re... | code | {
"ground_truth": "{\"inputs\": [\"7 10\\n1 1 1 1 1 1 1\\n1 2\\n1 3\\n1 4\\n3 5\\n3 6\\n3 7\\n1 3 2\\n2 1\\n1 4 3\\n2 1\\n1 2 5\\n2 1\\n1 6 4\\n2 1\\n2 2\\n2 3\\n\", \"23 30\\n1 2 2 6 5 3 2 1 1 1 2 4 5 3 4 4 3 3 3 3 3 4 6\\n1 2\\n1 3\\n1 4\\n2 5\\n2 6\\n3 7\\n3 8\\n4 9\\n4 10\\n4 11\\n6 12\\n6 13\\n7 14\\n7 15\\n7 16... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Write a program which reads a $n \\times m$ matrix $A$ and a $m \\times l$ matrix $B$, and prints their product, a $n \\times l$ matrix $C$. An eleme... | code | {
"ground_truth": "{\"inputs\": [\"3 2 3\\n1 2\\n0 3\\n4 5\\n1 2 1\\n0 3 2\", \"3 2 3\\n1 2\\n0 3\\n4 5\\n1 2 1\\n1 3 2\", \"3 2 3\\n1 2\\n1 3\\n4 5\\n1 2 1\\n1 3 2\", \"3 2 3\\n1 2\\n2 3\\n4 5\\n1 2 1\\n1 3 2\", \"3 2 3\\n1 2\\n2 3\\n4 5\\n1 2 2\\n1 3 2\", \"3 2 3\\n1 2\\n3 3\\n4 5\\n1 2 2\\n1 3 2\", \"3 2 3\\n1 1\\... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Given a permutation $A = (a_1, a_2, \\dots , a_ N)$ of the integers $1, 2, \\dots , N$, we define the greedily increasing subsequence (GIS) in the fo... | code | {
"ground_truth": "{\"inputs\": [\"7\\n2 3 1 5 4 7 6\\n\", \"5\\n1 2 3 4 5\\n\", \"5\\n5 4 3 2 1\\n\"], \"outputs\": [\"4\\n2 3 5 7\\n\", \"5\\n1 2 3 4 5\\n\", \"1\\n5\\n\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
codeforces | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Title: Help Chef Gerasim\n\nTime Limit: 0 seconds\n\nMemory Limit: 256 megabytes\n\nProblem Description:\nIn a far away kingdom young pages help to s... | code | {
"ground_truth": "{\"inputs\": [\"5\\n270\\n250\\n250\\n230\\n250\", \"5\\n250\\n250\\n250\\n250\\n250\", \"5\\n270\\n250\\n249\\n230\\n250\", \"4\\n200\\n190\\n210\\n200\", \"4\\n1\\n2\\n3\\n4\", \"1\\n0\", \"2\\n0\\n0\", \"2\\n0\\n1\", \"2\\n0\\n2\", \"2\\n1\\n0\", \"2\\n1\\n1\", \"2\\n1\\n2\", \"2\\n2\\n0\", \"2\... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Consider a permutation p_1, p_2, ... p_n of integers from 1 to n. We call a sub-segment p_l, p_{l+1}, ..., p_{r-1}, p_{r} of the permutation an inter... | code | {
"ground_truth": "{\"inputs\": [\"4 998244353\\n1\\n4\\n5\\n9\\n\", \"1 437122297\\n20\\n\", \"9 386018153\\n1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9\\n\", \"5 386018153\\n1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9\\n\", \"5 386018153\\n1\\n2\\n3\\n4\\n6\\n6\\n7\\n8\\n9\\n\", \"5 386018153\\n1\\n2\\n3\\n1\\n6\\n6\\n7\\n8\\n9\\n\", ... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "There is a group of N friends who wish to enroll in a course together. The course has a maximum capacity of M students that can register for it. If t... | code | {
"ground_truth": "{\"inputs\": [\"2\\n100 100 0\\n100 100 99\\n\"], \"outputs\": [\"Yes\\nNo\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given a sequence of integers a1, a2, ..., an. Let <image>, and <image> for 1 ≤ i < n. Here, <image> denotes the modulus operation. Find the m... | code | {
"ground_truth": "{\"inputs\": [\"5\\n5 4 3 2 1\\n\", \"4\\n5 10 5 10\\n\", \"2\\n10 5\\n\", \"10\\n857470351 127268738 976762190 700120990 190561544 955496074 185447813 550302189 543162371 132648585\\n\", \"50\\n4613788045939 2137011228504 1068505614252 534252807126 267126403563 133563201781 66781600890 33390800445... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given array a with n elements and the number m. Consider some subsequence of a and the value of least common multiple (LCM) of its elements. ... | code | {
"ground_truth": "{\n \"inputs\": [\n \"7 8\\n6 2 9 2 7 2 3\\n\",\n \"6 4\\n2 2 2 3 3 3\\n\",\n \"10 50\\n39 22 60 88 11 65 41 85 65 100\\n\",\n \"100 343\\n999 284 486 785 176 742 856 415 992 601 600 122 460 214 338 92 627 913 376 835 384 914 335 179 409 957 96 784 531 43 584 206 971 799 592 801 870 97... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Learn, learn and learn again — Valera has to do this every day. He is studying at mathematical school, where math is the main discipline. The mathema... | code | {
"ground_truth": "{\"inputs\": [\"5\\n-4 2 0 5 0\\n\", \"3\\n-1 -2 -3\\n\", \"5\\n-1 10 -5 10 -2\\n\", \"4\\n-83 -87 42 -96\\n\", \"100\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Your friend Rick is trying to send you a message, but he is concerned that it would get intercepted by his partner. He came up with a solution:\n\n1)... | code | {
"ground_truth": "{\"fn_name\": \"interweave\", \"inputs\": [[\"\", \"\"], [\"hlo\", \"el\"], [\"h3lo\", \"el4\"]], \"outputs\": [[\"\"], [\"hello\"], [\"hello\"]]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Jaggi and Jojo are interested in problems related with Grids. They were trying different problem on grids, when they found this one. Given a grid of ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n1000 5\\n4 6\\n8 9\\n15 20\\n40 44\\n50 55\\n1000 2\\n500 500\\n600 660\\n90 1\\n45 46\\n5 1\\n2 2\\n1000 0\"], \"outputs\": [\"991895746\\n675373970\\n517613418\\n36\\n965601742\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "The developers of Looksery have to write an efficient algorithm that detects faces on a picture. Unfortunately, they are currently busy preparing a c... | code | {
"ground_truth": "{\"inputs\": [\"4 2\\nxx\\ncf\\nae\\nxx\\n\", \"4 4\\nxxxx\\nxfax\\nxcex\\nxxxx\\n\", \"1 4\\nface\\n\", \"2 3\\nfac\\ncef\\n\", \"2 5\\nacdmw\\nefazb\\n\", \"5 5\\nacnbx\\nefacp\\nlrefa\\norqce\\nzvbay\\n\", \"5 5\\nbyjvu\\nkmaca\\nalefe\\nwcacg\\nrefez\\n\", \"5 5\\nkjxbw\\neacra\\nxefhx\\nucmcz\... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "A test for allergy is conducted over the course of several days, and consists of exposing you to different substances (so called allergens). The goal... | code | {
"ground_truth": "{\"inputs\": [\"3\\n2\\n2\\n2\\n\", \"5\\n1\\n4\\n2\\n5\\n2\\n\"], \"outputs\": [\"5\\n\", \"10\\n\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given a string s consisting of characters \"1\", \"0\", and \"?\". The first character of s is guaranteed to be \"1\". Let m be the number of... | code | {
"ground_truth": "{\"inputs\": [\"1000?1?001100011000010??01001?1110010010?110?01100\\n\", \"11011?10110?1?110?1?0?01011?1?11???100?0?110?1????\\n\", \"1001000100\\n\", \"1?1????1???101111?1??11?????1?1???0????1?0?????????1??01???1?111?1??11????11??111???11?????1?01??0?1??01?1?01???1?0???01100??10???1?1????1?????0?1... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Students Vasya and Petya are studying at the BSU (Byteland State University). At one of the breaks they decided to order a pizza. In this problem piz... | code | {
"ground_truth": "{\"inputs\": [\"4\\n170 30 150 10\\n\", \"3\\n100 100 160\\n\", \"4\\n90 90 90 90\\n\", \"1\\n360\\n\", \"4\\n70 80 110 100\\n\", \"8\\n10 10 70 70 90 90 10 10\\n\", \"5\\n211 113 25 9 2\\n\", \"9\\n40 20 20 20 20 20 20 40 160\\n\", \"130\\n1 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 ... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Scott Lang is at war with Darren Cross. There are n chairs in a hall where they are, numbered with 1, 2, ..., n from left to right. The i-th chair is... | code | {
"ground_truth": "{\"inputs\": [\"7 4 3\\n8 11 12 16 17 18 20\\n17 16 20 2 20 5 13\\n17 8 8 16 12 15 13\\n12 4 16 4 15 7 6\\n8 14 2 11 17 12 8\\n\", \"3 1 3\\n140847557 466570047 534914399\\n93013372 106184897 87868332\\n798881865 348785541 412639907\\n541420868 474507814 209232335\\n35025208 96472847 130874791\\n\"... | {
"index": 0,
"split": "dummy"
} |
codeforces | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Title: Energy exchange\n\nTime Limit: 2 seconds\n\nMemory Limit: 256 megabytes\n\nProblem Description:\nIt is well known that the planet suffers from... | code | {
"ground_truth": "{\"inputs\": [\"3 50\\n4 2 1\", \"2 90\\n1 11\", \"5 26\\n42 65 23 43 64\", \"5 45\\n964 515 454 623 594\", \"1 20\\n784\", \"10 20\\n812 896 36 596 709 641 679 778 738 302\", \"10 83\\n689 759 779 927 15 231 976 943 604 917\", \"11 1\\n235 280 196 670 495 379 391 280 847 875 506\", \"12 71\\n472 1... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Ichiro likes baseball and has decided to write a program which simulates baseball.\n\nThe program reads events in an inning and prints score in that ... | code | {
"ground_truth": "{\"inputs\": [\"2\\nHIT\\nOUT\\nHOMERUN\\nHIT\\nHIT\\nHOMERUN\\nHIT\\nOUT\\nHIT\\nHIT\\nHIT\\nHIT\\nOUT\\nHIT\\nHIT\\nOUT\\nHIT\\nOUT\\nOUT\"], \"outputs\": [\"7\\n0\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Paul hates palindromes. He assumes that string s is tolerable if each its character is one of the first p letters of the English alphabet and s doesn... | code | {
"ground_truth": "{\"inputs\": [\"3 3\\ncba\\n\", \"3 4\\ncba\\n\", \"4 4\\nabcd\\n\", \"2 2\\nab\\n\", \"2 2\\nba\\n\", \"1 2\\na\\n\", \"1 2\\nb\\n\", \"1 1\\na\\n\", \"3 4\\ncdb\\n\", \"7 26\\nzyxzyxz\\n\", \"10 5\\nabcabcabca\\n\", \"10 10\\nfajegfaicb\\n\", \"1 26\\no\\n\", \"1 2\\nb\\n\", \"1 26\\nz\\n\", \"3 ... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "The time on the planet Lapituletti goes the same way it goes on Earth but a day lasts h hours and each hour lasts m minutes. The inhabitants of that ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n24 60\\n12:21\\n24 60\\n23:59\\n90 80\\n52:26\\n1 100\\n00:01\\n10 10\\n04:04\\n\", \"15\\n1 1\\n00:00\\n1 100\\n00:01\\n100 100\\n02:82\\n10 10\\n04:04\\n100 100\\n99:00\\n100 2\\n30:00\\n50 3\\n30:00\\n51 3\\n30:01\\n52 16\\n21:12\\n100 20\\n20:07\\n23 100\\n21:45\\n11 11\\n02... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Door's family is going celebrate Famil Doors's birthday party. They love Famil Door so they are planning to make his birthday cake weird!\n\nThe cake... | code | {
"ground_truth": "{\n \"inputs\": [\n \"3\\n.CC\\nC..\\nC.C\\n\",\n \"4\\nCC..\\nC..C\\n.CC.\\n.CC.\\n\",\n \"5\\n.CCCC\\nCCCCC\\n.CCC.\\nCC...\\n.CC.C\\n\",\n \"6\\nC.CC.C\\n..C..C\\nC..C.C\\n.CCC.C\\nCC....\\nCC....\\n\",\n \"7\\n.CC..CC\\nCC.C..C\\nC.C..C.\\nC...C.C\\nCCC.CCC\\n.CC...C\\n.C.CCC.\\... | {
"index": 0,
"split": "dummy"
} |
codeforces | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Title: Making Sequences is Fun\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nWe'll define *S*(*n*) for positiv... | code | {
"ground_truth": "{\"inputs\": [\"9 1 1\", \"77 7 7\", \"114 5 14\", \"1 1 2\", \"462 183 8\", \"462 183 8\", \"462 183 8\", \"462 183 8\", \"462 183 8\", \"462 183 8\", \"462 183 8\", \"10000000000000000 1 1\", \"2155990066796462 2710473050636183 563261158\", \"552719169048748 7822730034794389 374302919\", \"689578... | {
"index": 0,
"split": "dummy"
} |
codeforces | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Title: Football Kit\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nConsider a football tournament where *n* tea... | code | {
"ground_truth": "{\"inputs\": [\"2\\n1 2\\n2 1\", \"3\\n1 2\\n2 1\\n1 3\", \"2\\n1 2\\n1 2\", \"2\\n1 2\\n3 4\", \"3\\n1 100000\\n1 100000\\n100000 2\", \"5\\n3 2\\n3 4\\n2 5\\n3 2\\n4 3\", \"6\\n2 3\\n2 1\\n2 1\\n3 2\\n3 2\\n3 1\", \"10\\n2 1\\n1 3\\n4 1\\n2 3\\n4 1\\n1 4\\n2 4\\n2 1\\n2 3\\n3 4\", \"30\\n1 10\\n1... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Problem description :\nThe fight between Raghu and Rannvijay is becoming more intense.This time Rannvijay asked Raghu a question.\nHe gives him a num... | code | {
"ground_truth": "{\"inputs\": [\"2\\n2\\n15\", \"2\\n3\\n15\", \"2\\n3\\n29\", \"2\\n3\\n14\", \"2\\n1\\n11\", \"2\\n1\\n2\", \"2\\n6\\n2\", \"2\\n16\\n1\", \"2\\n32\\n0\", \"2\\n61\\n0\", \"2\\n85\\n1\", \"2\\n116\\n3\", \"2\\n116\\n6\", \"2\\n156\\n6\", \"2\\n234\\n6\", \"2\\n234\\n20\", \"2\\n65\\n20\", \"2\\n74... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Sorting arrays is traditionally associated with high-level languages. How hard can it be in Befunge? Sort the given array in non-descending order.\n\... | code | {
"ground_truth": "{\"inputs\": [\"5\\n7\\n1\\n9\\n7\\n3\\n\", \"10\\n60\\n1\\n60\\n1\\n60\\n1\\n60\\n1\\n60\\n1\\n\"], \"outputs\": [\"1 3 7 7 9 \\n\", \"1 1 1 1 1 60 60 60 60 60 \\n\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "A policeman wants to catch a thief. Both the policeman and the thief can only move on a line on integer coordinates between $0$ and $N$ (inclusive).\... | code | {
"ground_truth": "{\"inputs\": [\"5\\n3 5 1 10\\n4 1 2 10\\n2 7 3 10\\n6 9 3 20\\n5 8 1 10\\n\", \"1\\n1 9 2 10\\n\", \"1\\n2 8 3 10\\n\", \"2\\n1 5 2 10\\n2 6 2 10\\n\", \"1\\n500000000 1000000000 500000000 1000000000\\n\", \"1\\n0 1000000000 500000000 1000000000\\n\", \"1\\n0 1000000000 1000000000 1000000000\\n\",... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Vicky, the Artist, had two lists A and B, such that B was a permutation of A. Vicky was very proud of these lists. Unfortunately, while transporting ... | code | {
"ground_truth": "{\"inputs\": [\"10\\n203 204 205 206 207 208 203 204 205 206\\n13\\n203 204 204 205 206 207 205 208 203 206 205 206 204\\n\\nSAMPLE\", \"10\\n203 204 205 206 207 208 203 204 205 206\\n13\\n203 204 204 205 206 207 205 208 203 206 205 206 204\\n\\nRAMPLE\", \"10\\n203 204 205 206 207 208 203 204 205 ... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Chandu and Kundu are bored of dramatic games around. As they are very good friends and scholars they decided to discover a new game. \nIn total they... | code | {
"ground_truth": "{\"inputs\": [\"85\\n25 43 35 23 9 3 38 28 29 1 7 18 36 37 12 32 5 41 17 13 19 26 14 8 10 16 21 33 11 39 2 27 15 40 30 22 20 34 31 42 4 6 24\\n75\\n16 23 42 8 2 27 24 5 17 19 20 28 38 30 21 4 43 44 34 31 12 35 39 22 11 7 6 45 14 32 9 15 36 10 26 29 33 40 37 41 13 1 18 25 3\\n54\\n11 9 21 38 42 24 2... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Alice, Bob and Charlie are playing Card Game for Three, as below:\n - At first, each of the three players has a deck consisting of some number of car... | code | {
"ground_truth": "{\"inputs\": [\"aca\\naccc\\nca\\n\", \"abcb\\naacb\\nbccc\\n\"], \"outputs\": [\"A\\n\", \"C\\n\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "In this problem we are concerned with words constructed using the lowercase letters of the English alphabet - that is, a,b,c,…,z. These words need no... | code | {
"ground_truth": "{\"inputs\": [\"5\\nabcde\\nabc\\nab\\na\\nbcdef\\n\", \"4\\nab\\nbc\\ncd\\nde\\n\"], \"outputs\": [\"3\", \"1\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Sereja has painted n distinct points on the plane. The coordinates of each point are integers. Now he is wondering: how many squares are there with s... | code | {
"ground_truth": "{\"inputs\": [\"81\\n9 4\\n6 8\\n6 4\\n4 6\\n4 8\\n9 10\\n0 2\\n5 4\\n8 9\\n7 7\\n10 5\\n4 4\\n7 8\\n3 7\\n2 1\\n5 5\\n2 7\\n8 6\\n2 8\\n10 7\\n5 8\\n0 10\\n10 0\\n4 9\\n4 2\\n10 3\\n6 6\\n3 8\\n5 3\\n8 8\\n10 9\\n1 1\\n0 9\\n8 1\\n1 8\\n0 7\\n10 4\\n3 6\\n7 6\\n1 9\\n8 3\\n8 10\\n4 5\\n3 4\\n7 5\\... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "One tradition of welcoming the New Year is launching fireworks into the sky. Usually a launched firework flies vertically upward for some period of t... | code | {
"ground_truth": "{\"inputs\": [\"6\\n1 1 1 1 1 3\\n\", \"1\\n3\\n\", \"4\\n4 2 2 3\\n\", \"30\\n4 1 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5\\n\", \"4\\n4 2 4 1\\n\", \"30\\n1 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5\\n\", \"30\\n2 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Imagine a city with n junctions and m streets. Junctions are numbered from 1 to n.\n\nIn order to increase the traffic flow, mayor of the city has de... | code | {
"ground_truth": "{\"inputs\": [\"5 4\\n1 2\\n1 3\\n1 4\\n1 5\\n\", \"2 1\\n1 2\\n\", \"4 5\\n1 2\\n2 3\\n3 4\\n4 1\\n1 3\\n\", \"6 7\\n1 2\\n2 3\\n1 3\\n1 4\\n4 5\\n5 6\\n6 4\\n\", \"50 49\\n5 21\\n11 48\\n14 2\\n9 24\\n9 32\\n1 24\\n38 3\\n1 19\\n6 24\\n17 25\\n46 36\\n3 18\\n15 33\\n45 24\\n36 24\\n7 30\\n40 24\\... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Yaroslav is playing a game called \"Time\". The game has a timer showing the lifespan he's got left. As soon as the timer shows 0, Yaroslav's charact... | code | {
"ground_truth": "{\"inputs\": [\"3 1000\\n1000\\n0 0\\n0 1\\n0 3\\n\", \"3 1000\\n1000\\n1 0\\n1 1\\n1 2\\n\", \"11 1199\\n282 735 54 1000 419 939 901 789 128\\n10 -81\\n26 72\\n19 -91\\n-61 85\\n0 -33\\n-62 79\\n-59 65\\n-2 -77\\n-63 100\\n-15 53\\n94 54\\n\", \"8 1931\\n440 627 324 538 539 119\\n-85 -41\\n-91 61\... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "A young boy John is playing with eight triangular panels. These panels are all regular triangles of the same size, each painted in a single color; Jo... | code | {
"ground_truth": "{\"inputs\": [\"blue blue blue blue blue blue blue blue\\nred blue blue blue blue blue blue blue\\nred red blue blue blue blue blue blue\", \"blue blue blue blue bluf blue blue blue\\nred blue blue blue blue blue blue blue\\nred red blue blue blue blue blue blue\", \"blue blue blue blue bluf clue b... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Suppose we have an n-dimensional supercomputer with an infinite number of processors. Every processor has a vector of $n$ integers as its (n-dimensio... | code | {
"ground_truth": "{\"inputs\": [\"5\\n2 0\\n2 1\\n2 2\\n3 1\\n1 10\\n\"], \"outputs\": [\"1\\n5\\n13\\n7\\n21\\n\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Everyone knows the famous detective Sherlock. He has been handed over a new case of \"The Abominable Bride\". Each night she kills N people but to ir... | code | {
"ground_truth": "{\"inputs\": [\"5\\n2\\n4\\n6\\n9\\n12\"], \"outputs\": [\"2\\n4\\n4\\n2\\n8\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Mahmoud and Ehab are on the third stage of their adventures now. As you know, Dr. Evil likes sets. This time he won't show them any set from his larg... | code | {
"ground_truth": "{\"inputs\": [\"3 6\\n\", \"5 5\\n\", \"3 3\\n\", \"3 10203\\n\", \"4 2\\n\", \"5 9\\n\", \"1 0\\n\", \"3 0\\n\", \"3 1\\n\", \"3 4\\n\", \"5 5\\n\", \"2 3\\n\", \"10 2\\n\", \"1 1\\n\", \"3 2\\n\", \"4 0\\n\", \"5 2\\n\", \"5 6\\n\", \"4 3\\n\", \"3 6\\n\", \"5 3\\n\", \"32 32\\n\", \"5 1\\n\", \"... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is ... | code | {
"ground_truth": "{\"inputs\": [\"7\\n100 3 4\\n189 3 4\\n64 2 3\\n63 2 3\\n30 27 7\\n10 9 1\\n69117 21 2\\n\", \"1\\n1 0 0\\n\", \"5\\n1 30 0\\n1 0 0\\n100000 30 30\\n10 1 1\\n8 30 1\\n\", \"1\\n21 1 2\\n\", \"1\\n1 0 1\\n\", \"5\\n1 30 0\\n1 0 0\\n100000 30 20\\n10 1 1\\n8 30 1\\n\", \"7\\n100 3 2\\n189 3 4\\n64 2... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "There are A slimes lining up in a row. Initially, the sizes of the slimes are all 1.\n\nSnuke can repeatedly perform the following operation.\n\n* Ch... | code | {
"ground_truth": "{\"inputs\": [\"10\\n3 1 4 1 5 9 2 6 5 3\", \"4\\n2 1 2 2\", \"1\\n1\", \"2\\n3 3\", \"4\\n2 1 2 4\", \"1\\n2\", \"2\\n11 3\", \"2\\n3 1\", \"2\\n18 1\", \"10\\n3 1 1 1 5 9 2 6 5 3\", \"2\\n51 1\", \"10\\n3 1 1 1 5 9 2 11 5 3\", \"2\\n1 1\", \"2\\n72 2\", \"10\\n3 1 1 2 6 9 2 10 3 3\", \"10\\n3 1 1... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Every school morning Mirko is woken up by the sound of his alarm clock. Since he is a bit forgetful, quite often he leaves the alarm on on Saturday m... | code | {
"ground_truth": "{\"inputs\": [\"10 10\\n\", \"0 30\\n\", \"23 40\\n\"], \"outputs\": [\"9 25\\n\", \"23 45\\n\", \"22 55\\n\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Vasya is reading a e-book. The file of the book consists of $n$ pages, numbered from $1$ to $n$. The screen is currently displaying the contents of p... | code | {
"ground_truth": "{\"inputs\": [\"3\\n10 4 5 2\\n5 1 3 4\\n20 4 19 3\\n\", \"1\\n12345 1 1 2\\n\", \"1\\n999999999 3 4 5\\n\", \"1\\n400000001 2 200000001 2\\n\", \"1\\n1000000000 3 1000000000 2\\n\", \"1\\n1000000000 2 89 5\\n\", \"1\\n1000000000 5 999999999 1\\n\", \"5\\n20 10 2 9\\n1000000000 2 89 4\\n1000000000 ... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Eleven wants to choose a new name for herself. As a bunch of geeks, her friends suggested an algorithm to choose a name for her. Eleven wants her nam... | code | {
"ground_truth": "{\"inputs\": [\"8\\n\", \"15\\n\", \"85\\n\", \"381\\n\", \"1\\n\", \"2\\n\", \"3\\n\", \"5\\n\", \"17\\n\", \"49\\n\", \"256\\n\", \"61\\n\"], \"outputs\": [\"OOOoOooO\\n\", \"OOOoOooOooooOoo\\n\", \"OOOoOooOooooOoooooooOooooooooooooOooooooooooooooooooooOoooooooooooooooooooooooooooooo\\n\", \"OOOo... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Your task is to calculate sum of primes present as digits of given number N.\nExample 1:\nInput: 333\nOutput: 9\nExplaination: 3 is a prime number. ... | code | {
"ground_truth": "{\"fn_name\": \"primeSum\", \"inputs\": [[222], [56], [849], [22282], [578], [1], [2], [0], [11111], [9876543210], [29375029375029375], [99999999999999999]], \"outputs\": [[6], [5], [0], [8], [12], [0], [2], [0], [0], [17], [51], [0]]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given a string s of length n, consisting of first k lowercase English letters.\n\nWe define a c-repeat of some string q as a string, consisti... | code | {
"ground_truth": "{\"inputs\": [\"5 5 3\\ncbcab\\n1 2 4 b\\n2 cab\\n2 bca\\n1 2 3 a\\n1 2 2 c\\n\", \"10 20 5\\nebbbcebbea\\n1 5 9 a\\n1 1 2 b\\n2 abdce\\n2 edacb\\n2 ebdca\\n2 cdbae\\n1 4 9 d\\n1 1 3 b\\n1 4 9 e\\n1 5 9 b\\n2 cbeda\\n1 10 10 c\\n1 6 9 a\\n1 3 4 c\\n1 2 3 b\\n2 aebdc\\n1 3 9 c\\n1 2 4 b\\n1 3 8 b\\n... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given n integers a_1, a_2, ..., a_n, where n is odd. You are allowed to flip the sign of some (possibly all or none) of them. You wish to per... | code | {
"ground_truth": "{\"inputs\": [\"5\\n3\\n-2 4 3\\n5\\n1 1 1 1 1\\n5\\n-2 4 7 -6 4\\n9\\n9 7 -4 -2 1 -3 9 -4 -5\\n9\\n-4 1 9 4 8 9 5 1 -9\\n\", \"5\\n3\\n-2 4 3\\n5\\n1 1 1 1 1\\n5\\n-2 4 7 -6 4\\n9\\n9 7 -4 -2 2 -3 9 -4 -5\\n9\\n-4 1 9 4 8 9 5 1 -9\\n\", \"5\\n3\\n-2 4 3\\n5\\n1 1 1 1 1\\n5\\n-2 4 7 -6 4\\n9\\n9 7 ... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You will turn on the air conditioner if, and only if, the temperature of the room is 30 degrees Celsius or above.\n\nThe current temperature of the r... | code | {
"ground_truth": "{\"inputs\": [\"25\", \"30\", \"20\", \"44\", \"37\", \"78\", \"47\", \"91\", \"61\", \"26\", \"35\", \"23\", \"48\", \"21\", \"3\", \"1\", \"5\", \"0\", \"6\", \"2\", \"-1\", \"-2\", \"-3\", \"-4\", \"-6\", \"-7\", \"-11\", \"-5\", \"-10\", \"4\", \"-13\", \"-9\", \"-16\", \"-12\", \"-8\", \"8\", ... | {
"index": 0,
"split": "dummy"
} |
codeforces | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Title: Ratings and Reality Shows\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nThere are two main kinds of eve... | code | {
"ground_truth": "{\"inputs\": [\"5 1 1 1 4 0 5\\n1 1\\n2 1\\n3 1\\n4 0\\n5 0\", \"1 1 2 1 2 1 2\\n1 0\", \"10 1 1 1 2 0 10\\n1 1\\n2 1\\n3 0\\n4 0\\n5 1\\n6 1\\n7 1\\n8 1\\n9 1\\n10 1\"], \"outputs\": [\"6\", \"-1\", \"5\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Example\n\nInput\n\n3 1 0 1\n\n\nOutput\n\n18\n\nWrite Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.... | code | {
"ground_truth": "{\"inputs\": [\"3 2 0 1\", \"1 2 0 1\", \"2 0 0 1\", \"2 1 0 1\", \"3 1 1 2\", \"3 -1 0 2\", \"3 -1 1 2\", \"5 0 -1 2\", \"4 0 1 3\", \"7 0 -1 2\", \"2 0 0 0\", \"8 0 -1 2\", \"6 2 -1 3\", \"6 2 0 3\", \"4 1 0 2\", \"6 -1 1 2\", \"6 2 1 3\", \"7 -1 1 2\", \"4 1 -1 -2\", \"11 2 1 3\", \"7 -1 2 2\", ... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Panic is rising in the committee for doggo standardization — the puppies of the new brood have been born multi-colored! In total there are 26 possibl... | code | {
"ground_truth": "{\"inputs\": [\"6\\naabddc\\n\", \"3\\nabc\\n\", \"3\\njjj\\n\", \"4\\nabcc\\n\", \"6\\nabcdee\\n\", \"3\\nzza\\n\", \"3\\ngcw\\n\", \"27\\nabcdefghijklmnopqrstuvwxyza\\n\", \"27\\nmnpsweykjdvaxyiqtgcuzhbfrlo\\n\", \"5\\naabcd\\n\", \"2\\nba\\n\", \"7\\nkssssss\\n\", \"1\\ne\\n\", \"5\\nfnfvn\\n\",... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "A has a string consisting of some number of lowercase English letters 'a'. He gives it to his friend B who appends some number of letters 'b' to the ... | code | {
"ground_truth": "{\n \"inputs\": [\n \"aaabccc\\n\",\n \"bbacc\\n\",\n \"aabc\\n\",\n \"aabbcc\\n\",\n \"aaacccbb\\n\",\n \"abc\\n\",\n \"acba\\n\",\n \"bbabbc\\n\",\n \"bbbabacca\\n\",\n \"aabcbcaca\\n\",\n \"aaaaabbbbbb\\n\",\n \"c\\n\",\n \"cc\\n\",\n \"bbb\\n\",\n \... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a calculator on the floor an... | code | {
"ground_truth": "{\n \"inputs\": [\n \"124\\n\",\n \"04\\n\",\n \"5810438174\\n\",\n \"1\\n\",\n \"039\\n\",\n \"97247\\n\",\n \"5810438174\\n\",\n \"12883340691714056185860211260984431382156326935244\\n\",\n \"21443152535720202791080929111600723284965686655458368252776163634787219463981... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Problem\n\nN people with IDs from 1 to N are about to sit in N-legged chairs with numbers from 1 to N. The person with ID i wants to sit in the chair... | code | {
"ground_truth": "{\"inputs\": [\"5\\n3 3 4 4 5\", \"5\\n1 2 3 4 5\", \"5\\n2 2 3 4 5\", \"5\\n2 2 1 4 5\", \"5\\n3 2 1 4 5\", \"5\\n3 4 1 4 5\", \"5\\n1 4 3 4 5\", \"5\\n4 2 1 4 5\", \"5\\n3 4 1 5 5\", \"5\\n1 4 4 4 5\", \"5\\n4 2 1 4 2\", \"5\\n1 4 4 5 5\", \"5\\n5 2 1 4 2\", \"5\\n2 2 5 4 5\", \"5\\n5 4 1 4 5\", ... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Little X has n distinct integers: p_1, p_2, ..., p_{n}. He wants to divide all of them into two sets A and B. The following two conditions must be sa... | code | {
"ground_truth": "{\n \"inputs\": [\n \"4 5 9\\n2 3 4 5\\n\",\n \"3 3 4\\n1 2 4\\n\",\n \"100 8883 915\\n1599 4666 663 3646 754 2113 2200 3884 4082 1640 3795 2564 2711 2766 1122 4525 1779 2678 2816 2182 1028 2337 4918 1273 4141 217 2682 1756 309 4744 915 1351 3302 1367 3046 4032 4503 711 2860 890 2443 4819... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given a tree with n nodes. You have to write non-negative integers on its edges so that the following condition would be satisfied:\n\nFor ev... | code | {
"ground_truth": "{\"inputs\": [\"4\\n2 4\\n2 3\\n2 1\\n\", \"3\\n2 3\\n2 1\\n\", \"5\\n1 2\\n1 3\\n1 4\\n2 5\\n\", \"43\\n7 29\\n19 18\\n32 4\\n39 40\\n21 11\\n34 28\\n30 23\\n13 19\\n33 39\\n13 35\\n37 21\\n29 8\\n40 1\\n7 9\\n8 38\\n7 31\\n8 12\\n7 42\\n33 20\\n5 36\\n17 32\\n30 43\\n39 34\\n40 3\\n8 24\\n13 37\\... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Given a non-negative number N in the form of string. The task is to apply at most one swap operation on the number N so that the result is just a pre... | code | {
"ground_truth": "{\"fn_name\": \"previousNumber\", \"inputs\": [[\"123456\"], [\"9876543210\"], [\"132\"], [\"9871\"], [\"54321\"], [\"10\"], [\"21\"], [\"11\"], [\"111111\"], [\"22\"], [\"1234567890123456789012345678901234567890\"], [\"9876543210987654321098765432109876543210\"]], \"outputs\": [[-1], [\"9876543201... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "The famous global economic crisis is approaching rapidly, so the states of Berman, Berance and Bertaly formed an alliance and allowed the residents o... | code | {
"ground_truth": "{\n \"inputs\": [\n \"4 5\\n11..2\\n#..22\\n#.323\\n.#333\\n\",\n \"1 5\\n1#2#3\\n\",\n \"3 4\\n.2..\\n...3\\n.1#.\\n\",\n \"10 10\\n##.#..#.#2\\n...###....\\n#..#....##\\n.....#....\\n.#........\\n.....#####\\n...#..#...\\n....###...\\n###.##...#\\n.#...1#.3.\\n\",\n \"4 3\\n..#\\n... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Petya has recently learned data structure named \"Binary heap\".\n\nThe heap he is now operating with allows the following operations: put the give... | code | {
"ground_truth": "{\"inputs\": [\"2\\ninsert 3\\ngetMin 4\\n\", \"4\\ninsert 1\\ninsert 1\\nremoveMin\\ngetMin 2\\n\", \"1\\ninsert 1\\n\", \"1\\ngetMin 31\\n\", \"1\\nremoveMin\\n\", \"2\\ninsert 2\\ngetMin 2\\n\", \"2\\ninsert 31\\nremoveMin\\n\", \"2\\ngetMin 31\\nremoveMin\\n\", \"2\\nremoveMin\\ngetMin 31\\n\",... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Naman has two binary strings s and t of length n (a binary string is a string which only consists of the characters \"0\" and \"1\"). He wants to con... | code | {
"ground_truth": "{\"inputs\": [\"10\\n1111100000\\n1111100001\\n\", \"6\\n010000\\n000001\\n\", \"10\\n1111100000\\n0000011111\\n\", \"8\\n10101010\\n01010101\\n\", \"10\\n1010111110\\n1011101101\\n\", \"12\\n011001010101\\n111001010101\\n\", \"10\\n1100000100\\n0010000011\\n\", \"10\\n0111101111\\n0111111110\\n\",... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only ... | code | {
"ground_truth": "{\"inputs\": [\"10 5\", \"7 4\", \"10 8\", \"7 7\", \"10 7\", \"14 7\", \"19 7\", \"0 4\", \"22 13\", \"11 7\", \"20 7\", \"21 13\", \"34 12\", \"6 7\", \"21 23\", \"14 1\", \"11 1\", \"45 3\", \"68 25\", \"73 4\", \"146 4\", \"212 4\", \"115 65\", \"357 4\", \"357 1\", \"115 172\", \"384 1\", \"11... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given an array a consisting of 500000 integers (numbered from 1 to 500000). Initially all elements of a are zero.\n\nYou have to process two ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n1 3 4\\n2 3 0\\n2 4 3\\n1 4 -4\\n2 1 0\\n\", \"2\\n1 1000 2\\n2 1001 1000\\n\", \"5\\n1 3 4\\n2 3 0\\n2 4 3\\n1 500000 1\\n2 800 0\\n\", \"2\\n1 500000 1\\n2 500000 0\\n\", \"2\\n1 499999 1\\n2 500000 499999\\n\", \"2\\n1 500000 228\\n2 250001 249999\\n\", \"2\\n1 500000 1\\n2 4... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "For long time scientists study the behavior of sharks. Sharks, as many other species, alternate short movements in a certain location and long moveme... | code | {
"ground_truth": "{\"inputs\": [\"8\\n1 2 7 3 4 8 5 6\\n\", \"6\\n25 1 2 3 14 36\\n\", \"2\\n2 1\\n\", \"127\\n64 96 63 112 62 95 61 120 60 94 59 111 58 93 57 124 56 92 55 110 54 91 53 119 52 90 51 109 50 89 49 126 48 88 47 108 46 87 45 118 44 86 43 107 42 85 41 123 40 84 39 106 38 83 37 117 36 82 35 105 34 81 33 12... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You want to build a standard house of cards, but you don't know how many cards you will need. Write a program which will count the minimal number of ... | code | {
"ground_truth": "{\"fn_name\": \"house_of_cards\", \"inputs\": [[1], [2], [3]], \"outputs\": [[7], [15], [26]]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Malek is a rich man. He also is very generous. That's why he decided to split his money between poor people. A charity institute knows n poor people ... | code | {
"ground_truth": "{\"inputs\": [\"2 1\\n2 1\\n2 2 0.100\\n\", \"10 3\\n2 2 1 2 1 2 2 5 5 5\\n4 6 0.014\\n4 6 0.012\\n8 10 0.084\\n\", \"1 1\\n1000000000\\n1 1 1.000\\n\", \"10 3\\n2 5 5 4 5 2 5 2 1 4\\n8 10 0.646\\n4 6 0.687\\n4 6 0.504\\n\", \"10 3\\n2 1 2 1 1 3 2 4 1 1\\n5 7 0.979\\n1 3 0.922\\n8 10 0.944\\n\", \"... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Easy and hard versions are actually different problems, so read statements of both problems completely and carefully.\n\nSummer vacation has started ... | code | {
"ground_truth": "{\"inputs\": [\"6 3 1\\n6 0 0\\n11 1 0\\n9 0 1\\n21 1 1\\n10 1 0\\n8 0 1\", \"6 3 2\\n\\n6 0 0\\n11 1 0\\n9 0 1\\n21 1 1\\n10 1 0\\n8 0 1\", \"3 3 1\\n27 0 0\\n28 0 0\\n11 0 0\\n\", \"1 1 1\\n3 0 1\\n\", \"8 5 1\\n43 0 1\\n5 0 1\\n23 1 1\\n55 0 1\\n19 1 1\\n73 1 1\\n16 1 1\\n42 1 1\\n\", \"27 5 1\\... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given an integer sequence of length n+1, a_1,a_2,...,a_{n+1}, which consists of the n integers 1,...,n.\nIt is known that each of the n integ... | code | {
"ground_truth": "{\"inputs\": [\"3\\n1 2 1 3\\n\", \"1\\n1 1\\n\", \"32\\n29 19 7 10 26 32 27 4 11 20 2 8 16 23 5 14 6 12 17 22 18 30 28 24 15 1 25 3 13 21 19 31 9\\n\"], \"outputs\": [\"3\\n5\\n4\\n1\\n\", \"1\\n1\\n\", \"32\\n525\\n5453\\n40919\\n237336\\n1107568\\n4272048\\n13884156\\n38567100\\n92561040\\n19353... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Kevin has just recevied his disappointing results on the USA Identification of Cows Olympiad (USAICO) in the form of a binary string of length n. Eac... | code | {
"ground_truth": "{\"inputs\": [\"8\\n10000011\\n\", \"2\\n01\\n\", \"5\\n10101\\n\", \"75\\n010101010101010101010101010101010101010101010101010101010101010101010101010\\n\", \"11\\n00000000000\\n\", \"56\\n10101011010101010101010101010101010101011010101010101010\\n\", \"50\\n0101101011010101010101010101010101010101... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "On the divine friendship day, \"A\" tied \"B\" a friendship band. But alas! Frequent quarrels started between them and \"B\" decided to remove and br... | code | {
"ground_truth": "{\"inputs\": [\"29\\nwwwbbrwrbrbrrbrbrwrwwrbwrwrrb\\n\\nSAMPLE\", \"29\\nwwwbbrwrbrbrrbrbrwrwwrbwrwrrb\", \"77\\nrwrwrwrwrwrwrwrwrwrwrwrwbwrwbwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwr\", \"350\\nrrbbrbbbwbwwbwbbbbwwrrbbwbrwbrwbbbrbrwrwbrwwwrrbbrrwrbbrwbwrwwwrbrwwwwwrwbwwwrrbrrbbbrbrbbbrbbbrb... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "This problem is same as the previous one, but has larger constraints.\n\nShiro's just moved to the new house. She wants to invite all friends of her ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n10 100 20 200 1\\n\", \"6\\n1 1 1 2 2 2\\n\", \"1\\n100000\\n\", \"13\\n1 1 1 2 2 2 3 3 3 4 4 4 5\\n\", \"7\\n3 2 1 1 4 5 1\\n\", \"10\\n30518 96518 74071 59971 50121 4862 43967 73607 19138 90754\\n\", \"10\\n4 10 4 4 5 10 10 4 10 10\\n\", \"10\\n63649 14562 779 31060 84730 3390... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Given an unsorted linked list of N nodes. The task is to remove duplicate elements from this unsorted Linked List. When a value appears in multiple n... | code | {
"ground_truth": "{\"inputs\": [\"N = 4\\nvalue[] = {5,2,2,4}\", \"N = 5\\nvalue[] = {2,2,2,2,2}\"], \"outputs\": [\"5 2 4\", \"2\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Given a keypad as shown in the diagram, and an N digit number which is represented by array a[ ], the task is to list all words which are possible by... | code | {
"ground_truth": "{\"inputs\": [\"N = 3, a[] = {2, 3, 4}\", \"N = 3, a[] = {3, 4, 5}\"], \"outputs\": [\"adg adh adi aeg aeh aei afg afh afi \\nbdg bdh bdi beg beh bei bfg bfh bfi \\ncdg cdh cdi ceg ceh cei cfg cfh cfi\", \"dgj dgk dgl dhj dhk dhl dij dik dil \\negj egk egl ehj ehk ehl eij eik eil \\nfgj fgk fgl fhj... | {
"index": 0,
"split": "dummy"
} |
codeforces | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Title: Substitutes in Number\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nAndrew and Eugene are playing a gam... | code | {
"ground_truth": "{\"inputs\": [\"123123\\n1\\n2->00\", \"123123\\n1\\n3->\", \"222\\n2\\n2->0\\n0->7\", \"1000000008\\n0\", \"100\\n5\\n1->301\\n0->013\\n1->013\\n0->103\\n0->103\", \"21222\\n10\\n1->\\n2->1\\n1->1\\n1->1\\n1->1\\n1->22\\n2->2\\n2->1\\n1->21\\n1->\", \"21122\\n10\\n1->\\n2->12\\n1->\\n2->21\\n2->\\... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "A prime number is an integer greater than $1$ that has no positive divisors other than $1$ and itself.\n\nWe call a number megaprime if it is prime a... | code | {
"ground_truth": "{\"inputs\": [\"10 20\", \"100 200\"], \"outputs\": [\"0\", \"0\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Assume that sk(n) equals the sum of digits of number n in the k-based notation. For example, s2(5) = s2(1012) = 1 + 0 + 1 = 2, s3(14) = s3(1123) = 1 ... | code | {
"ground_truth": "{\"inputs\": [\"7 7\\n\", \"4 2\\n\", \"948401775311276715 25\\n\", \"3 3\\n\", \"1234567890 12\\n\", \"100 27\\n\", \"999999999999999999 7\\n\", \"1000000000000000000 2\\n\", \"353989972219678213 18\\n\", \"531440999999999999 30\\n\", \"1000000000000000000 6\\n\", \"900099654762154107 16\\n\", \"1... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "As Lord Rama's army is approaching Lanka they have to pass one last hurdle and that is the ocean in between. They have decided to construct a bridge ... | code | {
"ground_truth": "{\"inputs\": [\"12 100000000\\n432424 5325 6436 23432 342 4234 3422 2333 233 22 33333 432422\", \"2 4169015\\n80268343 89772825\", \"3 10\\n100 200 300\", \"12 100000000\\t\\n1 10 1000 10000 20000 12 100 10000000 100001 10000002 10000004 10000005\", \"5 5\\n0 1 2 3 4\", \"12 100000000\\n0 1 2 3 4 5... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Mishka is a little polar bear. As known, little bears loves spending their free time playing dice for chocolates. Once in a wonderful sunny morning, ... | code | {
"ground_truth": "{\n \"inputs\": [\n \"3\\n3 5\\n2 1\\n4 2\\n\",\n \"2\\n6 1\\n1 6\\n\",\n \"3\\n1 5\\n3 3\\n2 2\\n\",\n \"6\\n4 1\\n4 2\\n5 3\\n5 1\\n5 3\\n4 1\\n\",\n \"8\\n2 4\\n1 4\\n1 5\\n2 6\\n2 5\\n2 5\\n2 4\\n2 5\\n\",\n \"8\\n4 1\\n2 6\\n4 2\\n2 5\\n5 2\\n3 5\\n5 2\\n1 5\\n\",\n \"9\\... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Problem\n\nThere is a grid of $ R \\ times C $ squares with $ (0, 0) $ in the upper left and $ (R-1, C-1) $ in the lower right. When you are in a squ... | code | {
"ground_truth": "{\"inputs\": [\"2 2 0 0 0 1\", \"421 435 196 169 388 5\", \"1 2 0 0 0 0\", \"421 435 196 91 388 9\", \"5 6 0 0 4 4\", \"1 10 0 1 0 9\", \"421 435 196 169 388 12\", \"421 435 196 169 388 10\", \"421 435 196 118 388 0\", \"421 92 17 19 388 10\", \"1 18 0 0 0 9\", \"421 435 196 169 135 9\", \"5 11 0 0... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Given a connected undirected graph with $n$ vertices and an integer $k$, you have to either: either find an independent set that has exactly $\\lcei... | code | {
"ground_truth": "{\"inputs\": [\"4 4 3\\n1 2\\n2 3\\n3 4\\n4 1\\n\", \"4 5 3\\n1 2\\n2 3\\n3 4\\n4 1\\n2 4\\n\", \"4 6 3\\n1 2\\n2 3\\n3 4\\n4 1\\n1 3\\n2 4\\n\", \"5 4 5\\n1 2\\n1 3\\n2 4\\n2 5\\n\", \"3 3 3\\n1 2\\n2 3\\n3 1\\n\", \"6 6 6\\n4 2\\n2 5\\n5 3\\n3 6\\n6 1\\n1 4\\n\", \"6 6 5\\n3 6\\n6 5\\n5 4\\n4 2\\... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Valera is a collector. Once he wanted to expand his collection with exactly one antique item.\n\nValera knows n sellers of antiques, the i-th of them... | code | {
"ground_truth": "{\"inputs\": [\"3 50000\\n1 40000\\n2 20000 60000\\n3 10000 70000 190000\\n\", \"3 50000\\n1 50000\\n3 100000 120000 110000\\n3 120000 110000 120000\\n\", \"2 100001\\n1 895737\\n1 541571\\n\", \"1 1000000\\n1 1000000\\n\", \"1 1000000\\n1 561774\\n\", \"3 1000000\\n5 1000000 568832 1000000 1000000... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "After finding a suitable residence in the Swiss Alps, Robin thought he finally had what it takes to be happy. But every day he woke up feeling that s... | code | {
"ground_truth": "{\"inputs\": [\"3 3 2\\n1 2 3\\n\", \"4 11 4\\n10 10 10 10\\n\", \"4 3 3\\n4 1 3 2\\n\"], \"outputs\": [\"3.666666667\\n\", \"20.000000000\\n\", \"5.888888888888\\n\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Given a matrix containing lower alphabetical characters only of size n*m. We need to count the number of palindromic paths in the given matrix.\nA pa... | code | {
"ground_truth": "{\"fn_name\": \"countOfPalindromicPaths\", \"inputs\": [[[[\"a\", \"a\", \"a\", \"b\"], [\"b\", \"a\", \"a\", \"a\"], [\"a\", \"b\", \"b\", \"a\"]]], [[[\"a\", \"b\"], [\"c\", \"d\"]]], [[[\"a\", \"a\", \"a\", \"a\"], [\"b\", \"b\", \"a\", \"a\"], [\"a\", \"b\", \"a\", \"a\"]]], [[[\"a\", \"b\", \"... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "This problem has unusual memory constraint.\n\nAt evening, Igor and Zhenya the financiers became boring, so they decided to play a game. They prepare... | code | {
"ground_truth": "{\"inputs\": [\"4\\n-4 -2 4 5\\n\", \"3\\n1 3 1\\n\", \"5\\n-1 -2 -1 -2 -1\\n\", \"1\\n0\\n\", \"4\\n10 -9 9 -5\\n\", \"7\\n0 -2 -1 -1 -3 3 2\\n\", \"100\\n59 5 -63 -54 -56 -24 58 -19 -32 89 -59 -89 -35 98 51 65 29 -61 65 37 -40 68 -84 62 -50 -89 -18 -79 36 -14 -16 -26 20 89 -23 95 20 -69 -49 80 -9... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "A positive integer is magical if it is divisible by either A or B.\nReturn the N-th magical number. Since the answer may be very large, return it mo... | code | {
"ground_truth": "{\"fn_name\": \"nthMagicalNumber\", \"inputs\": [[1, 2, 3]], \"outputs\": [2]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "On the planet Mars a year lasts exactly n days (there are no leap years on Mars). But Martians have the same weeks as earthlings — 5 work days and th... | code | {
"ground_truth": "{\"inputs\": [\"2\\n\", \"14\\n\", \"23\\n\", \"234108\\n\", \"9\\n\", \"99983\\n\", \"987\\n\", \"868523\\n\", \"30\\n\", \"11\\n\", \"234115\\n\", \"99\\n\", \"868512\\n\", \"999985\\n\", \"18\\n\", \"234118\\n\", \"999994\\n\", \"868528\\n\", \"868526\\n\", \"3\\n\", \"1000000\\n\", \"12\\n\", \... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Game of numbers is a game where you are given two integers (X and Y), and you have to print the number of special numbers between X and Y both inclus... | code | {
"ground_truth": "{\"inputs\": [\"1\\n1 10\\n\\nSAMPLE\", \"1\\n1 10\\n\\nELPMAS\", \"1\\n1 9\\n\\nELPMAS\", \"1\\n2 9\\n\\nELPMAS\", \"1\\n2 4\\n\\nSAMPLE\", \"1\\n2 2\\n\\nSANPLE\", \"1\\n1 15\\n\\nELPMAS\", \"1\\n3 9\\n\\nSAMPLE\", \"1\\n1 14\\n\\nELPM@S\", \"1\\n1 29\\n\\nELOMAS\", \"1\\n1 25\\n\\nELOMAS\", \"1\... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "A country decides to build a palace.\nIn this country, the average temperature of a point at an elevation of x meters is T-x \\times 0.006 degrees Ce... | code | {
"ground_truth": "{\"inputs\": [\"2\\n12 5\\n1000 2000\\n\", \"3\\n21 -11\\n81234 94124 52141\\n\", \"1000\\n50 12\\n354 76430 27904 50268 73833 44032 2233 54986 38658 75014 43668 35059 40714 88040 8556 52029 40199 9127 9433 16246 11706 88894 29318 55597 10624 87407 59163 67750 74895 37791 16260 82696 57569 51320 42... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You have just been hired by Amalgamated, Inc. in the country of Acmania to oversee the transportation of raw materials to the company’s factories. Ea... | code | {
"ground_truth": "{\"inputs\": [\"7 3 3 3\\nA B C\\nD E F\\n3 A E G\\n3 A C E\\n3 B D F\\n\", \"7 3 3 4\\nA B C\\nD E F\\n3 A E G\\n3 A C E\\n3 B D F\\n2 G F\\n\"], \"outputs\": [\"2\\n\", \"3\\n\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "The new season of the Bytelandian Premier League (BPL) has started!\nIn the BPL, any two soccer teams play with each other exactly once. In each matc... | code | {
"ground_truth": "{\"inputs\": [\"3\\n3\\n0 0 0 \\n1 0 1 \\n1 0 0 \\n4\\n0 1 1 0 \\n0 0 2 0 \\n0 2 0 0 \\n1 1 1 0 \\n5\\n0 2 2 1 0 \\n2 0 1 1 0 \\n2 0 0 1 0 \\n0 0 0 0 1 \\n1 1 1 0 0\"], \"outputs\": [\"010\\n0001\\n11001\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Frog Gorf is traveling through Swamp kingdom. Unfortunately, after a poor jump, he fell into a well of $n$ meters depth. Now Gorf is on the bottom of... | code | {
"ground_truth": "{\"inputs\": [\"3\\n0 2 2\\n1 1 0\\n\", \"2\\n1 1\\n1 0\\n\", \"10\\n0 1 2 3 5 5 6 7 8 5\\n9 8 7 1 5 4 3 2 0 0\\n\", \"5\\n0 0 1 4 2\\n0 2 0 1 0\\n\", \"1\\n1\\n0\\n\", \"10\\n1 1 1 0 3 0 6 2 4 5\\n7 6 2 3 5 1 2 0 1 0\\n\", \"10\\n1 0 2 2 5 0 0 0 2 7\\n4 3 1 0 4 3 3 2 1 0\\n\", \"19\\n1 1 3 4 5 3 5... | {
"index": 0,
"split": "dummy"
} |
codeforces | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Title: Partial Sums\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nYou've got an array *a*, consisting of *n* i... | code | {
"ground_truth": "{\"inputs\": [\"3 1\\n1 2 3\", \"5 0\\n3 14 15 92 6\", \"1 1\\n3\", \"1 0\\n0\", \"1 0\\n123\", \"1 1\\n0\", \"4 1\\n3 20 3 4\", \"5 20\\n11 5 6 8 11\", \"17 239\\n663 360 509 307 311 501 523 370 302 601 541 42 328 200 196 110 573\", \"13 666\\n84 89 29 103 128 233 190 122 117 208 119 97 200\", \"4... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Given an array A of integers, return the number of (contiguous, non-empty) subarrays that have a sum divisible by K.\n \n\nExample 1:\nInput: A = [4,... | code | {
"ground_truth": "{\"fn_name\": \"subarraysDivByK\", \"inputs\": [[[4, 5, 0, -2, -3, 1], 5]], \"outputs\": [7]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Mr. Vincent works in a door mat manufacturing company. One day, he designed a new door mat with the following specifications: \n\nMat size must be $N... | code | {
"ground_truth": "{\"inputs\": [\" 5 15\", \" 7 21\", \" 9 27\", \" 13 39\", \" 15 45\", \" 5 15\", \" 97 291\", \" 99 297\", \" 101 303\", \" 51 153\", \" 97 291\", \" 99 297\"], \"outputs\": [\"------.|.------\\n---.|..|..|.---\\n----WELCOME----\\n---.|..|..|.---\\n------.|.------\", \"---------.|.---------\\n----... | {
"index": 0,
"split": "dummy"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.