hash string | ability string | data_source string | prompt list | reward_model dict |
|---|---|---|---|---|
7b3a48823cd08358ca1e725ab940354c | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nDreamoon loves summing up something for no reason. One day he obtains two integers a and b occasionally. He wants to calculate the sum of all nice integers. Positive integer x is called nice if $\\operatorname{mod}(x, b) ... | {
"ground_truth": "{\"inputs\": [\"1 1\\n\", \"2 2\\n\", \"4 1\\n\", \"4 2\\n\", \"4 3\\n\", \"4 4\\n\", \"3 4\\n\", \"2 4\\n\", \"1 4\\n\", \"1000 1000\\n\", \"10000000 10000000\\n\", \"10000000 9999999\\n\", \"2 10000000\\n\", \"10000000 2\\n\", \"9999999 2\\n\", \"9999999 9999999\\n\", \"10000000 10000\\n\", \"100... |
3c03186a1602e6b4a3c8645e06f87671 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\n\"QAQ\" is a word to denote an expression of crying. Imagine \"Q\" as eyes with tears and \"A\" as a mouth.\n\nNow Diamond has given Bort a string consisting of only uppercase English letters of length n. There is a great... | {
"ground_truth": "{\"inputs\": [\"QAQAQYSYIOIWIN\\n\", \"QAQQQZZYNOIWIN\\n\", \"QA\\n\", \"IAQVAQZLQBQVQFTQQQADAQJA\\n\", \"QQAAQASGAYAAAAKAKAQIQEAQAIAAIAQQQQQ\\n\", \"AMVFNFJIAVNQJWIVONQOAOOQSNQSONOASONAONQINAONAOIQONANOIQOANOQINAONOQINAONOXJCOIAQOAOQAQAQAQAQWWWAQQAQ\\n\", \"AAQQAXBQQBQQXBNQRJAQKQNAQNQVDQASAGGANQQQ... |
45835978994c3f41e17082bda084cb75 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nCodefortia is a small island country located somewhere in the West Pacific. It consists of $n$ settlements connected by $m$ bidirectional gravel roads. Curiously enough, the beliefs of the inhabitants require the time nee... | {
"ground_truth": "{\"inputs\": [\"5 5 20 25\\n1 2 25\\n2 3 25\\n3 4 20\\n4 5 20\\n5 1 20\\n\", \"6 7 13 22\\n1 2 13\\n2 3 13\\n1 4 22\\n3 4 13\\n4 5 13\\n5 6 13\\n6 1 13\\n\", \"2 1 1 2\\n2 1 1\\n\", \"2 1 9999999 10000000\\n1 2 10000000\\n\", \"3 3 78422 6789101\\n3 1 6789101\\n2 1 78422\\n2 3 78422\\n\", \"3 3 277... |
e17bd6bd8d9d6fa85a97fc29bf92fa0d | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya and Kolya play a game with a string, using the following rules. Initially, Kolya creates a string s, consisting of small English letters, and uniformly at random chooses an integer k from a segment [0, len(s) - 1]. ... | {
"ground_truth": "{\"inputs\": [\"technocup\\n\", \"tictictactac\\n\", \"bbaabaabbb\\n\", \"cbbbbcaaca\\n\", \"cadbcdddda\\n\", \"bababbdaee\\n\", \"fabbbhgedd\\n\", \"gaejllebhn\\n\", \"bbababaaababaabbbbbabbbbbbaaabbabaaaaabbbbbaaaabbbbabaabaabababbbabbabbabaaababbabbababaaaaabaaaabbb\\n\", \"eaaebccaeacdecaedcaab... |
caeec2e826110f44b8b28a78fb30573f | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe Little Elephant has an integer a, written in the binary notation. He wants to write this number on a piece of paper.\n\nTo make sure that the number a fits on the piece of paper, the Little Elephant ought to delete ex... | {
"ground_truth": "{\"inputs\": [\"101\\n\", \"110010\\n\", \"10000\\n\", \"1111111110\\n\", \"10100101011110101\\n\", \"111010010111\\n\", \"11110111011100000000\\n\", \"11110010010100001110110101110011110110100111101\\n\", \"1001011111010010100111111\\n\", \"1111111111\\n\", \"11111111111111111111001111010011101101... |
5d266fe7c18e142f6a9314dba0d03df9 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIt is so boring in the summer holiday, isn't it? So Alice and Bob have invented a new game to play. The rules are as follows. First, they get a set of n distinct integers. And then they take turns to make the following mo... | {
"ground_truth": "{\"inputs\": [\"2\\n2 3\\n\", \"2\\n5 3\\n\", \"3\\n5 6 7\\n\", \"10\\n72 96 24 66 6 18 12 30 60 48\\n\", \"10\\n78 66 6 60 18 84 36 96 72 48\\n\", \"10\\n98 63 42 56 14 77 70 35 84 21\\n\", \"2\\n1 1000000000\\n\", \"2\\n1000000000 999999999\\n\", \"3\\n2 4 6\\n\", \"2\\n4 6\\n\", \"2\\n2 6\\n\", ... |
51d7186d50fd1c0dd446e3d3ea8b8d73 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nMad scientist Mike does not use slow hard disks. His modification of a hard drive has not one, but n different heads that can read data in parallel.\n\nWhen viewed from the side, Mike's hard drive is an endless array of t... | {
"ground_truth": "{\"inputs\": [\"3 4\\n2 5 6\\n1 3 6 8\\n\", \"3 3\\n1 2 3\\n1 2 3\\n\", \"1 2\\n165\\n142 200\\n\", \"1 2\\n5000000000\\n1 10000000000\\n\", \"2 4\\n3 12\\n1 7 8 14\\n\", \"3 3\\n1 2 3\\n2 3 4\\n\", \"2 1\\n1 10\\n9\\n\", \"3 19\\n7 10 13\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19\\n\", \"3 ... |
c34413535a243ca8dabee630fbe76b4e | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA schoolboy named Vasya loves reading books on programming and mathematics. He has recently read an encyclopedia article that described the method of median smoothing (or median filter) and its many applications in scienc... | {
"ground_truth": "{\"inputs\": [\"4\\n0 0 1 1\\n\", \"5\\n0 1 0 1 0\\n\", \"3\\n1 0 0\\n\", \"4\\n1 0 0 1\\n\", \"7\\n1 0 1 1 1 0 1\\n\", \"14\\n0 1 0 0 0 1 1 0 1 0 1 0 1 0\\n\", \"3\\n1 0 1\\n\", \"3\\n0 0 1\\n\", \"3\\n1 1 0\\n\", \"3\\n1 1 1\\n\", \"4\\n1 1 0 1\\n\", \"4\\n1 0 1 1\\n\", \"10\\n0 1 0 1 0 0 1 0 1 0... |
0ff153c65bcdfa0ff48c248d1e888140 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nLimak is a little bear who loves to play. Today he is playing by destroying block towers. He built n towers in a row. The i-th tower is made of h_{i} identical blocks. For clarification see picture for the first sample.\n... | {
"ground_truth": "{\"inputs\": [\"6\\n2 1 4 6 2 2\\n\", \"7\\n3 3 3 1 3 3 3\\n\", \"7\\n5128 5672 5805 5452 5882 5567 5032\\n\", \"10\\n1 2 2 3 5 5 5 4 2 1\\n\", \"14\\n20 20 20 20 20 20 3 20 20 20 20 20 20 20\\n\", \"50\\n3 2 4 3 5 3 4 5 3 2 3 3 3 4 5 4 2 2 3 3 4 4 3 2 3 3 2 3 4 4 5 2 5 2 3 5 4 4 2 2 3 5 2 5 2 2 5 ... |
0ecede119f4a93897ddd3f8b9d2322f8 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nEighth-grader Vova is on duty today in the class. After classes, he went into the office to wash the board, and found on it the number n. He asked what is this number and the teacher of mathematics Inna Petrovna answered ... | {
"ground_truth": "{\"inputs\": [\"21\\n\", \"20\\n\", \"1\\n\", \"2\\n\", \"3\\n\", \"100000001\\n\", \"1000000000\\n\", \"999999979\\n\", \"9\\n\", \"10\\n\", \"11\\n\", \"39\\n\", \"66\\n\", \"75\\n\", \"100\\n\", \"101\\n\", \"2014\\n\", \"999999994\\n\"], \"outputs\": [\"1\\n15\\n\", \"0\\n\", \"0\\n\", \"1\\n1\... |
c3fe68424d5c8380acdd9a13fb2bcd38 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a non-empty string s consisting of lowercase English letters. You have to pick exactly one non-empty substring of s and shift all its letters 'z' $\\rightarrow$ 'y' $\\rightarrow$ 'x' $\\rightarrow \\ldots \... | {
"ground_truth": "{\"inputs\": [\"codeforces\\n\", \"abacaba\\n\", \"babbbabaababbaa\\n\", \"bcbacaabcababaccccaaaabacbbcbbaa\\n\", \"cabaccaacccabaacdbdcbcdbccbccbabbdadbdcdcdbdbcdcdbdadcbcda\\n\", \"a\\n\", \"eeeedddccbceaabdaecaebaeaecccbdeeeaadcecdbeacecdcdcceabaadbcbbadcdaeddbcccaaeebccecaeeeaebcaaccbdaccbdcada... |
811b158b35eac12103a102b12f10da7c | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAfter a wonderful evening in the restaurant the time to go home came. Leha as a true gentlemen suggested Noora to give her a lift. Certainly the girl agreed with pleasure. Suddenly one problem appeared: Leha cannot find h... | {
"ground_truth": "{\"inputs\": [\"4\\n1 1 1 1 1\\n3 2 5 4 5\\n1 1 5 5 10000\\n1 4 2 5 2\\n\", \"10\\n3 7 4 10 7\\n6 1 7 10 18\\n9 6 10 8 3\\n1 8 3 10 3\\n10 4 10 5 19\\n8 9 9 10 10\\n10 1 10 5 4\\n8 1 9 4 18\\n6 3 9 5 1\\n6 6 9 6 16\\n\", \"10\\n1 1 2 2 8\\n3 4 5 9 4\\n2 10 5 10 6\\n8 5 10 8 8\\n1 2 8 2 20\\n8 6 10 ... |
f5021c47be588c5cb0a7acc990f58cf8 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nGennady is one of the best child dentists in Berland. Today n children got an appointment with him, they lined up in front of his office.\n\nAll children love to cry loudly at the reception at the dentist. We enumerate th... | {
"ground_truth": "{\"inputs\": [\"5\\n4 2 2\\n4 1 2\\n5 2 4\\n3 3 5\\n5 1 2\\n\", \"5\\n4 5 1\\n5 3 9\\n4 1 2\\n2 1 8\\n4 1 9\\n\", \"10\\n10 7 10\\n3 6 11\\n8 4 10\\n10 1 11\\n7 3 13\\n7 2 13\\n7 6 14\\n3 4 17\\n9 4 20\\n5 2 24\\n\", \"10\\n5 6 3\\n7 4 10\\n9 1 17\\n2 8 23\\n9 10 24\\n6 8 18\\n3 2 35\\n7 6 6\\n1 3 ... |
fad468c4d7507192f445729d3c0cdef0 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYaroslav 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 character dies and the game ends. Also, the game has n clock stations, station ... | {
"ground_truth": "{\"inputs\": [\"3 1000\\n1000\\n0 0\\n0 1\\n0 3\\n\", \"3 1000\\n1000\\n1 0\\n1 1\\n1 2\\n\", \"5 1421\\n896 448 727\\n-19 -40\\n-87 40\\n69 51\\n-55 61\\n-7 67\\n\", \"6 1000\\n142 712 254 869\\n7 0\\n95 38\\n96 -20\\n-7 93\\n75 -45\\n-80 -20\\n\", \"7 1288\\n943 265 649 447 806\\n-4 -51\\n-26 32\... |
70b847f33e91009117e6f69afc3b9d61 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nSquirrel Liss lived in a forest peacefully, but unexpected trouble happens. Stones fall from a mountain. Initially Squirrel Liss occupies an interval [0, 1]. Next, n stones will fall and Liss will escape from the stones. ... | {
"ground_truth": "{\"inputs\": [\"llrlr\\n\", \"rrlll\\n\", \"lrlrr\\n\", \"lllrlrllrl\\n\", \"llrlrrrlrr\\n\", \"rlrrrllrrr\\n\", \"lrrlrrllrrrrllllllrr\\n\", \"rlrrrlrrrllrrllrlrll\\n\", \"lllrrlrlrllrrrrrllrl\\n\", \"rrrllrrrlllrlllrlrrr\\n\", \"rrlllrrrlrrlrrrlllrlrlrrrlllrllrrllrllrrlrlrrllllrlrrrrlrlllrlrrrlrl... |
06f05ea33743355af9697660fb9f09da | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nDreamoon likes coloring cells very much.\n\nThere is a row of $n$ cells. Initially, all cells are empty (don't contain any color). Cells are numbered from $1$ to $n$.\n\nYou are given an integer $m$ and $m$ integers $l_1,... | {
"ground_truth": "{\"inputs\": [\"5 3\\n3 2 2\\n\", \"10 1\\n1\\n\", \"1 1\\n1\\n\", \"2 2\\n1 2\\n\", \"200 50\\n49 35 42 47 134 118 14 148 58 159 33 33 8 123 99 126 75 94 1 141 61 79 122 31 48 7 66 97 141 43 25 141 7 56 120 55 49 37 154 56 13 59 153 133 18 1 141 24 151 125\\n\", \"3 3\\n3 3 1\\n\", \"100000 1\\n10... |
60983c5a237c58f8c7adfd7090660001 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou work in a big office. It is a 9 floor building with an elevator that can accommodate up to 4 people. It is your responsibility to manage this elevator.\n\nToday you are late, so there are queues on some floors already... | {
"ground_truth": "{\"inputs\": [\"2\\n3 5\\n5 3\\n\", \"2\\n5 3\\n3 5\\n\", \"9\\n1 2\\n2 3\\n3 4\\n4 5\\n5 6\\n6 7\\n7 8\\n8 9\\n9 1\\n\", \"50\\n9 5\\n2 6\\n5 4\\n7 5\\n3 6\\n5 8\\n1 2\\n6 1\\n9 7\\n8 1\\n9 5\\n6 8\\n6 8\\n2 8\\n4 9\\n6 7\\n7 8\\n5 8\\n1 2\\n9 2\\n5 9\\n6 7\\n3 2\\n9 8\\n7 8\\n7 4\\n6 5\\n1 7\\n6 ... |
7e437f40a9c6a1c8cc0450a60244fa24 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nToad Zitz has an array of integers, each integer is between $0$ and $m-1$ inclusive. The integers are $a_1, a_2, \\ldots, a_n$.\n\nIn one operation Zitz can choose an integer $k$ and $k$ indices $i_1, i_2, \\ldots, i_k$ s... | {
"ground_truth": "{\"inputs\": [\"5 3\\n0 0 0 1 2\\n\", \"5 7\\n0 6 1 3 2\\n\", \"10 10\\n5 0 5 9 4 6 4 5 0 0\\n\", \"4 6\\n0 3 5 1\\n\", \"6 4\\n1 3 0 2 1 0\\n\", \"10 1000\\n981 824 688 537 969 72 39 734 929 718\\n\", \"10 300000\\n111862 91787 271781 182224 260248 142019 30716 102643 141870 19206\\n\", \"100 10\\... |
4331e6a5fd972d9e49d9a6cbeb31dd95 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe life goes up and down, just like nice sequences. Sequence t_1, t_2, ..., t_{n} is called nice if the following two conditions are satisfied: t_{i} < t_{i} + 1 for each odd i < n; t_{i} > t_{i} + 1 for each even i <... | {
"ground_truth": "{\"inputs\": [\"5\\n2 8 4 7 7\\n\", \"4\\n200 150 100 50\\n\", \"10\\n3 2 1 4 1 4 1 4 1 4\\n\", \"9\\n1 2 3 4 5 6 7 8 9\\n\", \"5\\n1 1 1 4 3\\n\", \"10\\n7 7 8 10 5 10 1 5 2 6\\n\", \"50\\n11836 28308 72527 92281 139289 93797 134555 148444 40866 111317 21564 87813 65466 20541 99238 2287 74647 1280... |
168294c0edec72a1057446a83d8e34c8 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya's telephone contains n photos. Photo number 1 is currently opened on the phone. It is allowed to move left and right to the adjacent photo by swiping finger over the screen. If you swipe left from the first photo, y... | {
"ground_truth": "{\"inputs\": [\"4 2 3 10\\nwwhw\\n\", \"5 2 4 13\\nhhwhh\\n\", \"5 2 4 1000\\nhhwhh\\n\", \"3 1 100 10\\nwhw\\n\", \"10 2 3 32\\nhhwwhwhwwh\\n\", \"1 2 3 3\\nw\\n\", \"100 20 100 10202\\nwwwwhhwhhwhhwhhhhhwwwhhhwwwhwwhwhhwwhhwwwhwwhwwwhwhwhwwhhhwhwhhwhwwhhwhwhwwwhwwwwhwhwwwwhwhhhwhwhwww\\n\", \"20 ... |
7073b9e4a70b147bfa32fae21323bd44 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nDoubly linked list is one of the fundamental data structures. A doubly linked list is a sequence of elements, each containing information about the previous and the next elements of the list. In this problem all lists hav... | {
"ground_truth": "{\"inputs\": [\"7\\n4 7\\n5 0\\n0 0\\n6 1\\n0 2\\n0 4\\n1 0\\n\", \"2\\n2 0\\n0 1\\n\", \"1\\n0 0\\n\", \"4\\n0 2\\n1 0\\n0 4\\n3 0\\n\", \"5\\n0 0\\n0 0\\n0 0\\n0 0\\n0 0\\n\", \"2\\n0 0\\n0 0\\n\", \"2\\n0 2\\n1 0\\n\", \"5\\n5 3\\n4 0\\n1 4\\n3 2\\n0 1\\n\", \"5\\n2 0\\n0 1\\n0 4\\n3 5\\n4 0\\n\... |
ac13aba5a034cdeedc18218906a991eb | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nHooray! Berl II, the king of Berland is making a knight tournament. The king has already sent the message to all knights in the kingdom and they in turn agreed to participate in this grand event.\n\nAs for you, you're jus... | {
"ground_truth": "{\"inputs\": [\"4 3\\n1 2 1\\n1 3 3\\n1 4 4\\n\", \"8 4\\n3 5 4\\n3 7 6\\n2 8 8\\n1 8 1\\n\", \"2 1\\n1 2 1\\n\", \"2 1\\n1 2 2\\n\", \"3 1\\n1 3 1\\n\", \"3 1\\n1 3 2\\n\", \"3 1\\n1 3 3\\n\", \"3 2\\n1 2 1\\n1 3 3\\n\", \"3 2\\n1 2 2\\n1 3 2\\n\", \"3 2\\n2 3 3\\n1 3 3\\n\", \"11 6\\n1 2 2\\n7 8 ... |
814ceb45da90093109cab93ae473ea9d | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWe all know the impressive story of Robin Hood. Robin Hood uses his archery skills and his wits to steal the money from rich, and return it to the poor.\n\nThere are n citizens in Kekoland, each person has c_{i} coins. Ea... | {
"ground_truth": "{\"inputs\": [\"4 1\\n1 1 4 2\\n\", \"3 1\\n2 2 2\\n\", \"10 20\\n6 4 7 10 4 5 5 3 7 10\\n\", \"30 7\\n3 3 2 2 2 2 3 4 4 5 2 1 1 5 5 3 4 3 2 1 3 4 3 2 2 5 2 5 1 2\\n\", \"2 0\\n182 2\\n\", \"123 54564\\n38 44 41 42 59 3 95 15 45 32 44 69 35 83 94 57 65 85 64 47 24 20 34 86 26 91 98 12 36 96 80 4 70... |
7020d70dd984ee91d79435196e77e78b | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nBob recently read about bitwise operations used in computers: AND, OR and XOR. He have studied their properties and invented a new game.\n\nInitially, Bob chooses integer m, bit depth of the game, which means that all num... | {
"ground_truth": "{\"inputs\": [\"3 3\\na := 101\\nb := 011\\nc := ? XOR b\\n\", \"5 1\\na := 1\\nbb := 0\\ncx := ? OR a\\nd := ? XOR ?\\ne := d AND bb\\n\", \"2 10\\nb := 0100101101\\na := ? XOR b\\n\", \"1 10\\na := 0110110011\\n\", \"1 6\\na := ? OR ?\\n\", \"13 6\\na := 111010\\nb := 100100\\nc := 001110\\nd := ... |
aca032762cc90a0e85fffc932f55e7e4 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya is an active Internet user. One day he came across an Internet resource he liked, so he wrote its address in the notebook. We know that the address of the written resource has format: <protocol>://<domain>.ru[/<cont... | {
"ground_truth": "{\"inputs\": [\"httpsunrux\\n\", \"ftphttprururu\\n\", \"httpuururrururruruurururrrrrurrurrurruruuruuu\\n\", \"httpabuaruauabbaruru\\n\", \"httpuurrruurruuruuruuurrrurururuurruuuuuuruurr\\n\", \"httpruhhphhhpuhruruhhpruhhphruhhru\\n\", \"httpftprftprutprururftruruftptp\\n\", \"httpfttpftpfttftpftpf... |
a6311c56ccadd21148ddbaea83d3d968 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAs technologies develop, manufacturers are making the process of unlocking a phone as user-friendly as possible. To unlock its new phone, Arkady's pet dog Mu-mu has to bark the password once. The phone represents a passwo... | {
"ground_truth": "{\"inputs\": [\"ya\\n4\\nah\\noy\\nto\\nha\\n\", \"hp\\n2\\nht\\ntp\\n\", \"ah\\n1\\nha\\n\", \"bb\\n4\\nba\\nab\\naa\\nbb\\n\", \"bc\\n4\\nca\\nba\\nbb\\ncc\\n\", \"ba\\n4\\ncd\\nad\\ncc\\ncb\\n\", \"pg\\n4\\nzl\\nxs\\ndi\\nxn\\n\", \"bn\\n100\\ndf\\nyb\\nze\\nml\\nyr\\nof\\nnw\\nfm\\ndw\\nlv\\nzr... |
304f3ffe55004e528a6b3ced7dc3e22d | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have a sequence A of N non-negative integers.\nCompute the sum of \\prod _{i = 1} ^N \\dbinom{B_i}{A_i} over all sequences B of N non-negative integers whose sum is at most M, and print it modulo (10^9 + 7).\nHere, \\d... | {
"ground_truth": "{\"inputs\": [\"3 5\\n1 2 1\\n\", \"10 998244353\\n31 41 59 26 53 58 97 93 23 84\\n\", \"1 1\\n0\\n\", \"2000 3999999\\n2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000... |
ce1f895b5b688aa9180a10cd58635ee7 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAn accordion is a string (yes, in the real world accordions are musical instruments, but let's forget about it for a while) which can be represented as a concatenation of: an opening bracket (ASCII code $091$), a colon (A... | {
"ground_truth": "{\"inputs\": [\"|[a:b:|]\\n\", \"|]:[|:]\\n\", \":][:\\n\", \":[]:\\n\", \"[[:]]\\n\", \"[::]\\n\", \"]:|:[\\n\", \":::::]\\n\", \"::::]\\n\", \"::[]\\n\", \"[]\\n\", \"[a|[::]\\n\", \"dsfdsfds\\n\", \":[||]:\\n\", \"::]\\n\", \":::]\\n\", \"[||]\\n\", \":[[[:]]]:\\n\", \"::]::[:]::[::\\n\", \"[:|:... |
aa47795a9c8937ae8e2e6f8a0e677644 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAnton has the integer x. He is interested what positive integer, which doesn't exceed x, has the maximum sum of digits.\n\nYour task is to help Anton and to find the integer that interests him. If there are several such i... | {
"ground_truth": "{\"inputs\": [\"100\\n\", \"48\\n\", \"521\\n\", \"1\\n\", \"2\\n\", \"3\\n\", \"39188\\n\", \"5\\n\", \"6\\n\", \"7\\n\", \"8\\n\", \"9\\n\", \"10\\n\", \"59999154\\n\", \"1000\\n\", \"10000\\n\", \"100000\\n\", \"1000000\\n\", \"10000000\\n\", \"100000000\\n\", \"1000000000\\n\", \"10000000000\\n... |
0541ff296c48f667201fc64d03abfa18 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nApart from having lots of holidays throughout the year, residents of Berland also have whole lucky years. Year is considered lucky if it has no more than 1 non-zero digit in its number. So years 100, 40000, 5 are lucky an... | {
"ground_truth": "{\"inputs\": [\"4\\n\", \"201\\n\", \"4000\\n\", \"9\\n\", \"10\\n\", \"1\\n\", \"100000000\\n\", \"900000000\\n\", \"999999999\\n\", \"1000000000\\n\", \"9999999\\n\", \"100000001\\n\", \"3660\\n\", \"21\\n\", \"900000001\\n\", \"62911\\n\", \"11\\n\", \"940302010\\n\", \"91\\n\", \"101\\n\", \"10... |
b56f09bcc615e2e1b84a068d246b6cc8 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nJamie loves sleeping. One day, he decides that he needs to wake up at exactly hh: mm. However, he hates waking up, so he wants to make waking up less painful by setting the alarm at a lucky time. He will then press the sn... | {
"ground_truth": "{\"inputs\": [\"3\\n11 23\\n\", \"5\\n01 07\\n\", \"34\\n09 24\\n\", \"2\\n14 37\\n\", \"14\\n19 54\\n\", \"42\\n15 44\\n\", \"46\\n02 43\\n\", \"14\\n06 41\\n\", \"26\\n04 58\\n\", \"54\\n16 47\\n\", \"38\\n20 01\\n\", \"11\\n02 05\\n\", \"55\\n22 10\\n\", \"23\\n10 08\\n\", \"23\\n23 14\\n\", \"5... |
b7fd60e84f8e0b082c986c8a53cf6035 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are fighting with Zmei Gorynich — a ferocious monster from Slavic myths, a huge dragon-like reptile with multiple heads! \n\n $m$ \n\nInitially Zmei Gorynich has $x$ heads. You can deal $n$ types of blows. If you deal... | {
"ground_truth": "{\"inputs\": [\"3\\n3 10\\n6 3\\n8 2\\n1 4\\n4 10\\n4 1\\n3 2\\n2 6\\n1 100\\n2 15\\n10 11\\n14 100\\n\", \"7\\n5 1000000000\\n2 1\\n1 10\\n1 1\\n4 1000000000\\n3 3\\n1 1000000000\\n5 1\\n2 999999999\\n3 1\\n2 10000000\\n4 10000000\\n10000000 999999999\\n9999900 12\\n9999999 55\\n9999999 1\\n2 1000... |
8838f091be5ed86989ad7afe9a56e954 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAnton likes to listen to fairy tales, especially when Danik, Anton's best friend, tells them. Right now Danik tells Anton a fairy tale:\n\n\"Once upon a time, there lived an emperor. He was very rich and had much grain. O... | {
"ground_truth": "{\"inputs\": [\"5 2\\n\", \"8 1\\n\", \"32 5\\n\", \"1024 1024\\n\", \"58044 52909\\n\", \"996478063 658866858\\n\", \"570441179141911871 511467058318039545\\n\", \"1 1\\n\", \"1000000000000000000 1000000000000000000\\n\", \"1000000000000000000 999999999999997145\\n\", \"1 1000000000000000000\\n\",... |
4326f15de2e86de0b3c9351c4eb77ce2 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nTokitsukaze is playing a game derivated from Japanese mahjong. In this game, she has three tiles in her hand. Each tile she owns is a suited tile, which means it has a suit (manzu, pinzu or souzu) and a number (a digit ra... | {
"ground_truth": "{\"inputs\": [\"1s 2s 3s\\n\", \"9m 9m 9m\\n\", \"3p 9m 2p\\n\", \"8p 2s 9m\\n\", \"5s 8m 5s\\n\", \"9s 4s 3m\\n\", \"4p 8m 9s\\n\", \"8s 5s 7p\\n\", \"4p 7p 2p\\n\", \"3p 2p 3p\\n\", \"5s 9p 5s\\n\", \"9m 6s 1p\\n\", \"4m 2p 8m\\n\", \"8p 6s 4p\\n\", \"9s 6m 7p\\n\", \"4m 1p 3m\\n\", \"8s 8m 1p\\n... |
ec53bfd702f7de8aa12c210561dc2c5d | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYet another round on DecoForces is coming! Grandpa Maks wanted to participate in it but someone has stolen his precious sofa! And how can one perform well with such a major loss?\n\nFortunately, the thief had left a note ... | {
"ground_truth": "{\"inputs\": [\"2\\n3 2\\n3 1 3 2\\n1 2 2 2\\n1 0 0 1\\n\", \"3\\n10 10\\n1 2 1 1\\n5 5 6 5\\n6 4 5 4\\n2 1 2 0\\n\", \"2\\n2 2\\n2 1 1 1\\n1 2 2 2\\n1 0 0 0\\n\", \"1\\n1 2\\n1 1 1 2\\n0 0 0 0\\n\", \"1\\n2 1\\n2 1 1 1\\n0 0 0 0\\n\", \"1\\n1000 1000\\n63 902 63 901\\n0 0 0 0\\n\", \"6\\n10 10\\n3... |
b97c16477b450084a178e530fece503c | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nOn 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 then 2 days off. Your task is to determine the minimum possible and the ma... | {
"ground_truth": "{\"inputs\": [\"14\\n\", \"2\\n\", \"1\\n\", \"3\\n\", \"4\\n\", \"5\\n\", \"6\\n\", \"7\\n\", \"8\\n\", \"9\\n\", \"10\\n\", \"11\\n\", \"12\\n\", \"13\\n\", \"1000000\\n\", \"16\\n\", \"17\\n\", \"18\\n\", \"19\\n\", \"20\\n\", \"21\\n\", \"22\\n\", \"23\\n\", \"24\\n\", \"25\\n\", \"26\\n\", \"2... |
69f9d3df6dd4c7bf62879be963f726ce | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya likes everything infinite. Now he is studying the properties of a sequence s, such that its first element is equal to a (s_1 = a), and the difference between any two neighbouring elements is equal to c (s_{i} - s_{i... | {
"ground_truth": "{\"inputs\": [\"1 7 3\\n\", \"10 10 0\\n\", \"1 -4 5\\n\", \"0 60 50\\n\", \"1 -4 -5\\n\", \"0 1 0\\n\", \"10 10 42\\n\", \"-1000000000 1000000000 -1\\n\", \"10 16 4\\n\", \"-1000000000 1000000000 5\\n\", \"1000000000 -1000000000 5\\n\", \"1000000000 -1000000000 0\\n\", \"1000000000 1000000000 0\\n... |
d827d93578b64f79289f18a7ba92050f | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA string is called bracket sequence if it does not contain any characters other than \"(\" and \")\". A bracket sequence is called regular if it it is possible to obtain correct arithmetic expression by inserting characte... | {
"ground_truth": "{\"inputs\": [\"3\\n1\\n4\\n3\\n\", \"0\\n0\\n0\\n0\\n\", \"1\\n2\\n3\\n4\\n\", \"1000000000\\n1000000000\\n1000000000\\n1000000000\\n\", \"1000000000\\n1000000000\\n1000000000\\n999999999\\n\", \"1000000000\\n999999999\\n1000000000\\n1000000000\\n\", \"0\\n1000000000\\n0\\n0\\n\", \"0\\n0\\n1\\n0\... |
4c895c94ffc15e814245853754e6a60d | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nArpa is researching the Mexican wave.\n\nThere are n spectators in the stadium, labeled from 1 to n. They start the Mexican wave at time 0. \n\n At time 1, the first spectator stands. At time 2, the second spectator sta... | {
"ground_truth": "{\"inputs\": [\"10 5 3\\n\", \"10 5 7\\n\", \"10 5 12\\n\", \"840585600 770678331 788528791\\n\", \"25462281 23343504 8024619\\n\", \"723717988 205757169 291917494\\n\", \"27462087 20831796 15492397\\n\", \"966696824 346707476 1196846860\\n\", \"290274403 41153108 327683325\\n\", \"170963478 151220... |
3aa3c42021632d33c3a819ffd25c1076 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nPetya recieved a gift of a string s with length up to 10^5 characters for his birthday. He took two more empty strings t and u and decided to play a game. This game has two possible moves: Extract the first character of ... | {
"ground_truth": "{\"inputs\": [\"cab\\n\", \"acdb\\n\", \"a\\n\", \"ab\\n\", \"ba\\n\", \"dijee\\n\", \"bhrmc\\n\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\n\", \"bababaaababaabbbbbabbbbbbaaabbabaaaaabbbbbaaaabbbbabaabaabababbbabbabbabaaababbabbababaaa... |
f13e7bb3249becc4a52f96fa4c82199c | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nPolycarp has recently created a new level in this cool new game Berlio Maker 85 and uploaded it online. Now players from all over the world can try his level.\n\nAll levels in this game have two stats to them: the number ... | {
"ground_truth": "{\"inputs\": [\"6\\n3\\n0 0\\n1 1\\n1 2\\n2\\n1 0\\n1000 3\\n4\\n10 1\\n15 2\\n10 2\\n15 2\\n1\\n765 432\\n2\\n4 4\\n4 3\\n5\\n0 0\\n1 0\\n1 0\\n1 0\\n1 0\\n\", \"1\\n2\\n10 1\\n11 3\\n\", \"1\\n2\\n5 2\\n8 6\\n\", \"1\\n2\\n43 34\\n44 35\\n\", \"1\\n2\\n4 1\\n5 3\\n\", \"1\\n2\\n100 0\\n101 2\\n\"... |
160732e0d0ca0fb7bbe4e26042f7ba20 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nKaren is getting ready for a new school day!\n\n [Image] \n\nIt is currently hh:mm, given in a 24-hour format. As you know, Karen loves palindromes, and she believes that it is good luck to wake up when the time is a pali... | {
"ground_truth": "{\"inputs\": [\"05:39\\n\", \"13:31\\n\", \"23:59\\n\", \"13:32\\n\", \"14:40\\n\", \"14:00\\n\", \"05:50\\n\", \"12:22\\n\", \"12:34\\n\", \"05:30\\n\", \"14:14\\n\", \"01:10\\n\", \"02:20\\n\", \"03:30\\n\", \"04:40\\n\", \"10:01\\n\", \"11:11\\n\", \"12:21\\n\", \"14:41\\n\", \"15:51\\n\", \"20:... |
087cca64a744f90c4ca1d1bde94ee966 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nLet's call a string \"s-palindrome\" if it is symmetric about the middle of the string. For example, the string \"oHo\" is \"s-palindrome\", but the string \"aa\" is not. The string \"aa\" is not \"s-palindrome\", because... | {
"ground_truth": "{\"inputs\": [\"oXoxoXo\\n\", \"bod\\n\", \"ER\\n\", \"o\\n\", \"a\\n\", \"opo\\n\", \"HCMoxkgbNb\\n\", \"vMhhXCMWDe\\n\", \"iIcamjTRFH\\n\", \"WvoWvvWovW\\n\", \"WXxAdbAxXW\\n\", \"vqMTUUTMpv\\n\", \"iii\\n\", \"AAWW\\n\", \"ss\\n\", \"i\\n\", \"ii\\n\", \"mm\\n\", \"LJ\\n\", \"m\\n\", \"ioi\\n\",... |
8592467ce488db2a142c6fe2ec07bfa9 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given two positive integer numbers a and b. Permute (change order) of the digits of a to construct maximal number not exceeding b. No number in input and/or output can start with the digit 0.\n\nIt is allowed to l... | {
"ground_truth": "{\"inputs\": [\"123\\n222\\n\", \"3921\\n10000\\n\", \"4940\\n5000\\n\", \"23923472834\\n23589234723\\n\", \"102391019\\n491010301\\n\", \"123456789123456789\\n276193619183618162\\n\", \"1000000000000000000\\n1000000000000000000\\n\", \"1\\n1000000000000000000\\n\", \"999999999999999999\\n100000000... |
da127ce86c20819ec5f76082970c1473 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWet Shark asked Rat Kwesh to generate three positive real numbers x, y and z, from 0.1 to 200.0, inclusive. Wet Krash wants to impress Wet Shark, so all generated numbers will have exactly one digit after the decimal poin... | {
"ground_truth": "{\"inputs\": [\"1.1 3.4 2.5\\n\", \"2.0 2.0 2.0\\n\", \"1.9 1.8 1.7\\n\", \"2.0 2.1 2.2\\n\", \"1.5 1.7 2.5\\n\", \"1.1 1.1 1.1\\n\", \"4.2 1.1 1.2\\n\", \"113.9 125.2 88.8\\n\", \"185.9 9.6 163.4\\n\", \"198.7 23.7 89.1\\n\", \"141.1 108.1 14.9\\n\", \"153.9 122.1 89.5\\n\", \"25.9 77.0 144.8\\n\"... |
a8c2838d0591588228a123b640297aa0 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIn this problem we assume the Earth to be a completely round ball and its surface a perfect sphere. The length of the equator and any meridian is considered to be exactly 40 000 kilometers. Thus, travelling from North Pol... | {
"ground_truth": "{\"inputs\": [\"5\\n7500 South\\n10000 East\\n3500 North\\n4444 West\\n4000 North\\n\", \"2\\n15000 South\\n4000 East\\n\", \"5\\n20000 South\\n1000 North\\n1000000 West\\n9000 North\\n10000 North\\n\", \"3\\n20000 South\\n10 East\\n20000 North\\n\", \"2\\n1000 North\\n1000 South\\n\", \"4\\n50 Sou... |
754cf045fd5f87f3edd5b57cf6831e28 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given two arithmetic progressions: a_1k + b_1 and a_2l + b_2. Find the number of integers x such that L ≤ x ≤ R and x = a_1k' + b_1 = a_2l' + b_2, for some integers k', l' ≥ 0.\n\n\n-----Input-----\n\nThe only lin... | {
"ground_truth": "{\"inputs\": [\"2 0 3 3 5 21\\n\", \"2 4 3 0 6 17\\n\", \"2 0 4 2 -39 -37\\n\", \"1 9 3 11 49 109\\n\", \"3 81 5 72 -1761 501\\n\", \"8 -89 20 67 8771 35222\\n\", \"1 -221 894 86403 -687111 141371\\n\", \"1 -1074 271 17741 -2062230 1866217\\n\", \"3 2408 819 119198 -8585197 7878219\\n\", \"1 341 85... |
5e51928e3ac8a778bc0c4663ac920b17 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe flag of Berland is such rectangular field n × m that satisfies following conditions:\n\n Flag consists of three colors which correspond to letters 'R', 'G' and 'B'. Flag consists of three equal in width and height s... | {
"ground_truth": "{\"inputs\": [\"6 5\\nRRRRR\\nRRRRR\\nBBBBB\\nBBBBB\\nGGGGG\\nGGGGG\\n\", \"4 3\\nBRG\\nBRG\\nBRG\\nBRG\\n\", \"6 7\\nRRRGGGG\\nRRRGGGG\\nRRRGGGG\\nRRRBBBB\\nRRRBBBB\\nRRRBBBB\\n\", \"4 4\\nRRRR\\nRRRR\\nBBBB\\nGGGG\\n\", \"1 3\\nGRB\\n\", \"3 1\\nR\\nG\\nB\\n\", \"4 3\\nRGB\\nGRB\\nGRB\\nGRB\\n\",... |
d1b4cdebde81d700173955388cc2e41a | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nDante is engaged in a fight with \"The Savior\". Before he can fight it with his sword, he needs to break its shields. He has two guns, Ebony and Ivory, each of them is able to perform any non-negative number of shots.\n\... | {
"ground_truth": "{\"inputs\": [\"4 6 15\\n\", \"3 2 7\\n\", \"6 11 6\\n\", \"3 12 15\\n\", \"5 5 10\\n\", \"6 6 7\\n\", \"1 1 20\\n\", \"12 14 19\\n\", \"15 12 26\\n\", \"2 4 8\\n\", \"4 5 30\\n\", \"4 5 48\\n\", \"2 17 105\\n\", \"10 25 282\\n\", \"6 34 323\\n\", \"2 47 464\\n\", \"4 53 113\\n\", \"6 64 546\\n\", ... |
5a7620bd3b264c87a561537412d1b01d | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nRunning with barriers on the circle track is very popular in the country where Dasha lives, so no wonder that on her way to classes she saw the following situation:\n\nThe track is the circle with length L, in distinct po... | {
"ground_truth": "{\"inputs\": [\"3 8\\n2 4 6\\n1 5 7\\n\", \"4 9\\n2 3 5 8\\n0 1 3 6\\n\", \"2 4\\n1 3\\n1 2\\n\", \"5 9\\n0 2 5 6 7\\n1 3 6 7 8\\n\", \"5 60\\n7 26 27 40 59\\n14 22 41 42 55\\n\", \"20 29\\n0 1 2 4 5 8 9 12 14 15 17 19 20 21 22 23 25 26 27 28\\n0 2 4 5 6 7 8 10 11 12 13 14 15 16 18 19 22 23 26 28\\... |
f1ba8a5c068d74dacdad66763b3e4be5 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA string is a palindrome if it reads the same from the left to the right and from the right to the left. For example, the strings \"kek\", \"abacaba\", \"r\" and \"papicipap\" are palindromes, while the strings \"abb\" an... | {
"ground_truth": "{\"inputs\": [\"mew\\n\", \"wuffuw\\n\", \"qqqqqqqq\\n\", \"ijvji\\n\", \"iiiiiii\\n\", \"wobervhvvkihcuyjtmqhaaigvvgiaahqmtjyuchikvvhvrebow\\n\", \"wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\\n\", \"wobervhvvkihcuyjtmqhaaigvahheoqleromusrartldojsjvy\\n\", \"ijvxljt\\n\", \"fyhcncnchyf\\n\"... |
c4bbe1873d5bb8ab8c85822596cfcb18 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIs it rated?\n\nHere it is. The Ultimate Question of Competitive Programming, Codeforces, and Everything. And you are here to answer it.\n\nAnother Codeforces round has been conducted. No two participants have the same nu... | {
"ground_truth": "{\"inputs\": [\"6\\n3060 3060\\n2194 2194\\n2876 2903\\n2624 2624\\n3007 2991\\n2884 2884\\n\", \"4\\n1500 1500\\n1300 1300\\n1200 1200\\n1400 1400\\n\", \"5\\n3123 3123\\n2777 2777\\n2246 2246\\n2246 2246\\n1699 1699\\n\", \"2\\n1 1\\n1 1\\n\", \"2\\n4126 4126\\n4126 4126\\n\", \"10\\n446 446\\n13... |
19a69092a663713210455c4a881aca06 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasiliy has a car and he wants to get from home to the post office. The distance which he needs to pass equals to d kilometers.\n\nVasiliy's car is not new — it breaks after driven every k kilometers and Vasiliy needs t s... | {
"ground_truth": "{\"inputs\": [\"5 2 1 4 10\\n\", \"5 2 1 4 5\\n\", \"1 1 1 2 1\\n\", \"1000000000000 1000000 999999 1000000 1000000\\n\", \"997167959139 199252 232602 952690 802746\\n\", \"244641009859 748096 689016 889744 927808\\n\", \"483524125987 264237 209883 668942 244358\\n\", \"726702209411 813081 730750 8... |
6b5314fef2c2920d7ba351472390cc9e | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given positive integer number n. You should create such strictly increasing sequence of k positive numbers a_1, a_2, ..., a_{k}, that their sum is equal to n and greatest common divisor is maximal.\n\nGreatest com... | {
"ground_truth": "{\"inputs\": [\"6 3\\n\", \"8 2\\n\", \"5 3\\n\", \"1 1\\n\", \"1 2\\n\", \"2 1\\n\", \"2 10000000000\\n\", \"5 1\\n\", \"6 2\\n\", \"24 2\\n\", \"24 3\\n\", \"24 4\\n\", \"24 5\\n\", \"479001600 2\\n\", \"479001600 3\\n\", \"479001600 4\\n\", \"479001600 5\\n\", \"479001600 6\\n\", \"3000000021 1\... |
a6c4845389345a2ca7c7d1c1f8f3c51f | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nLet's write all the positive integer numbers one after another from $1$ without any delimiters (i.e. as a single string). It will be the infinite sequence starting with 1234567891011121314151617181920212223242526272829303... | {
"ground_truth": "{\"inputs\": [\"7\\n\", \"21\\n\", \"1\\n\", \"2\\n\", \"3\\n\", \"4\\n\", \"5\\n\", \"6\\n\", \"8\\n\", \"9\\n\", \"10\\n\", \"12\\n\", \"188\\n\", \"189\\n\", \"190\\n\", \"191\\n\", \"192\\n\", \"193\\n\", \"194\\n\", \"195\\n\", \"196\\n\", \"197\\n\", \"198\\n\", \"199\\n\", \"200\\n\", \"300\... |
18fce24224db6ceb856adf1008687e22 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWelcome to Codeforces Stock Exchange! We're pretty limited now as we currently allow trading on one stock, Codeforces Ltd. We hope you'll still be able to make profit from the market!\n\nIn the morning, there are $n$ oppo... | {
"ground_truth": "{\"inputs\": [\"3 4 11\\n4 2 5\\n4 4 5 4\\n\", \"2 2 50\\n5 7\\n4 2\\n\", \"1 1 1\\n1\\n1\\n\", \"1 1 35\\n5\\n7\\n\", \"1 1 36\\n5\\n7\\n\", \"3 5 20\\n1000 4 6\\n1 2 7 6 5\\n\", \"5 3 20\\n5 4 3 2 1\\n6 7 1000\\n\", \"30 30 987\\n413 937 166 77 749 925 792 353 773 88 218 863 71 186 753 306 952 96... |
b692b3de73ddcc59e5d2cdfb086f2919 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nВ Берляндском государственном университете локальная сеть между серверами не всегда работает без ошибок. При передаче двух одинаковых сообщений подряд возможна ошибка, в результате которой эти два сообщения сливаются в од... | {
"ground_truth": "{\"inputs\": [\"abrakadabrabrakadabra\\n\", \"acacacaca\\n\", \"abcabc\\n\", \"abababab\\n\", \"tatbt\\n\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\n\", \"r\\n\", \"zaz\\n\", \"zaza\\n\", \"gg\\n\", \"gagaga\\n\", \"hhhh\\n\", \"sssss\... |
e143cbc76dcaf03550458a6902999fca | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nDaniel is organizing a football tournament. He has come up with the following tournament format: In the first several (possibly zero) stages, while the number of teams is even, they split in pairs and play one game for ... | {
"ground_truth": "{\"inputs\": [\"3\\n\", \"25\\n\", \"2\\n\", \"1\\n\", \"15\\n\", \"314\\n\", \"524800\\n\", \"5149487579894806\\n\", \"249999998807430810\\n\", \"1000000000000000000\\n\", \"4\\n\", \"5\\n\", \"6\\n\", \"7\\n\", \"8\\n\", \"9\\n\", \"10\\n\", \"11\\n\", \"12\\n\", \"13\\n\", \"14\\n\", \"21\\n\", ... |
c8d39512ac44a5858449f6ebc6e9cafd | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA string a of length m is called antipalindromic iff m is even, and for each i (1 ≤ i ≤ m) a_{i} ≠ a_{m} - i + 1.\n\nIvan has a string s consisting of n lowercase Latin letters; n is even. He wants to form some string t t... | {
"ground_truth": "{\"inputs\": [\"8\\nabacabac\\n1 1 1 1 1 1 1 1\\n\", \"8\\nabaccaba\\n1 2 3 4 5 6 7 8\\n\", \"8\\nabacabca\\n1 2 3 4 4 3 2 1\\n\", \"100\\nbaaacbccbccaccaccaaabcabcabccacaabcbccbccabbabcbcbbaacacbacacacaacccbcbbbbacccababcbacacbacababcacbc\\n28 28 36 36 9 53 7 54 66 73 63 30 55 53 54 74 60 2 34 36 ... |
d73003d4614e4ecb76d32f7b0cad010b | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVanya has a scales for weighing loads and weights of masses w^0, w^1, w^2, ..., w^100 grams where w is some integer not less than 2 (exactly one weight of each nominal value). Vanya wonders whether he can weight an item w... | {
"ground_truth": "{\"inputs\": [\"3 7\\n\", \"100 99\\n\", \"100 50\\n\", \"1000000000 1\\n\", \"100 10002\\n\", \"4 7\\n\", \"4 11\\n\", \"5 781\\n\", \"7 9\\n\", \"5077 5988\\n\", \"2 9596\\n\", \"4 1069\\n\", \"4 7134\\n\", \"4 9083\\n\", \"4 7927\\n\", \"4 6772\\n\", \"5 782\\n\", \"4 1000000000\\n\", \"4 357913... |
0ded221adb01aa4e6b7877acfd8fda4f | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nMary has just graduated from one well-known University and is now attending celebration party. Students like to dream of a beautiful life, so they used champagne glasses to construct a small pyramid. The height of the pyr... | {
"ground_truth": "{\"inputs\": [\"3 5\\n\", \"4 8\\n\", \"1 1\\n\", \"10 10000\\n\", \"1 10000\\n\", \"10 1\\n\", \"1 0\\n\", \"10 0\\n\", \"10 1022\\n\", \"10 1023\\n\", \"10 1024\\n\", \"1 2\\n\", \"1 200\\n\", \"7 128\\n\", \"8 198\\n\", \"2 2\\n\", \"2 3\\n\", \"2 4\\n\", \"2 100\\n\", \"2 10000\\n\", \"3 7\\n\"... |
c316a49502e4443a76e586b66608e021 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAfter making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectangle to be parallel to them.... | {
"ground_truth": "{\"inputs\": [\"2\\n0 0\\n1 1\\n\", \"1\\n1 1\\n\", \"1\\n-188 17\\n\", \"1\\n71 -740\\n\", \"4\\n-56 -858\\n-56 -174\\n778 -858\\n778 -174\\n\", \"2\\n14 153\\n566 -13\\n\", \"2\\n-559 894\\n314 127\\n\", \"1\\n-227 -825\\n\", \"2\\n-187 583\\n25 13\\n\", \"2\\n-337 451\\n32 -395\\n\", \"4\\n-64 -... |
7a283eb5c8815c93d35f4c2fc0eae0fc | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou have an array a consisting of n integers. Each integer from 1 to n appears exactly once in this array.\n\nFor some indices i (1 ≤ i ≤ n - 1) it is possible to swap i-th element with (i + 1)-th, for other indices it is... | {
"ground_truth": "{\"inputs\": [\"6\\n1 2 5 3 4 6\\n01110\\n\", \"6\\n1 2 5 3 4 6\\n01010\\n\", \"6\\n1 6 3 4 5 2\\n01101\\n\", \"6\\n2 3 1 4 5 6\\n01111\\n\", \"4\\n2 3 1 4\\n011\\n\", \"2\\n2 1\\n0\\n\", \"5\\n1 2 4 5 3\\n0101\\n\", \"5\\n1 2 4 5 3\\n0001\\n\", \"5\\n1 4 5 2 3\\n0110\\n\", \"5\\n4 5 1 2 3\\n0111\\... |
9459395038fd71acb26d850c0bb8a606 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA new airplane SuperPuperJet has an infinite number of rows, numbered with positive integers starting with 1 from cockpit to tail. There are six seats in each row, denoted with letters from 'a' to 'f'. Seats 'a', 'b' and ... | {
"ground_truth": "{\"inputs\": [\"1f\\n\", \"2d\\n\", \"4a\\n\", \"5e\\n\", \"2c\\n\", \"1b\\n\", \"1000000000000000000d\\n\", \"999999999999999997a\\n\", \"1c\\n\", \"1d\\n\", \"1e\\n\", \"1a\\n\", \"2a\\n\", \"2b\\n\", \"2e\\n\", \"2f\\n\", \"3a\\n\", \"3b\\n\", \"3c\\n\", \"3d\\n\", \"3e\\n\", \"3f\\n\", \"4b\\n\... |
3452c6276b993dc79169c4641fc584e4 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAfter seeing the \"ALL YOUR BASE ARE BELONG TO US\" meme for the first time, numbers X and Y realised that they have different bases, which complicated their relations.\n\nYou're given a number X represented in base b_{x}... | {
"ground_truth": "{\"inputs\": [\"6 2\\n1 0 1 1 1 1\\n2 10\\n4 7\\n\", \"3 3\\n1 0 2\\n2 5\\n2 4\\n\", \"7 16\\n15 15 4 0 0 7 10\\n7 9\\n4 8 0 3 1 5 0\\n\", \"2 2\\n1 0\\n2 3\\n1 0\\n\", \"2 2\\n1 0\\n1 3\\n1\\n\", \"10 2\\n1 0 1 0 1 0 1 0 1 0\\n10 3\\n2 2 2 2 2 2 2 2 2 2\\n\", \"10 16\\n15 15 4 0 0 0 0 7 10 9\\n7 9... |
e4ae6f49e8cbd2e9e14a7dc7ff5a231e | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVova again tries to play some computer card game.\n\nThe rules of deck creation in this game are simple. Vova is given an existing deck of n cards and a magic number k. The order of the cards in the deck is fixed. Each ca... | {
"ground_truth": "{\"inputs\": [\"3 4\\n6 2 8\\n\", \"3 6\\n9 1 14\\n\", \"5 1\\n1 3 1 3 1\\n\", \"5 1\\n5 5 5 5 5\\n\", \"5 1\\n5 4 4 4 4\\n\", \"100 1\\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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
c10d9062ad723f5d2f09e0a5bacad1f6 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nOne day Kefa found n baloons. For convenience, we denote color of i-th baloon as s_{i} — lowercase letter of the Latin alphabet. Also Kefa has k friends. Friend will be upset, If he get two baloons of the same color. Kefa... | {
"ground_truth": "{\"inputs\": [\"4 2\\naabb\\n\", \"6 3\\naacaab\\n\", \"2 2\\nlu\\n\", \"5 3\\novvoo\\n\", \"36 13\\nbzbzcffczzcbcbzzfzbbfzfzzbfbbcbfccbf\\n\", \"81 3\\nooycgmvvrophvcvpoupepqllqttwcocuilvyxbyumdmmfapvpnxhjhxfuagpnntonibicaqjvwfhwxhbv\\n\", \"100 100\\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx... |
c9caf6175f108e9d895b10bebeafbebe | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given an array of n integer numbers a_0, a_1, ..., a_{n} - 1. Find the distance between two closest (nearest) minimums in it. It is guaranteed that in the array a minimum occurs at least two times.\n\n\n-----Input... | {
"ground_truth": "{\"inputs\": [\"2\\n3 3\\n\", \"3\\n5 6 5\\n\", \"9\\n2 1 3 5 4 1 2 3 1\\n\", \"6\\n4 6 7 8 6 4\\n\", \"2\\n1000000000 1000000000\\n\", \"42\\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 1 1 1 1 1 1 1 1 1 1 1 1 1\\n\", \"2\\n10000000 10000000\\n\", \"5\\n100000000 100000001 100000000 ... |
461fa37dac5e6fc8f381c9ba4b8bf033 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVector Willman and Array Bolt are the two most famous athletes of Byteforces. They are going to compete in a race with a distance of L meters today.\n\n [Image] \n\nWillman and Bolt have exactly the same speed, so when th... | {
"ground_truth": "{\"inputs\": [\"10 3 2\\n\", \"7 1 2\\n\", \"1 1 1\\n\", \"5814 31 7\\n\", \"94268 813 766\\n\", \"262610 5583 4717\\n\", \"3898439 96326 71937\\n\", \"257593781689876390 32561717 4411677\\n\", \"111319886766128339 7862842484895022 3003994959686829\\n\", \"413850294331656955 570110918058849723 4098... |
df87b36fbcd9abb8a9e83e2963ef6727 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nNauuo is a girl who loves writing comments.\n\nOne day, she posted a comment on Codeforces, wondering whether she would get upvotes or downvotes.\n\nIt's known that there were $x$ persons who would upvote, $y$ persons who... | {
"ground_truth": "{\"inputs\": [\"3 7 0\\n\", \"2 0 1\\n\", \"1 1 0\\n\", \"0 0 1\\n\", \"12 1 11\\n\", \"22 99 77\\n\", \"28 99 70\\n\", \"73 29 43\\n\", \"100 100 100\\n\", \"1 0 1\\n\", \"5 7 1\\n\", \"13 6 8\\n\", \"94 37 25\\n\", \"45 0 44\\n\", \"62 56 5\\n\", \"88 88 0\\n\", \"1 1 1\\n\", \"0 0 0\\n\", \"0 10... |
b2c972f15d5d2f066bebdb76b6586555 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya has got a robot which is situated on an infinite Cartesian plane, initially in the cell $(0, 0)$. Robot can perform the following four kinds of operations: U — move from $(x, y)$ to $(x, y + 1)$; D — move from $(... | {
"ground_truth": "{\"inputs\": [\"5\\nRURUU\\n-2 3\\n\", \"4\\nRULR\\n1 1\\n\", \"3\\nUUU\\n100 100\\n\", \"6\\nUDUDUD\\n0 1\\n\", \"100\\nURDLDDLLDDLDDDRRLLRRRLULLRRLUDUUDUULURRRDRRLLDRLLUUDLDRDLDDLDLLLULRURRUUDDLDRULRDRUDDDDDDULRDDRLRDDL\\n-59 -1\\n\", \"8\\nUUULLLUU\\n-3 0\\n\", \"9\\nUULUURRUU\\n6379095 -4\\n\",... |
0d7694c702f1df26997cf0c65f7ca6f2 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given string $s$ of length $n$ consisting of 0-s and 1-s. You build an infinite string $t$ as a concatenation of an infinite number of strings $s$, or $t = ssss \\dots$ For example, if $s =$ 10010, then $t =$ 1001... | {
"ground_truth": "{\"inputs\": [\"4\\n6 10\\n010010\\n5 3\\n10101\\n1 0\\n0\\n2 0\\n01\\n\", \"2\\n1 -548706795\\n0\\n1 -735838406\\n1\\n\", \"1\\n5 5\\n00000\\n\", \"19\\n1 1\\n1\\n1 1\\n1\\n1 1\\n1\\n1 1\\n1\\n1 1\\n1\\n1 1\\n1\\n1 1\\n1\\n1 1\\n1\\n1 1\\n1\\n1 1\\n1\\n1 1\\n1\\n1 1\\n1\\n1 1\\n1\\n1 1\\n1\\n1 1\\... |
6319ef177065c4e380a86b841e9ae623 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nPolycarp is crazy about round numbers. He especially likes the numbers divisible by 10^{k}.\n\nIn the given number of n Polycarp wants to remove the least number of digits to get a number that is divisible by 10^{k}. For ... | {
"ground_truth": "{\"inputs\": [\"30020 3\\n\", \"100 9\\n\", \"10203049 2\\n\", \"0 1\\n\", \"0 9\\n\", \"100 2\\n\", \"102030404 2\\n\", \"1000999999 3\\n\", \"12000000 4\\n\", \"1090090090 5\\n\", \"10 1\\n\", \"10 2\\n\", \"10 9\\n\", \"100 1\\n\", \"100 3\\n\", \"101010110 3\\n\", \"101010110 1\\n\", \"10101011... |
67fc89f8fa2cfed1b571c654b482a55b | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nOn the Literature lesson Sergei noticed an awful injustice, it seems that some students are asked more often than others.\n\nSeating in the class looks like a rectangle, where n rows with m pupils in each. \n\nThe teacher... | {
"ground_truth": "{\"inputs\": [\"1 3 8 1 1\\n\", \"4 2 9 4 2\\n\", \"5 5 25 4 3\\n\", \"100 100 1000000000000000000 100 100\\n\", \"3 2 15 2 2\\n\", \"4 1 8 3 1\\n\", \"3 2 8 2 1\\n\", \"4 2 9 4 1\\n\", \"1 3 7 1 1\\n\", \"2 2 8 2 1\\n\", \"3 1 6 2 1\\n\", \"5 6 30 5 4\\n\", \"3 8 134010 3 4\\n\", \"10 10 25 5 1\\n... |
a3622e85a275459a448e0748141fbe8e | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nMister B once received a gift: it was a book about aliens, which he started read immediately. This book had c pages.\n\nAt first day Mister B read v_0 pages, but after that he started to speed up. Every day, starting from... | {
"ground_truth": "{\"inputs\": [\"5 5 10 5 4\\n\", \"12 4 12 4 1\\n\", \"15 1 100 0 0\\n\", \"1 1 1 0 0\\n\", \"1000 999 1000 1000 998\\n\", \"1000 2 2 5 1\\n\", \"1000 1 1 1000 0\\n\", \"737 41 74 12 11\\n\", \"1000 1000 1000 0 999\\n\", \"765 12 105 5 7\\n\", \"15 2 2 1000 0\\n\", \"1000 1 1000 1000 0\\n\", \"20 3... |
332815022503303aff990dcc95eff0ba | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nBerland Football Cup starts really soon! Commentators from all over the world come to the event.\n\nOrganizers have already built $n$ commentary boxes. $m$ regional delegations will come to the Cup. Every delegation shoul... | {
"ground_truth": "{\"inputs\": [\"9 7 3 8\\n\", \"2 7 3 7\\n\", \"30 6 17 19\\n\", \"500000000001 1000000000000 100 100\\n\", \"1000000000000 750000000001 10 100\\n\", \"1000000000000 750000000001 100 10\\n\", \"42 1 1 1\\n\", \"1 1000000000000 1 100\\n\", \"7 2 3 7\\n\", \"999999999 2 1 1\\n\", \"999999999999 10000... |
78a4ae1b4d83402d7cfada9f251940ab | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe only difference between easy and hard versions is constraints.\n\nPolycarp loves to listen to music, so he never leaves the player, even on the way home from the university. Polycarp overcomes the distance from the un... | {
"ground_truth": "{\"inputs\": [\"3 3\\n1 1\\n1 2\\n1 3\\n\", \"3 3\\n1 1\\n1 1\\n1 3\\n\", \"4 10\\n5 3\\n2 1\\n3 2\\n5 1\\n\", \"1 1\\n1 1\\n\", \"1 1\\n1 3\\n\", \"1 2\\n1 2\\n\", \"1 15\\n15 1\\n\", \"1 225\\n15 1\\n\", \"2 1\\n1 2\\n1 2\\n\", \"2 1\\n1 1\\n1 1\\n\", \"2 1\\n3 1\\n2 2\\n\", \"2 2\\n1 3\\n1 3\\n\... |
168035631e727cf99e32f375db8de375 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVivek initially has an empty array $a$ and some integer constant $m$.\n\nHe performs the following algorithm: Select a random integer $x$ uniformly in range from $1$ to $m$ and append it to the end of $a$. Compute the g... | {
"ground_truth": "{\"inputs\": [\"1\\n\", \"2\\n\", \"4\\n\", \"3\\n\", \"5\\n\", \"6\\n\", \"7\\n\", \"8\\n\", \"9\\n\", \"10\\n\", \"11\\n\", \"12\\n\", \"100000\\n\", \"99991\\n\", \"30030\\n\", \"99594\\n\", \"91402\\n\", \"93493\\n\", \"96917\\n\", \"80555\\n\", \"30238\\n\", \"5447\\n\", \"5714\\n\", \"735\\n\... |
d4f92e3fddd9945f4afe2eae3ad487e5 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nNeko loves divisors. During the latest number theory lesson, he got an interesting exercise from his math teacher.\n\nNeko has two integers $a$ and $b$. His goal is to find a non-negative integer $k$ such that the least c... | {
"ground_truth": "{\"inputs\": [\"6 10\\n\", \"21 31\\n\", \"5 10\\n\", \"1924 5834\\n\", \"9911 666013\\n\", \"1 1\\n\", \"69 4295\\n\", \"948248258 533435433\\n\", \"953 1349\\n\", \"999999973 800000007\\n\", \"112342324 524224233\\n\", \"1021211 59555555\\n\", \"1000000000 1000000000\\n\", \"199999943 999999973\\... |
7ccec3ef79a1634cf278a3ef69e77c46 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nNoora is a student of one famous high school. It's her final year in school — she is going to study in university next year. However, she has to get an «A» graduation certificate in order to apply to a prestigious one.\n\... | {
"ground_truth": "{\"inputs\": [\"2 10\\n8 9\\n\", \"3 5\\n4 4 4\\n\", \"3 10\\n10 8 9\\n\", \"2 23\\n21 23\\n\", \"5 10\\n5 10 10 9 10\\n\", \"12 50\\n18 10 26 22 22 23 14 21 27 18 25 12\\n\", \"38 12\\n2 7 10 8 5 3 5 6 3 6 5 1 9 7 7 8 3 4 4 4 5 2 3 6 6 1 6 7 4 4 8 7 4 5 3 6 6 6\\n\", \"63 86\\n32 31 36 29 36 26 28... |
7f3609418714295e2a8ab00d9c056928 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are n shovels in Polycarp's shop. The i-th shovel costs i burles, that is, the first shovel costs 1 burle, the second shovel costs 2 burles, the third shovel costs 3 burles, and so on. Polycarps wants to sell shovel... | {
"ground_truth": "{\"inputs\": [\"7\\n\", \"14\\n\", \"50\\n\", \"999999999\\n\", \"15\\n\", \"3\\n\", \"6500\\n\", \"4\\n\", \"13\\n\", \"10\\n\", \"499999\\n\", \"6\\n\", \"8\\n\", \"9\\n\", \"11\\n\", \"12\\n\", \"5\\n\", \"16\\n\", \"17\\n\", \"18\\n\", \"19\\n\", \"20\\n\", \"21\\n\", \"22\\n\", \"23\\n\", \"24... |
f468d71185702bef70f4e4fb3b889de6 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nPolycarp and Vasiliy love simple logical games. Today they play a game with infinite chessboard and one pawn for each player. Polycarp and Vasiliy move in turns, Polycarp starts. In each turn Polycarp can move his pawn fr... | {
"ground_truth": "{\"inputs\": [\"2 1 2 2\\n\", \"4 7 7 4\\n\", \"20 0 7 22\\n\", \"80 100 83 97\\n\", \"80 100 77 103\\n\", \"55000 60000 55003 60100\\n\", \"100000 100000 100000 99999\\n\", \"100000 99999 100000 100000\\n\", \"0 100000 100000 99999\\n\", \"0 100000 99999 100000\\n\", \"0 90000 89999 89999\\n\", \"... |
4f0c0eac33d97a0b0a79eff67a1aca7d | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nPetr wants to make a calendar for current month. For this purpose he draws a table in which columns correspond to weeks (a week is seven consequent days from Monday to Sunday), rows correspond to weekdays, and cells conta... | {
"ground_truth": "{\"inputs\": [\"1 7\\n\", \"1 1\\n\", \"11 6\\n\", \"2 7\\n\", \"2 1\\n\", \"8 6\\n\", \"1 1\\n\", \"1 2\\n\", \"1 3\\n\", \"1 4\\n\", \"1 5\\n\", \"1 6\\n\", \"1 7\\n\", \"2 1\\n\", \"2 2\\n\", \"2 3\\n\", \"2 4\\n\", \"2 5\\n\", \"2 6\\n\", \"2 7\\n\", \"3 1\\n\", \"3 2\\n\", \"3 3\\n\", \"3 4\\n... |
dca4bcae6e35251eaa226c3e9d95a0b0 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe year 2015 is almost over.\n\nLimak is a little polar bear. He has recently learnt about the binary system. He noticed that the passing year has exactly one zero in its representation in the binary system — 2015_10 = 1... | {
"ground_truth": "{\"inputs\": [\"5 10\\n\", \"2015 2015\\n\", \"100 105\\n\", \"72057594000000000 72057595000000000\\n\", \"1 100\\n\", \"1000000000000000000 1000000000000000000\\n\", \"1 1000000000000000000\\n\", \"1 1\\n\", \"1 2\\n\", \"1 3\\n\", \"1 4\\n\", \"1 5\\n\", \"1 6\\n\", \"1 7\\n\", \"2 2\\n\", \"2 3\... |
06d7764ff392e10af36d0a3d2133d01d | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAnya loves to fold and stick. Today she decided to do just that.\n\nAnya has n cubes lying in a line and numbered from 1 to n from left to right, with natural numbers written on them. She also has k stickers with exclamat... | {
"ground_truth": "{\"inputs\": [\"2 2 30\\n4 3\\n\", \"2 2 7\\n4 3\\n\", \"3 1 1\\n1 1 1\\n\", \"25 25 25\\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\\n\", \"13 1 60\\n3 6 3 4 3 5 1 4 4 4 3 4 3\\n\", \"10 10 1002\\n5 6 5 3 4 3 3 2 6 4\\n\", \"7 6 14\\n1 3 2 4 1 1 6\\n\", \"8 7 169\\n4 3 4 3 5 5 2 5\\n\", \"1... |
bf1f8b1db6789ea0c13d853875570e12 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nSuppose you are performing the following algorithm. There is an array $v_1, v_2, \\dots, v_n$ filled with zeroes at start. The following operation is applied to the array several times — at $i$-th step ($0$-indexed) you c... | {
"ground_truth": "{\"inputs\": [\"5\\n4 100\\n0 0 0 0\\n1 2\\n1\\n3 4\\n1 4 1\\n3 2\\n0 1 3\\n3 9\\n0 59049 810\\n\", \"3\\n5 2\\n1 2 4 8 17\\n2 3\\n1 2\\n4 3\\n10 4 13 12\\n\", \"1\\n1 10\\n10000000000000000\\n\", \"1\\n1 100\\n10000000000000000\\n\", \"1\\n2 2\\n2251799813685248 2251799813685248\\n\", \"1\\n2 2\\n... |
e87ebce1fda62ae07e626576fc6fb77b | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nLet's denote d(n) as the number of divisors of a positive integer n. You are given three integers a, b and c. Your task is to calculate the following sum:\n\n$\\sum_{i = 1}^{a} \\sum_{j = 1}^{b} \\sum_{k = 1}^{c} d(i \\cd... | {
"ground_truth": "{\"inputs\": [\"2 2 2\\n\", \"5 6 7\\n\", \"91 42 25\\n\", \"38 47 5\\n\", \"82 29 45\\n\", \"40 15 33\\n\", \"35 5 21\\n\", \"71 2 1\\n\", \"22 44 41\\n\", \"73 19 29\\n\", \"76 12 17\\n\", \"16 10 49\\n\", \"59 99 33\\n\", \"17 34 25\\n\", \"21 16 9\\n\", \"31 51 29\\n\", \"26 41 17\\n\", \"85 19... |
067471469f17a9aa8d13eeed1c3b39e3 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nBessie the cow and her best friend Elsie each received a sliding puzzle on Pi Day. Their puzzles consist of a 2 × 2 grid and three tiles labeled 'A', 'B', and 'C'. The three tiles sit on top of the grid, leaving one grid ... | {
"ground_truth": "{\"inputs\": [\"AB\\nXC\\nXB\\nAC\\n\", \"AB\\nXC\\nAC\\nBX\\n\", \"XC\\nBA\\nCB\\nAX\\n\", \"AB\\nXC\\nAX\\nCB\\n\", \"CB\\nAX\\nXA\\nBC\\n\", \"BC\\nXA\\nBA\\nXC\\n\", \"CA\\nXB\\nBA\\nCX\\n\", \"CA\\nXB\\nAC\\nBX\\n\", \"CB\\nAX\\nCX\\nAB\\n\", \"AX\\nCB\\nBC\\nXA\\n\", \"CA\\nXB\\nBA\\nXC\\n\",... |
aa3a06265d1ec682f2a2a11bbd90b1f6 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAlexander is learning how to convert numbers from the decimal system to any other, however, he doesn't know English letters, so he writes any number only as a decimal number, it means that instead of the letter A he will ... | {
"ground_truth": "{\"inputs\": [\"13\\n12\\n\", \"16\\n11311\\n\", \"20\\n999\\n\", \"17\\n2016\\n\", \"1000\\n1001\\n\", \"1000\\n1000\\n\", \"2\\n110111100000101101101011001110100111011001000000000000000000\\n\", \"500\\n29460456244280453288\\n\", \"1000000000\\n17289468142098080\\n\", \"123\\n7719\\n\", \"25\\n21... |
ffa902ffdb061112dea057ac5f2b24b3 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nConsider a billiard table of rectangular size $n \\times m$ with four pockets. Let's introduce a coordinate system with the origin at the lower left corner (see the picture). [Image] \n\nThere is one ball at the point $(... | {
"ground_truth": "{\"inputs\": [\"4 3 2 2 -1 1\\n\", \"4 4 2 0 1 1\\n\", \"10 10 10 1 -1 0\\n\", \"1000000000 1000000000 1 1000000000 0 1\\n\", \"2 1 1 0 -1 -1\\n\", \"4 2 1 2 1 1\\n\", \"5 3 4 3 1 -1\\n\", \"15 9 1 1 1 1\\n\", \"15 9 1 1 -1 -1\\n\", \"15 9 2 1 1 1\\n\", \"15 9 2 1 -1 1\\n\", \"1000000000 999999999 ... |
124b3b273d8af82fa5ee7beef3241d55 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nGerald bought two very rare paintings at the Sotheby's auction and he now wants to hang them on the wall. For that he bought a special board to attach it to the wall and place the paintings on the board. The board has sha... | {
"ground_truth": "{\"inputs\": [\"3 2\\n1 3\\n2 1\\n\", \"5 5\\n3 3\\n3 3\\n\", \"4 2\\n2 3\\n1 2\\n\", \"3 3\\n1 1\\n1 1\\n\", \"1000 1000\\n999 999\\n1 1000\\n\", \"7 7\\n5 5\\n2 4\\n\", \"3 3\\n2 2\\n2 2\\n\", \"2 9\\n5 1\\n3 2\\n\", \"9 9\\n3 8\\n5 2\\n\", \"10 10\\n10 5\\n4 3\\n\", \"10 6\\n10 1\\n5 7\\n\", \"6... |
bb74a4f045b34f4300913ce3287e8fda | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nMasha really loves algebra. On the last lesson, her strict teacher Dvastan gave she new exercise.\n\nYou are given geometric progression b defined by two integers b_1 and q. Remind that a geometric progression is a sequen... | {
"ground_truth": "{\"inputs\": [\"3 2 30 4\\n6 14 25 48\\n\", \"123 1 2143435 4\\n123 11 -5453 141245\\n\", \"123 1 2143435 4\\n54343 -13 6 124\\n\", \"3 2 25 2\\n379195692 -69874783\\n\", \"3 2 30 3\\n-691070108 -934106649 -220744807\\n\", \"3 3 104 17\\n9 -73896485 -290898562 5254410 409659728 -916522518 -43551612... |
44894d4f0d8bea867a46787dcdb09d65 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya has n burles. One bottle of Ber-Cola costs a burles and one Bars bar costs b burles. He can buy any non-negative integer number of bottles of Ber-Cola and any non-negative integer number of Bars bars.\n\nFind out if... | {
"ground_truth": "{\"inputs\": [\"7\\n2\\n3\\n\", \"100\\n25\\n10\\n\", \"15\\n4\\n8\\n\", \"9960594\\n2551\\n2557\\n\", \"10000000\\n1\\n1\\n\", \"9999999\\n9999\\n9999\\n\", \"9963629\\n2591\\n2593\\n\", \"1\\n7\\n8\\n\", \"9963630\\n2591\\n2593\\n\", \"7516066\\n1601\\n4793\\n\", \"6509546\\n1607\\n6221\\n\", \"2... |
cb9ca9b0998adfbf172fca1ca4bff59e | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nToday Tavas got his test result as an integer score and he wants to share it with his girlfriend, Nafas.\n\nHis phone operating system is Tavdroid, and its keyboard doesn't have any digits! He wants to share his score wit... | {
"ground_truth": "{\"inputs\": [\"6\\n\", \"99\\n\", \"20\\n\", \"10\\n\", \"15\\n\", \"27\\n\", \"40\\n\", \"63\\n\", \"0\\n\", \"1\\n\", \"2\\n\", \"8\\n\", \"9\\n\", \"11\\n\", \"12\\n\", \"13\\n\", \"14\\n\", \"16\\n\", \"17\\n\", \"18\\n\", \"19\\n\", \"21\\n\", \"29\\n\", \"30\\n\", \"32\\n\", \"38\\n\", \"43\... |
956f17990558136626902ad606527ba1 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nJATC and his friend Giraffe are currently in their room, solving some problems. Giraffe has written on the board an array $a_1$, $a_2$, ..., $a_n$ of integers, such that $1 \\le a_1 < a_2 < \\ldots < a_n \\le 10^3$, and t... | {
"ground_truth": "{\"inputs\": [\"6\\n1 3 4 5 6 9\\n\", \"3\\n998 999 1000\\n\", \"5\\n1 2 3 4 5\\n\", \"1\\n1\\n\", \"2\\n1 2\\n\", \"2\\n999 1000\\n\", \"9\\n1 4 5 6 7 100 101 102 103\\n\", \"100\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 ... |
e39444e867bebef3491d9db6f126e2bc | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nЕсть n-подъездный дом, в каждом подъезде по m этажей, и на каждом этаже каждого подъезда ровно k квартир. Таким образом, в доме всего n·m·k квартир. Они пронумерованы естественным образом от 1 до n·m·k, то есть первая ква... | {
"ground_truth": "{\"inputs\": [\"4 10 5\\n200 6\\n\", \"3 1 5\\n7 2\\n\", \"100 100 100\\n1 1000000\\n\", \"1000 1000 1000\\n1 1000000000\\n\", \"125 577 124\\n7716799 6501425\\n\", \"624 919 789\\n436620192 451753897\\n\", \"314 156 453\\n9938757 14172410\\n\", \"301 497 118\\n11874825 13582548\\n\", \"491 980 907... |
9e5507eb48f34301314c47ada48080b9 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nTop-model Izabella participates in the competition. She wants to impress judges and show her mathematical skills.\n\nHer problem is following: for given string, consisting of only 0 and 1, tell if it's possible to remove ... | {
"ground_truth": "{\"inputs\": [\"100010001\\n\", \"100\\n\", \"0000001000000\\n\", \"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\\n\", \"1111111111111111111111111111111111111111111111111111111111111111111111110111111111111111111111111111\\n\", \"0111111101111... |
4842455c2b679580ebfd9d3f760379df | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a string s consisting of |s| small english letters.\n\nIn one move you can replace any character of this string to the next character in alphabetical order (a will be replaced with b, s will be replaced with... | {
"ground_truth": "{\"inputs\": [\"aacceeggiikkmmooqqssuuwwyy\\n\", \"thereisnoanswer\\n\", \"jqcfvsaveaixhioaaeephbmsmfcgdyawscpyioybkgxlcrhaxs\\n\", \"rtdacjpsjjmjdhcoprjhaenlwuvpfqzurnrswngmpnkdnunaendlpbfuylqgxtndhmhqgbsknsy\\n\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\n\", \"abcdefghijklmnopqrstuvwxxx\\... |
c55aa2923e7a6a7fbdc60102c412190b | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWhile Grisha was celebrating New Year with Ded Moroz, Misha gifted Sasha a small rectangular pond of size n × m, divided into cells of size 1 × 1, inhabited by tiny evil fishes (no more than one fish per cell, otherwise t... | {
"ground_truth": "{\"inputs\": [\"3 3 2 3\\n\", \"12 17 9 40\\n\", \"1 1 1 1\\n\", \"10 10 5 100\\n\", \"7 1 1 4\\n\", \"1000 1000 59 100000\\n\", \"100000 100000 1000 100000\\n\", \"100000 100000 100000 100000\\n\", \"3 100000 2 88700\\n\", \"200 100000 55 100000\\n\", \"74 2 1 36\\n\", \"2 59 1 112\\n\", \"96 33 2... |
50f26d0549b33627661e063827a0bb09 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given two integers n and k. Find k-th smallest divisor of n, or report that it doesn't exist.\n\nDivisor of n is any such natural number, that n can be divided by it without remainder.\n\n\n-----Input-----\n\nThe ... | {
"ground_truth": "{\"inputs\": [\"4 2\\n\", \"5 3\\n\", \"12 5\\n\", \"1 1\\n\", \"866421317361600 26880\\n\", \"866421317361600 26881\\n\", \"1000000000000000 1000000000\\n\", \"1000000000000000 100\\n\", \"1 2\\n\", \"4 3\\n\", \"4 4\\n\", \"9 3\\n\", \"21 3\\n\", \"67280421310721 1\\n\", \"6 3\\n\", \"3 3\\n\", \... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.