hash string | ability string | data_source string | prompt list | reward_model dict |
|---|---|---|---|---|
bc9e91fbd72a9674b3f6a78b7d09ab87 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAbsent-minded Masha got set of n cubes for her birthday.\n\nAt each of 6 faces of each cube, there is exactly one digit from 0 to 9. Masha became interested what is the largest natural x such she can make using her new cu... | {
"ground_truth": "{\"inputs\": [\"3\\n0 1 2 3 4 5\\n6 7 8 9 0 1\\n2 3 4 5 6 7\\n\", \"3\\n0 1 3 5 6 8\\n1 2 4 5 7 8\\n2 3 4 6 7 9\\n\", \"3\\n0 1 2 3 4 5\\n0 1 2 3 4 5\\n0 1 2 3 4 5\\n\", \"3\\n1 2 3 7 8 9\\n9 8 7 1 2 3\\n7 9 2 3 1 8\\n\", \"1\\n5 2 2 5 6 7\\n\", \"1\\n7 6 5 8 9 0\\n\", \"1\\n2 5 9 6 7 9\\n\", \"1\\... |
e24e773466d5c149dac2abe44ab6a033 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nFor a given positive integer n denote its k-rounding as the minimum positive integer x, such that x ends with k or more zeros in base 10 and is divisible by n.\n\nFor example, 4-rounding of 375 is 375·80 = 30000. 30000 is... | {
"ground_truth": "{\"inputs\": [\"375 4\\n\", \"10000 1\\n\", \"38101 0\\n\", \"123456789 8\\n\", \"1 0\\n\", \"2 0\\n\", \"100 0\\n\", \"1000000000 0\\n\", \"160 2\\n\", \"3 0\\n\", \"10 0\\n\", \"1 1\\n\", \"2 1\\n\", \"3 1\\n\", \"4 1\\n\", \"5 1\\n\", \"6 1\\n\", \"7 1\\n\", \"8 1\\n\", \"9 1\\n\", \"10 1\\n\", ... |
59f4d9ca3fd665d2b153be508364f201 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given two matrices $A$ and $B$. Each matrix contains exactly $n$ rows and $m$ columns. Each element of $A$ is either $0$ or $1$; each element of $B$ is initially $0$.\n\nYou may perform some operations with matrix... | {
"ground_truth": "{\"inputs\": [\"3 3\\n1 1 1\\n1 1 1\\n0 1 1\\n\", \"3 3\\n1 0 1\\n1 0 1\\n0 0 0\\n\", \"3 2\\n0 0\\n0 0\\n0 0\\n\", \"2 50\\n0 1 1 1 1 1 1 1 0 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1\\n0 1 1 1 1 1 1 1 0 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 ... |
6e6c74adce9f4fcb6ea93b6af7346fa5 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and if they belong to dif... | {
"ground_truth": "{\"inputs\": [\"2 2 2\\n\", \"2 1 2\\n\", \"1 1 3\\n\", \"3 2 1\\n\", \"100 100 100\\n\", \"1 100 100\\n\", \"100 1 100\\n\", \"100 100 1\\n\", \"1 100 99\\n\", \"99 1 100\\n\", \"100 99 1\\n\", \"100 1 99\\n\", \"1 99 100\\n\", \"99 100 1\\n\", \"1 1 1\\n\", \"100 100 2\\n\", \"100 2 100\\n\", \"2... |
e6c7947aa12485aec3f4ce84cb49ec1c | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nToday an outstanding event is going to happen in the forest — hedgehog Filya will come to his old fried Sonya!\n\nSonya is an owl and she sleeps during the day and stay awake from minute l_1 to minute r_1 inclusive. Also,... | {
"ground_truth": "{\"inputs\": [\"1 10 9 20 1\\n\", \"1 100 50 200 75\\n\", \"6 6 5 8 9\\n\", \"1 1000000000 1 1000000000 1\\n\", \"5 100 8 8 8\\n\", \"1 1000000000000000000 2 99999999999999999 1000000000\\n\", \"1 1 1 1 1\\n\", \"1 2 3 4 5\\n\", \"1 1000000000 2 999999999 3141592\\n\", \"24648817341102 411651140642... |
1793ef4c0b349ffc0f67e976e3d6aad5 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe process of mammoth's genome decoding in Berland comes to its end!\n\nOne of the few remaining tasks is to restore unrecognized nucleotides in a found chain s. Each nucleotide is coded with a capital letter of English ... | {
"ground_truth": "{\"inputs\": [\"8\\nAG?C??CT\\n\", \"4\\nAGCT\\n\", \"6\\n????G?\\n\", \"4\\nAA??\\n\", \"4\\n????\\n\", \"252\\n???????GCG??T??TT?????T?C???C?CCG???GA???????AC??A???AAC?C?CC??CCC??A??TA?CCC??T???C??CA???CA??G????C?C?C????C??C??A???C?T????C??ACGC??CC?A?????A??CC?C??C?CCG?C??C??A??CG?A?????A?CT???CC... |
cc4e73e1153ba9777cd7a4f067d94395 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIlya is an experienced player in tic-tac-toe on the 4 × 4 field. He always starts and plays with Xs. He played a lot of games today with his friend Arseny. The friends became tired and didn't finish the last game. It was ... | {
"ground_truth": "{\"inputs\": [\"xx..\\n.oo.\\nx...\\noox.\\n\", \"x.ox\\nox..\\nx.o.\\noo.x\\n\", \"x..x\\n..oo\\no...\\nx.xo\\n\", \"o.x.\\no...\\n.x..\\nooxx\\n\", \".xox\\no.x.\\nx.o.\\n..o.\\n\", \"o.oo\\n.x.o\\nx.x.\\n.x..\\n\", \".xx.\\n.xoo\\n.oox\\n....\\n\", \"xxox\\no.x.\\nx.oo\\nxo.o\\n\", \".xox\\n.x..... |
648e227a257aae4ef69155e1280b32dc | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya has an array a consisting of positive integer numbers. Vasya wants to divide this array into two non-empty consecutive parts (the prefix and the suffix) so that the sum of all elements in the first part equals to th... | {
"ground_truth": "{\"inputs\": [\"3\\n1 3 2\\n\", \"5\\n1 2 3 4 5\\n\", \"5\\n2 2 3 4 5\\n\", \"5\\n72 32 17 46 82\\n\", \"6\\n26 10 70 11 69 57\\n\", \"7\\n4 7 10 7 5 5 1\\n\", \"8\\n9 5 5 10 4 9 5 8\\n\", \"10\\n9 6 8 5 5 2 8 9 2 2\\n\", \"15\\n4 8 10 3 1 4 5 9 3 2 1 7 7 3 8\\n\", \"20\\n71 83 54 6 10 64 91 98 94 ... |
8fe845a69e4c1a1ffa24d9a2e42a16cb | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA few years ago, Hitagi encountered a giant crab, who stole the whole of her body weight. Ever since, she tried to avoid contact with others, for fear that this secret might be noticed.\n\nTo get rid of the oddity and rec... | {
"ground_truth": "{\"inputs\": [\"4 2\\n11 0 0 14\\n5 4\\n\", \"6 1\\n2 3 0 8 9 10\\n5\\n\", \"4 1\\n8 94 0 4\\n89\\n\", \"7 7\\n0 0 0 0 0 0 0\\n1 2 3 4 5 6 7\\n\", \"40 1\\n23 26 27 28 31 35 38 40 43 50 52 53 56 57 59 61 65 73 75 76 79 0 82 84 85 86 88 93 99 101 103 104 105 106 110 111 112 117 119 120\\n80\\n\", \"... |
4d601ee07c7b95a0993a428916a4f730 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe Duck song\n\nFor simplicity, we'll assume that there are only three types of grapes: green grapes, purple grapes and black grapes.\n\nAndrew, Dmitry and Michal are all grapes' lovers, however their preferences of grap... | {
"ground_truth": "{\"inputs\": [\"1 6 2\\n4 3 3\\n\", \"5 1 1\\n4 3 2\\n\", \"1 1 100000\\n4 2 99995\\n\", \"1 2 3\\n3 2 1\\n\", \"1 8 4\\n3 1 9\\n\", \"6 1 2\\n4 9 6\\n\", \"100000 100000 100000\\n100000 100000 100000\\n\", \"3 2 1\\n1 2 3\\n\", \"99999 99998 99997\\n99997 99998 99999\\n\", \"1 7 9\\n4 5 7\\n\", \"... |
d7f31c280073b3085b648633389086a3 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWhile swimming at the beach, Mike has accidentally dropped his cellphone into the water. There was no worry as he bought a cheap replacement phone with an old-fashioned keyboard. The keyboard has only ten digital equal-si... | {
"ground_truth": "{\"inputs\": [\"3\\n586\\n\", \"2\\n09\\n\", \"9\\n123456789\\n\", \"3\\n911\\n\", \"3\\n089\\n\", \"3\\n159\\n\", \"9\\n000000000\\n\", \"4\\n0874\\n\", \"6\\n235689\\n\", \"2\\n10\\n\", \"3\\n358\\n\", \"6\\n123456\\n\", \"1\\n0\\n\", \"4\\n0068\\n\", \"6\\n021149\\n\", \"5\\n04918\\n\", \"2\\n05... |
2b35e0d0004bd4836f87b1215980d065 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nSummer holidays! Someone is going on trips, someone is visiting grandparents, but someone is trying to get a part-time job. This summer Noora decided that she wants to earn some money, and took a job in a shop as an assis... | {
"ground_truth": "{\"inputs\": [\"4 2\\n2 1\\n3 5\\n2 3\\n1 5\\n\", \"4 1\\n0 2\\n0 3\\n3 5\\n0 6\\n\", \"1 1\\n5 8\\n\", \"2 1\\n8 12\\n6 11\\n\", \"2 1\\n6 7\\n5 7\\n\", \"2 1\\n5 7\\n6 7\\n\", \"2 1\\n7 8\\n3 6\\n\", \"2 1\\n9 10\\n5 8\\n\", \"2 1\\n3 6\\n7 8\\n\", \"1 0\\n10 20\\n\", \"2 1\\n99 100\\n3 6\\n\", \... |
60d1808b6050fc371506b4ce95dc38ba | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIt is a balmy spring afternoon, and Farmer John's n cows are ruminating about link-cut cacti in their stalls. The cows, labeled 1 through n, are arranged so that the i-th cow occupies the i-th stall from the left. However... | {
"ground_truth": "{\"inputs\": [\"5 2\\n\", \"1 10\\n\", \"100000 2\\n\", \"1 1\\n\", \"8 3\\n\", \"7 1\\n\", \"100000 40000\\n\", \"1 1000\\n\", \"100 45\\n\", \"9 2\\n\", \"456 78\\n\", \"100000 50000\\n\", \"100000 50001\\n\", \"100000 50002\\n\", \"100000 50003\\n\", \"100000 49998\\n\", \"100000 49997\\n\", \"9... |
b8aa03eb3e84e6f75ff177a3be70787a | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIvan is collecting coins. There are only $N$ different collectible coins, Ivan has $K$ of them. He will be celebrating his birthday soon, so all his $M$ freinds decided to gift him coins. They all agreed to three terms: ... | {
"ground_truth": "{\"inputs\": [\"20 15 2 3\\n\", \"10 11 2 4\\n\", \"2 1 1 1\\n\", \"10 2 9 7\\n\", \"530897800469409942 582203276934671957 137373076313041391 377446491430894140\\n\", \"1000000000000000000 1 1 1000000000000000000\\n\", \"48295947839584738 12 49503958 47108947578469711\\n\", \"100 20 98 2\\n\", \"10... |
99792fdc5dfbd8ef7d6f8f14a035df9a | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nPolycarp has a checkered sheet of paper of size n × m. Polycarp painted some of cells with black, the others remained white. Inspired by Malevich's \"Black Square\", Polycarp wants to paint minimum possible number of whit... | {
"ground_truth": "{\"inputs\": [\"5 4\\nWWWW\\nWWWB\\nWWWB\\nWWBB\\nWWWW\\n\", \"1 2\\nBB\\n\", \"3 3\\nWWW\\nWWW\\nWWW\\n\", \"100 1\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nB\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW... |
934bd3611c16f47df53dbfa21be2637c | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThere is a beautiful garden of stones in Innopolis.\n\nIts most beautiful place is the $n$ piles with stones numbered from $1$ to $n$.\n\nEJOI participants have visited this place twice. \n\nWhen they first visited it, th... | {
"ground_truth": "{\"inputs\": [\"5\\n1 2 3 4 5\\n2 1 4 3 5\\n\", \"5\\n1 1 1 1 1\\n1 0 1 0 1\\n\", \"3\\n2 3 9\\n1 7 9\\n\", \"40\\n361 372 139 808 561 460 421 961 727 719 130 235 320 470 432 759 317 886 624 666 917 133 736 710 462 424 541 118 228 216 612 339 800 557 291 128 801 9 0 318\\n364 689 60 773 340 571 627... |
3c44f5e4f64556fa35719ec974617e34 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAlice got many presents these days. So she decided to pack them into boxes and send them to her friends.\n\nThere are $n$ kinds of presents. Presents of one kind are identical (i.e. there is no way to distinguish two gift... | {
"ground_truth": "{\"inputs\": [\"1 3\\n\", \"2 2\\n\", \"1000000000 1000000000\\n\", \"489132389 96\\n\", \"462817723 208\\n\", \"10 415749054\\n\", \"185182737 683516583\\n\", \"1 1\\n\", \"67 445057511\\n\", \"53 710974288\\n\", \"766313215 146\\n\", \"483378560 249\\n\", \"294440070 297\\n\", \"22 346212760\\n\"... |
07b53ba04f66cea80704523a50b1c237 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nImp is watching a documentary about cave painting. [Image] \n\nSome numbers, carved in chaotic order, immediately attracted his attention. Imp rapidly proposed a guess that they are the remainders of division of a number ... | {
"ground_truth": "{\"inputs\": [\"4 4\\n\", \"5 3\\n\", \"1 1\\n\", \"744 18\\n\", \"47879 10\\n\", \"1000000000000000000 1000000000000000000\\n\", \"657180569218773599 42\\n\", \"442762254977842799 30\\n\", \"474158606260730555 1\\n\", \"807873101233533988 39\\n\", \"423 7\\n\", \"264306177888923090 5\\n\", \"99885... |
0f3d497ad18d45b658285a2e9ac50f2e | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe mayor of the Central Town wants to modernize Central Street, represented in this problem by the $(Ox)$ axis.\n\nOn this street, there are $n$ antennas, numbered from $1$ to $n$. The $i$-th antenna lies on the position... | {
"ground_truth": "{\"inputs\": [\"3 595\\n43 2\\n300 4\\n554 10\\n\", \"1 1\\n1 1\\n\", \"2 50\\n20 0\\n3 1\\n\", \"5 240\\n13 0\\n50 25\\n60 5\\n155 70\\n165 70\\n\", \"1 100000\\n99998 0\\n\", \"1 100000\\n100000 0\\n\", \"1 100000\\n1 0\\n\", \"2 100000\\n1 0\\n100000 0\\n\", \"7 300\\n50 8\\n49 6\\n246 1\\n123 3... |
5551f07ba36ccd8b269d16b1c04924b9 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nSomeone gave Alyona an array containing n positive integers a_1, a_2, ..., a_{n}. In one operation, Alyona can choose any element of the array and decrease it, i.e. replace with any positive integer that is smaller than t... | {
"ground_truth": "{\"inputs\": [\"5\\n1 3 3 3 6\\n\", \"2\\n2 1\\n\", \"1\\n1\\n\", \"1\\n1000000000\\n\", \"1\\n2\\n\", \"2\\n1 1\\n\", \"2\\n1 3\\n\", \"2\\n2 2\\n\", \"2\\n2 3\\n\", \"2\\n3 3\\n\", \"3\\n1 1 1\\n\", \"3\\n2 1 1\\n\", \"3\\n3 1 1\\n\", \"3\\n1 1 4\\n\", \"3\\n2 1 2\\n\", \"3\\n3 2 1\\n\", \"3\\n2 ... |
6a25600e5c3a1ea001100cb543840502 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nRecently Vasya found a golden ticket — a sequence which consists of $n$ digits $a_1a_2\\dots a_n$. Vasya considers a ticket to be lucky if it can be divided into two or more non-intersecting segments with equal sums. For ... | {
"ground_truth": "{\"inputs\": [\"5\\n73452\\n\", \"4\\n1248\\n\", \"2\\n00\\n\", \"3\\n555\\n\", \"8\\n00020200\\n\", \"4\\n7435\\n\", \"99\\n999999999999999999999999999999999999999999999918888888888888888888888888888888888888888888888888887\\n\", \"5\\n11980\\n\", \"4\\n2680\\n\", \"15\\n333703919182090\\n\", \"8\... |
7ce7dbca6a4dbf61a228af6cede40cec | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThose days, many boys use beautiful girls' photos as avatars in forums. So it is pretty hard to tell the gender of a user at the first glance. Last year, our hero went to a forum and had a nice chat with a beauty (he thou... | {
"ground_truth": "{\"inputs\": [\"wjmzbmr\\n\", \"xiaodao\\n\", \"sevenkplus\\n\", \"pezu\\n\", \"wnemlgppy\\n\", \"zcinitufxoldnokacdvtmdohsfdjepyfioyvclhmujiqwvmudbfjzxjfqqxjmoiyxrfsbvseawwoyynn\\n\", \"qsxxuoynwtebujwpxwpajitiwxaxwgbcylxneqiebzfphugwkftpaikixmumkhfbjiswmvzbtiyifbx\\n\", \"qwbdfzfylckctudyjlyrtmvb... |
d94b358aacf6bfa532d1bb6779581e19 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThis morning, Roman woke up and opened the browser with $n$ opened tabs numbered from $1$ to $n$. There are two kinds of tabs: those with the information required for the test and those with social network sites. Roman de... | {
"ground_truth": "{\"inputs\": [\"4 2\\n1 1 -1 1\\n\", \"14 3\\n-1 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 -1 1\\n\", \"4 2\\n1 1 1 -1\\n\", \"4 2\\n-1 1 -1 -1\\n\", \"3 2\\n1 1 -1\\n\", \"20 2\\n-1 1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 1\\n\", \"20 19\\n-1 -1 1 1 -1 1 1 -1 1 1 -1 1 -1 1 1 1 -1 1 -1 1\\n\", \"20 7\\n... |
7884fae1faa9c6d8b2b5fb8a8ecefc06 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe circle line of the Roflanpolis subway has $n$ stations.\n\nThere are two parallel routes in the subway. The first one visits stations in order $1 \\to 2 \\to \\ldots \\to n \\to 1 \\to 2 \\to \\ldots$ (so the next sto... | {
"ground_truth": "{\"inputs\": [\"5 1 4 3 2\\n\", \"10 2 1 9 10\\n\", \"4 3 4 2 1\\n\", \"100 2 97 84 89\\n\", \"100 43 55 42 15\\n\", \"47 15 45 28 38\\n\", \"17 14 2 12 10\\n\", \"82 9 11 15 79\\n\", \"53 10 34 1 48\\n\", \"55 55 27 45 50\\n\", \"33 15 6 1 3\\n\", \"45 26 22 39 10\\n\", \"5 3 2 4 1\\n\", \"20 19 1... |
a4baccdfdab1dd92d4fdd3c4918cd606 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nUnlucky year in Berland is such a year that its number n can be represented as n = x^{a} + y^{b}, where a and b are non-negative integer numbers. \n\nFor example, if x = 2 and y = 3 then the years 4 and 17 are unlucky (4 ... | {
"ground_truth": "{\"inputs\": [\"2 3 1 10\\n\", \"3 5 10 22\\n\", \"2 3 3 5\\n\", \"2 2 1 10\\n\", \"2 2 1 1000000\\n\", \"2 2 1 1000000000000000000\\n\", \"2 3 1 1000000\\n\", \"2 3 1 1000000000000000000\\n\", \"12345 54321 1 1000000\\n\", \"54321 12345 1 1000000000000000000\\n\", \"2 3 100000000 1000000000000\\n\... |
7d2d0bcaf60fe19b7f98ea36c742692c | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nBeroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.\n\nBeroffice works only with small English letters (... | {
"ground_truth": "{\"inputs\": [\"hellno\\n\", \"abacaba\\n\", \"asdfasdf\\n\", \"ooo\\n\", \"moyaoborona\\n\", \"jxegxxx\\n\", \"orfyaenanabckumulsboloyhljhacdgcmnooxvxrtuhcslxgslfpnfnyejbxqisxjyoyvcvuddboxkqgbogkfz\\n\", \"zxdgmhsjotvajkwshjpvzcuwehpeyfhakhtlvuoftkgdmvpafmxcliqvrztloocziqdkexhzcbdgxaoyvte\\n\", \"... |
963560fe0607369a5e223a80f065ecf8 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAnton is playing a very interesting computer game, but now he is stuck at one of the levels. To pass to the next level he has to prepare n potions.\n\nAnton has a special kettle, that can prepare one potions in x seconds.... | {
"ground_truth": "{\"inputs\": [\"20 3 2\\n10 99\\n2 4 3\\n20 10 40\\n4 15\\n10 80\\n\", \"20 3 2\\n10 99\\n2 4 3\\n200 100 400\\n4 15\\n100 800\\n\", \"10 3 3\\n10 33\\n1 7 6\\n17 25 68\\n2 9 10\\n78 89 125\\n\", \"94 1 1\\n26 324\\n7\\n236\\n77\\n5\\n\", \"3 4 5\\n5 9\\n1 2 1 1\\n3 5 4 1\\n1 1 1 1 3\\n1 2 3 4 5\\n... |
d9a6f1042841c1d9c08a6aaa76702b76 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou might have heard about the next game in Lara Croft series coming out this year. You also might have watched its trailer. Though you definitely missed the main idea about its plot, so let me lift the veil of secrecy.\n... | {
"ground_truth": "{\"inputs\": [\"4 3 0\\n\", \"4 3 11\\n\", \"4 3 7\\n\", \"1000000000 2 1999999999\\n\", \"1000000000 1000000000 999999999999999999\\n\", \"1000000000 1000000000 999999999\\n\", \"1000000000 1000000000 2000000500\\n\", \"2 2 2\\n\", \"28 3 1\\n\", \"2 3 3\\n\", \"4 6 8\\n\", \"6 6 18\\n\", \"4 3 8\... |
9f3a2ec57fdc553c4995b77cd2a05f7e | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nBerland annual chess tournament is coming!\n\nOrganizers have gathered 2·n chess players who should be divided into two teams with n people each. The first team is sponsored by BerOil and the second team is sponsored by B... | {
"ground_truth": "{\"inputs\": [\"2\\n1 3 2 4\\n\", \"1\\n3 3\\n\", \"5\\n1 1 1 1 2 2 3 3 3 3\\n\", \"5\\n1 1 1 1 1 2 2 2 2 2\\n\", \"10\\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000\\n\", \"1\\n2 3\\n\", \"100\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
684d09e3ad2981540868cd5dd93c2393 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given an array of n elements, you must make it a co-prime array in as few moves as possible.\n\nIn each move you can insert any positive integral number you want not greater than 10^9 in any place in the array.\n\... | {
"ground_truth": "{\"inputs\": [\"3\\n2 7 28\\n\", \"1\\n1\\n\", \"1\\n548\\n\", \"1\\n963837006\\n\", \"10\\n1 1 1 1 1 1 1 1 1 1\\n\", \"10\\n26 723 970 13 422 968 875 329 234 983\\n\", \"10\\n319645572 758298525 812547177 459359946 355467212 304450522 807957797 916787906 239781206 242840396\\n\", \"100\\n1 1 1 1 2... |
8118e0b215cfc2629e2e7a291afe5eb3 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have a sequence of N integers: A_1, A_2, \\cdots, A_N.\nYou can perform the following operation between 0 and K times (inclusive):\n - Choose two integers i and j such that i \\neq j, each between 1 and N (inclusive). ... | {
"ground_truth": "{\"inputs\": [\"2 3\\n8 20\\n\", \"2 10\\n3 5\\n\", \"4 5\\n10 1 2 22\\n\", \"8 7\\n1 7 5 6 8 2 6 5\\n\", \"2 1\\n1 1\\n\", \"500 1000000000\\n1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000... |
e374452925f93c13d5de98f5b3108d84 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nLuba thinks about watering her garden. The garden can be represented as a segment of length k. Luba has got n buckets, the i-th bucket allows her to water some continuous subsegment of garden of length exactly a_{i} each ... | {
"ground_truth": "{\"inputs\": [\"3 6\\n2 3 5\\n\", \"6 7\\n1 2 3 4 5 6\\n\", \"5 97\\n1 10 50 97 2\\n\", \"5 97\\n1 10 50 100 2\\n\", \"100 100\\n2 46 24 18 86 90 31 38 84 49 58 28 15 80 14 24 87 56 62 87 41 87 55 71 87 32 41 56 91 32 24 75 43 42 35 30 72 53 31 26 54 61 87 85 36 75 44 31 7 38 77 57 61 54 70 77 45 9... |
7b99d340b7183c0da8a074515dd4d9cc | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nOn the way to Rio de Janeiro Ostap kills time playing with a grasshopper he took with him in a special box. Ostap builds a line of length n such that some cells of this line are empty and some contain obstacles. Then, he ... | {
"ground_truth": "{\"inputs\": [\"5 2\\n#G#T#\\n\", \"6 1\\nT....G\\n\", \"7 3\\nT..#..G\\n\", \"6 2\\n..GT..\\n\", \"2 1\\nGT\\n\", \"100 5\\nG####.####.####.####.####.####.####.####.####.####.####.####.####.####.####.####.####.####.####T####\\n\", \"100 5\\nG####.####.####.####.####.####.####.####.####.####.####.#... |
8de742a92f5a537d13703a3390fb0ac3 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasiliy spent his vacation in a sanatorium, came back and found that he completely forgot details of his vacation! \n\nEvery day there was a breakfast, a dinner and a supper in a dining room of the sanatorium (of course, ... | {
"ground_truth": "{\"inputs\": [\"3 2 1\\n\", \"1 0 0\\n\", \"1 1 1\\n\", \"1000000000000000000 0 1000000000000000000\\n\", \"1000 0 0\\n\", \"0 1 0\\n\", \"0 0 1\\n\", \"1 1 0\\n\", \"0 1 1\\n\", \"1000000000000000000 999999999999999999 999999999999999999\\n\", \"1000000000000000000 1000000000000000000 999999999999... |
e8c92acec5f421a6175d74d098d809ef | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given two strings a and b. You have to remove the minimum possible number of consecutive (standing one after another) characters from string b in such a way that it becomes a subsequence of string a. It can happen... | {
"ground_truth": "{\"inputs\": [\"hi\\nbob\\n\", \"abca\\naccepted\\n\", \"abacaba\\nabcdcba\\n\", \"lo\\neuhaqdhhzlnkmqnakgwzuhurqlpmdm\\n\", \"aaeojkdyuilpdvyewjfrftkpcobhcumwlaoiocbfdtvjkhgda\\nmlmarpivirqbxcyhyerjoxlslyfzftrylpjyouypvk\\n\", \"npnkmawey\\nareakefvowledfriyjejqnnaeqheoh\\n\", \"fdtffutxkujflswydd... |
153d909bdf86dfae120b9903b82971bc | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya has a pile, that consists of some number of stones. $n$ times he either took one stone from the pile or added one stone to the pile. The pile was non-empty before each operation of taking one stone from the pile.\n\... | {
"ground_truth": "{\"inputs\": [\"3\\n---\\n\", \"4\\n++++\\n\", \"2\\n-+\\n\", \"5\\n++-++\\n\", \"1\\n+\\n\", \"100\\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\\n\", \"100\\n----------------------------------------------------------------------------------... |
965b61a1ef9c597a5d1576a256ef97b0 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nKolya Gerasimov loves kefir very much. He lives in year 1984 and knows all the details of buying this delicious drink. One day, as you probably know, he found himself in year 2084, and buying kefir there is much more comp... | {
"ground_truth": "{\"inputs\": [\"10\\n11\\n9\\n8\\n\", \"10\\n5\\n6\\n1\\n\", \"2\\n2\\n2\\n1\\n\", \"10\\n3\\n3\\n1\\n\", \"10\\n1\\n2\\n1\\n\", \"10\\n2\\n3\\n1\\n\", \"9\\n2\\n4\\n1\\n\", \"9\\n2\\n2\\n1\\n\", \"9\\n10\\n10\\n1\\n\", \"10\\n2\\n2\\n1\\n\", \"1000000000000000000\\n2\\n10\\n9\\n\", \"5010000000000... |
bf9bef86ab857efcdea72d55b36221c2 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nTwo bored soldiers are playing card war. Their card deck consists of exactly n cards, numbered from 1 to n, all values are different. They divide cards between them in some manner, it's possible that they have different n... | {
"ground_truth": "{\"inputs\": [\"4\\n2 1 3\\n2 4 2\\n\", \"3\\n1 2\\n2 1 3\\n\", \"5\\n4 5 3 2 4\\n1 1\\n\", \"6\\n2 6 5\\n4 1 2 3 4\\n\", \"7\\n6 6 5 2 7 4 1\\n1 3\\n\", \"8\\n7 2 3 1 5 6 4 8\\n1 7\\n\", \"9\\n2 3 6\\n7 9 7 8 5 2 1 4\\n\", \"10\\n3 7 10 8\\n7 4 6 9 2 5 1 3\\n\", \"3\\n2 2 1\\n1 3\\n\", \"3\\n2 3 2... |
310e02e1a5fcf5994552f9a0c2a9276c | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou have probably registered on Internet sites many times. And each time you should enter your invented password. Usually the registration form automatically checks the password's crypt resistance. If the user's password ... | {
"ground_truth": "{\"inputs\": [\"abacaba\\n\", \"X12345\\n\", \"CONTEST_is_STARTED!!11\\n\", \"1zA__\\n\", \"1zA_\\n\", \"zA___\\n\", \"1A___\\n\", \"z1___\\n\", \"0\\n\", \"_\\n\", \"a\\n\", \"D\\n\", \"_\\n\", \"?\\n\", \"?\\n\", \"._,.!.,...?_,!.\\n\", \"!_?_,?,?.,.,_!!!.!,.__,?!!,_!,?_,!??,?!..._!?_,?_!,?_.,._,... |
fd4f06688a922f6e7c10eb1e9fbbad18 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIn Berland each high school student is characterized by academic performance — integer value between 1 and 5.\n\nIn high school 0xFF there are two groups of pupils: the group A and the group B. Each group consists of exac... | {
"ground_truth": "{\"inputs\": [\"4\\n5 4 4 4\\n5 5 4 5\\n\", \"6\\n1 1 1 1 1 1\\n5 5 5 5 5 5\\n\", \"1\\n5\\n3\\n\", \"9\\n3 2 5 5 2 3 3 3 2\\n4 1 4 1 1 2 4 4 1\\n\", \"1\\n1\\n2\\n\", \"1\\n1\\n1\\n\", \"8\\n1 1 2 2 3 3 4 4\\n4 4 5 5 1 1 1 1\\n\", \"10\\n1 1 1 1 1 1 1 1 1 1\\n2 2 2 2 2 2 2 2 2 2\\n\", \"100\\n5 5 ... |
f0283e527670a60929284942da615439 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nImagine a city with n horizontal streets crossing m vertical streets, forming an (n - 1) × (m - 1) grid. In order to increase the traffic flow, mayor of the city has decided to make each street one way. This means in each... | {
"ground_truth": "{\"inputs\": [\"3 3\\n><>\\nv^v\\n\", \"4 6\\n<><>\\nv^v^v^\\n\", \"2 2\\n<>\\nv^\\n\", \"2 2\\n>>\\n^v\\n\", \"3 3\\n>><\\n^^v\\n\", \"3 4\\n>><\\n^v^v\\n\", \"3 8\\n>><\\nv^^^^^^^\\n\", \"7 2\\n<><<<<>\\n^^\\n\", \"4 5\\n><<<\\n^^^^v\\n\", \"2 20\\n><\\n^v^^v^^v^^^v^vv^vv^^\\n\", \"2 20\\n<>\\nv^... |
0b5bdd10a77eef454de906e56945f988 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou have two variables a and b. Consider the following sequence of actions performed with these variables: If a = 0 or b = 0, end the process. Otherwise, go to step 2; If a ≥ 2·b, then set the value of a to a - 2·b, and r... | {
"ground_truth": "{\"inputs\": [\"12 5\\n\", \"31 12\\n\", \"1000000000000000000 7\\n\", \"31960284556200 8515664064180\\n\", \"1000000000000000000 1000000000000000000\\n\", \"1 1000\\n\", \"1 1000000\\n\", \"1 1000000000000000\\n\", \"1 99999999999999999\\n\", \"1 4\\n\", \"1000000000000001 500000000000000\\n\", \"... |
1dcbd0ba2da019c75e3aa9131eee6ac6 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nFind the number of k-divisible numbers on the segment [a, b]. In other words you need to find the number of such integer values x that a ≤ x ≤ b and x is divisible by k.\n\n\n-----Input-----\n\nThe only line contains thre... | {
"ground_truth": "{\"inputs\": [\"1 1 10\\n\", \"2 -4 4\\n\", \"1 1 1\\n\", \"1 0 0\\n\", \"1 0 1\\n\", \"1 10181 10182\\n\", \"1 10182 10183\\n\", \"1 -191 1011\\n\", \"2 0 0\\n\", \"2 0 1\\n\", \"2 1 2\\n\", \"2 2 3\\n\", \"2 -1 0\\n\", \"2 -1 1\\n\", \"2 -7 -6\\n\", \"2 -7 -5\\n\", \"2 -6 -6\\n\", \"2 -6 -4\\n\",... |
c98cbaa64177195539003c5742d92c8d | 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\... |
3b7de4bd4f6788a8e55b71d78ef285db | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA telephone number is a sequence of exactly $11$ digits such that its first digit is 8.\n\nVasya and Petya are playing a game. Initially they have a string $s$ of length $n$ ($n$ is odd) consisting of digits. Vasya makes ... | {
"ground_truth": "{\"inputs\": [\"13\\n8380011223344\\n\", \"15\\n807345619350641\\n\", \"19\\n8181818181111111111\\n\", \"29\\n88811188118181818118111111111\\n\", \"15\\n980848088815548\\n\", \"13\\n9999999998888\\n\", \"13\\n0000008888888\\n\", \"13\\n2480011223348\\n\", \"17\\n87879887989788999\\n\", \"21\\n12345... |
d7a794d4b0390b4696e11f43bdc610eb | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAndrey thinks he is truly a successful developer, but in reality he didn't know about the binary search algorithm until recently. After reading some literature Andrey understood that this algorithm allows to quickly find ... | {
"ground_truth": "{\"inputs\": [\"4 1 2\\n\", \"123 42 24\\n\", \"1 1 0\\n\", \"1000 501 501\\n\", \"1000 999 799\\n\", \"2 1 1\\n\", \"2 2 0\\n\", \"3 1 2\\n\", \"3 2 2\\n\", \"3 3 1\\n\", \"4 2 0\\n\", \"4 3 2\\n\", \"4 4 3\\n\", \"7 1 1\\n\", \"7 7 6\\n\", \"7 2 4\\n\", \"7 4 4\\n\", \"8 4 1\\n\", \"8 1 5\\n\", \... |
b2ae802777bd7a9a2053fb06adbd194d | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya started working in a machine vision company of IT City. Vasya's team creates software and hardware for identification of people by their face.\n\nOne of the project's know-how is a camera rotating around its optical... | {
"ground_truth": "{\"inputs\": [\"60\\n\", \"-60\\n\", \"0\\n\", \"44\\n\", \"45\\n\", \"46\\n\", \"134\\n\", \"135\\n\", \"136\\n\", \"224\\n\", \"225\\n\", \"226\\n\", \"227\\n\", \"313\\n\", \"314\\n\", \"315\\n\", \"316\\n\", \"358\\n\", \"359\\n\", \"360\\n\", \"361\\n\", \"999999999999999340\\n\", \"9999999999... |
da193c1ee4679727c6dbc2af8edbf215 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nCarl is a beginner magician. He has a blue, b violet and c orange magic spheres. In one move he can transform two spheres of the same color into one sphere of any other color. To make a spell that has never been seen befo... | {
"ground_truth": "{\"inputs\": [\"4 4 0\\n2 1 2\\n\", \"5 6 1\\n2 7 2\\n\", \"3 3 3\\n2 2 2\\n\", \"0 0 0\\n0 0 0\\n\", \"0 0 0\\n0 0 1\\n\", \"0 1 0\\n0 0 0\\n\", \"1 0 0\\n1 0 0\\n\", \"2 2 1\\n1 1 2\\n\", \"1 3 1\\n2 1 1\\n\", \"1000000 1000000 1000000\\n1000000 1000000 1000000\\n\", \"1000000 500000 500000\\n0 7... |
d1f05996a5b2129fcb462ccf732275f5 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAmr doesn't like Maths as he finds it really boring, so he usually sleeps in Maths lectures. But one day the teacher suspected that Amr is sleeping and asked him a question to make sure he wasn't.\n\nFirst he gave Amr two... | {
"ground_truth": "{\"inputs\": [\"1 2 1000\\n\", \"2 2 1000\\n\", \"5 3 1103\\n\", \"2 17 10000\\n\", \"3 9 10000\\n\", \"6 64 941761822\\n\", \"183 3 46847167\\n\", \"472 44 364550669\\n\", \"510 76 811693420\\n\", \"783 30 602209107\\n\", \"863 47 840397713\\n\", \"422 22 411212542\\n\", \"370 9 385481464\\n\", \"... |
e25683f85d8188b3d43f107487af628c | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nStudents in a class are making towers of blocks. Each student makes a (non-zero) tower by stacking pieces lengthwise on top of each other. n of the students use pieces made of two blocks and m of the students use pieces m... | {
"ground_truth": "{\"inputs\": [\"1 3\\n\", \"3 2\\n\", \"5 0\\n\", \"4 2\\n\", \"0 1000000\\n\", \"1000000 1\\n\", \"1083 724\\n\", \"1184 868\\n\", \"1285 877\\n\", \"820189 548173\\n\", \"968867 651952\\n\", \"817544 553980\\n\", \"813242 543613\\n\", \"961920 647392\\n\", \"825496 807050\\n\", \"974174 827926\\n... |
db84df2b05b2dcfe905a4d7fe48868d0 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nPetya and Vasya decided to play a game. They have n cards (n is an even number). A single integer is written on each card.\n\nBefore the game Petya will choose an integer and after that Vasya will choose another integer (... | {
"ground_truth": "{\"inputs\": [\"4\\n11\\n27\\n27\\n11\\n\", \"2\\n6\\n6\\n\", \"6\\n10\\n20\\n30\\n20\\n10\\n20\\n\", \"6\\n1\\n1\\n2\\n2\\n3\\n3\\n\", \"2\\n1\\n100\\n\", \"2\\n1\\n1\\n\", \"2\\n100\\n100\\n\", \"14\\n43\\n43\\n43\\n43\\n43\\n43\\n43\\n43\\n43\\n43\\n43\\n43\\n43\\n43\\n\", \"100\\n14\\n14\\n14\\... |
8b94c08517fdf9d5c6ce6eada398853f | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nSalem gave you $n$ sticks with integer positive lengths $a_1, a_2, \\ldots, a_n$.\n\nFor every stick, you can change its length to any other positive integer length (that is, either shrink or stretch it). The cost of chan... | {
"ground_truth": "{\"inputs\": [\"3\\n10 1 4\\n\", \"5\\n1 1 2 2 3\\n\", \"1\\n5\\n\", \"2\\n1 2\\n\", \"3\\n1 1 1\\n\", \"5\\n100 100 100 100 100\\n\", \"113\\n86 67 31 33 72 100 88 63 16 12 79 80 76 45 31 96 44 10 24 33 53 11 56 100 23 57 9 48 28 73 18 48 12 89 73 9 51 11 82 94 90 92 34 99 54 58 33 67 35 87 58 90 ... |
12900468c78e55d2b1ffd2db4d977786 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nКарта звёздного неба представляет собой прямоугольное поле, состоящее из n строк по m символов в каждой строке. Каждый символ — это либо «.» (означает пустой участок неба), либо «*» (означает то, что в этом месте на небе ... | {
"ground_truth": "{\"inputs\": [\"4 4\\n....\\n..*.\\n...*\\n..**\\n\", \"1 3\\n*.*\\n\", \"2 1\\n.\\n*\\n\", \"1 1\\n*\\n\", \"1 2\\n.*\\n\", \"1 2\\n*.\\n\", \"1 2\\n**\\n\", \"2 1\\n.\\n*\\n\", \"2 1\\n*\\n.\\n\", \"2 1\\n*\\n*\\n\", \"5 3\\n..*\\n.**\\n..*\\n...\\n..*\\n\", \"7 10\\n..........\\n......*...\\n...... |
70231e0bae1e57cfe87d34e51cf3011b | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA girl named Sonya is studying in the scientific lyceum of the Kingdom of Kremland. The teacher of computer science (Sonya's favorite subject!) invented a task for her.\n\nGiven an array $a$ of length $n$, consisting only... | {
"ground_truth": "{\"inputs\": [\"3 2\\n0 1 0\\n\", \"5 1\\n1 1 1 0 0\\n\", \"6 4\\n1 0 0 1 1 0\\n\", \"3 2\\n1 1 1\\n\", \"5 2\\n1 1 1 0 0\\n\", \"6 4\\n0 0 1 1 1 1\\n\", \"100 1000000000\\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 ... |
b028a40c3499807dc7b8beb89f827056 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nMemory is now interested in the de-evolution of objects, specifically triangles. He starts with an equilateral triangle of side length x, and he wishes to perform operations to obtain an equilateral triangle of side lengt... | {
"ground_truth": "{\"inputs\": [\"6 3\\n\", \"8 5\\n\", \"22 4\\n\", \"4 3\\n\", \"57 27\\n\", \"61 3\\n\", \"5 4\\n\", \"10 6\\n\", \"20 10\\n\", \"30 5\\n\", \"25 24\\n\", \"25 3\\n\", \"12 7\\n\", \"18 6\\n\", \"100000 3\\n\", \"100000 9999\\n\", \"9999 3\\n\", \"5323 32\\n\", \"6666 66\\n\", \"38578 32201\\n\", ... |
ac9483576715b0064261651d3f10aa6e | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIn a small restaurant there are a tables for one person and b tables for two persons. \n\nIt it known that n groups of people come today, each consisting of one or two people. \n\nIf a group consist of one person, it is s... | {
"ground_truth": "{\"inputs\": [\"4 1 2\\n1 2 1 1\\n\", \"4 1 1\\n1 1 2 1\\n\", \"1 1 1\\n1\\n\", \"2 1 2\\n2 2\\n\", \"5 1 3\\n1 2 2 2 1\\n\", \"7 6 1\\n1 1 1 1 1 1 1\\n\", \"10 2 1\\n2 1 2 2 2 2 1 2 1 2\\n\", \"20 4 3\\n2 2 2 2 2 2 2 2 1 2 1 1 2 2 1 2 2 2 1 2\\n\", \"1 1 1\\n1\\n\", \"1 1 1\\n2\\n\", \"1 200000 20... |
0a0b8f1f5be9628f6b7d026567b75336 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nEach student eagerly awaits the day he would pass the exams successfully. Thus, Vasya was ready to celebrate, but, alas, he didn't pass it. However, many of Vasya's fellow students from the same group were more successful... | {
"ground_truth": "{\"inputs\": [\"10 10 5 20\\n\", \"2 2 0 4\\n\", \"2 2 2 1\\n\", \"98 98 97 100\\n\", \"1 5 2 10\\n\", \"5 1 2 10\\n\", \"6 7 5 8\\n\", \"6 7 5 9\\n\", \"6 7 5 7\\n\", \"50 50 1 100\\n\", \"8 3 2 12\\n\", \"10 19 6 25\\n\", \"1 0 0 99\\n\", \"0 1 0 98\\n\", \"1 1 0 97\\n\", \"1 1 1 96\\n\", \"0 0 0... |
72597707167099c7b0f0d8fc00301dcd | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nPasha has a wooden stick of some positive integer length n. He wants to perform exactly three cuts to get four parts of the stick. Each part must have some positive integer length and the sum of these lengths will obvious... | {
"ground_truth": "{\"inputs\": [\"6\\n\", \"20\\n\", \"1\\n\", \"2\\n\", \"3\\n\", \"4\\n\", \"2000000000\\n\", \"1924704072\\n\", \"73740586\\n\", \"1925088820\\n\", \"593070992\\n\", \"1925473570\\n\", \"629490186\\n\", \"1980649112\\n\", \"36661322\\n\", \"1943590793\\n\", \"71207034\\n\", \"1757577394\\n\", \"16... |
377aaae6f2b1f42c03f895fa908163e1 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe Fair Nut likes kvass very much. On his birthday parents presented him $n$ kegs of kvass. There are $v_i$ liters of kvass in the $i$-th keg. Each keg has a lever. You can pour your glass by exactly $1$ liter pulling th... | {
"ground_truth": "{\"inputs\": [\"3 3\\n4 3 5\\n\", \"3 4\\n5 3 4\\n\", \"3 7\\n1 2 3\\n\", \"1 1\\n1\\n\", \"1 2\\n1\\n\", \"5 10\\n10 10 10 10 10\\n\", \"1 1000000000\\n1000000000\\n\", \"1 1000000000000\\n42\\n\", \"3 2\\n1 1 5\\n\", \"2 1\\n1 100\\n\", \"3 1\\n5 10 15\\n\", \"2 1\\n1 1000\\n\", \"3 3\\n2 4 4\\n\... |
5b3a87f61b1bcbfe4bbbed14da706d44 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h_1 cm from the ground. On the height h_2 cm (h_2 > h_1) on the same tree... | {
"ground_truth": "{\"inputs\": [\"10 30\\n2 1\\n\", \"10 13\\n1 1\\n\", \"10 19\\n1 2\\n\", \"1 50\\n5 4\\n\", \"1 1000\\n2 1\\n\", \"999 1000\\n1 1\\n\", \"999 1000\\n1 1000\\n\", \"1 1000\\n999 1\\n\", \"1 1000\\n100 99\\n\", \"500 509\\n1 1\\n\", \"500 555\\n6 1\\n\", \"1 100000\\n2 1\\n\", \"99990 100000\\n1 1\\... |
4d6ce781b69053d9afea9bf91703b568 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA sweet little monster Om Nom loves candies very much. One day he found himself in a rather tricky situation that required him to think a bit in order to enjoy candies the most. Would you succeed with the same task if you... | {
"ground_truth": "{\"inputs\": [\"10 3 5 2 3\\n\", \"5 3 1 6 7\\n\", \"982068341 55 57 106 109\\n\", \"930064129 32726326 25428197 83013449 64501049\\n\", \"927155987 21197 15994 54746 41309\\n\", \"902303498 609628987 152407246 8 2\\n\", \"942733698 9180 9072 1020 1008\\n\", \"951102310 39876134 24967176 70096104 4... |
ebc9e18de3470b1461df5e9a49b3d9dc | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are n employees in Alternative Cake Manufacturing (ACM). They are now voting on some very important question and the leading world media are trying to predict the outcome of the vote.\n\nEach of the employees belong... | {
"ground_truth": "{\"inputs\": [\"5\\nDDRRR\\n\", \"6\\nDDRRRR\\n\", \"1\\nD\\n\", \"1\\nR\\n\", \"2\\nDR\\n\", \"3\\nRDD\\n\", \"3\\nDRD\\n\", \"4\\nDRRD\\n\", \"4\\nDRRR\\n\", \"4\\nRDRD\\n\", \"5\\nDRDRR\\n\", \"4\\nRRRR\\n\", \"5\\nRDDRD\\n\", \"5\\nDDRRD\\n\", \"5\\nDRRRD\\n\", \"5\\nDDDDD\\n\", \"6\\nDRRDDR\\n... |
0cfadcee97675baea770f2560a5dd5e5 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nMonocarp has decided to buy a new TV set and hang it on the wall in his flat. The wall has enough free space so Monocarp can buy a TV set with screen width not greater than $a$ and screen height not greater than $b$. Mono... | {
"ground_truth": "{\"inputs\": [\"17 15 5 3\\n\", \"14 16 7 22\\n\", \"4 2 6 4\\n\", \"1000000000000000000 1000000000000000000 999999866000004473 999999822000007597\\n\", \"1 1 1 1\\n\", \"1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000\\n\", \"3 3 2 4\\n\", \"3 3 2 6\\n\", \"10000000... |
50395ecf9c4cfe7b7422afde937abc05 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe number \"zero\" is called \"love\" (or \"l'oeuf\" to be precise, literally means \"egg\" in French), for example when denoting the zero score in a game of tennis. \n\nAki is fond of numbers, especially those with trai... | {
"ground_truth": "{\"inputs\": [\"6 9\\n\", \"38 11\\n\", \"5 2\\n\", \"5 10\\n\", \"1000000000000000000 1000000000000\\n\", \"1000000000000000000 999999999989\\n\", \"1000000000000000000 97\\n\", \"62 45\\n\", \"25 48\\n\", \"594703138034372316 960179812013\\n\", \"1 2\\n\", \"2 2\\n\", \"7 10080\\n\", \"8 10080\\n... |
b654e09481d457ae849a2765478dcb7f | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWhere do odds begin, and where do they end? Where does hope emerge, and will they ever break?\n\nGiven an integer sequence a_1, a_2, ..., a_{n} of length n. Decide whether it is possible to divide it into an odd number of... | {
"ground_truth": "{\"inputs\": [\"3\\n1 3 5\\n\", \"5\\n1 0 1 5 1\\n\", \"3\\n4 3 1\\n\", \"4\\n3 9 9 3\\n\", \"1\\n1\\n\", \"5\\n100 99 100 99 99\\n\", \"100\\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 ... |
c893e89e41d9cfa81d2ac33e7d47ccd5 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a non-negative integer n, its decimal representation consists of at most 100 digits and doesn't contain leading zeroes.\n\nYour task is to determine if it is possible in this case to remove some of the digit... | {
"ground_truth": "{\"inputs\": [\"3454\\n\", \"10\\n\", \"111111\\n\", \"8996988892\\n\", \"5555555555\\n\", \"1\\n\", \"8147522776919916277306861346922924221557534659480258977017038624458370459299847590937757625791239188\\n\", \"8\\n\", \"14\\n\", \"2363\\n\", \"3554\\n\", \"312\\n\", \"7674\\n\", \"126\\n\", \"344... |
8e4c903e3503b5f470fdfa867aec7487 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIn a building where Polycarp lives there are equal number of flats on each floor. Unfortunately, Polycarp don't remember how many flats are on each floor, but he remembers that the flats are numbered from 1 from lower to ... | {
"ground_truth": "{\"inputs\": [\"10 3\\n6 2\\n2 1\\n7 3\\n\", \"8 4\\n3 1\\n6 2\\n5 2\\n2 1\\n\", \"8 3\\n7 2\\n6 2\\n1 1\\n\", \"4 2\\n8 3\\n3 1\\n\", \"11 4\\n16 4\\n11 3\\n10 3\\n15 4\\n\", \"16 6\\n3 1\\n16 4\\n10 3\\n9 3\\n19 5\\n8 2\\n\", \"1 0\\n\", \"1 1\\n1 1\\n\", \"1 1\\n1 1\\n\", \"1 2\\n1 1\\n2 2\\n\",... |
36e8b91a4daadfaae0c971f9fb50de23 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nBishwock is a chess figure that consists of three squares resembling an \"L-bar\". This figure can be rotated by 90, 180 and 270 degrees so it can have four possible states:\n\n \n\nXX XX .X X.\n\nX. .X XX XX\... | {
"ground_truth": "{\"inputs\": [\"00\\n00\\n\", \"00X00X0XXX0\\n0XXX0X00X00\\n\", \"0X0X0\\n0X0X0\\n\", \"0XXX0\\n00000\\n\", \"0\\n0\\n\", \"0\\nX\\n\", \"X\\n0\\n\", \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... |
a9d6153124d34bdb7b3c8dd0cdbcc77a | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nPolycarp loves lowercase letters and dislikes uppercase ones. Once he got a string s consisting only of lowercase and uppercase Latin letters.\n\nLet A be a set of positions in the string. Let's call it pretty if followin... | {
"ground_truth": "{\"inputs\": [\"11\\naaaaBaabAbA\\n\", \"12\\nzACaAbbaazzC\\n\", \"3\\nABC\\n\", \"1\\na\\n\", \"2\\naz\\n\", \"200\\nXbTJZqcbpYuZQEoUrbxlPXAPCtVLrRExpQzxzqzcqsqzsiisswqitswzCtJQxOavicSdBIodideVRKHPojCNHmbnrLgwJlwOpyrJJIhrUePszxSjJGeUgTtOfewPQnPVWhZAtogRPrJLwyShNQaeNsvrJwjuuBOMPCeSckBMISQzGngfOmeyf... |
7a797c789a8495db9411e9454b460805 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a sequence a consisting of n integers. You may partition this sequence into two sequences b and c in such a way that every element belongs exactly to one of these sequences. \n\nLet B be the sum of elements ... | {
"ground_truth": "{\"inputs\": [\"3\\n1 -2 0\\n\", \"6\\n16 23 16 15 42 8\\n\", \"1\\n-1\\n\", \"100\\n-100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100... |
df5e18e4829060814d0ba9e1dd46684d | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA bus moves along the coordinate line Ox from the point x = 0 to the point x = a. After starting from the point x = 0, it reaches the point x = a, immediately turns back and then moves to the point x = 0. After returning ... | {
"ground_truth": "{\"inputs\": [\"6 9 2 4\\n\", \"6 10 2 4\\n\", \"6 5 4 3\\n\", \"2 2 1 1\\n\", \"10 4 6 10\\n\", \"3 1 1 1\\n\", \"2 1 1 1\\n\", \"1000000 51923215 2302 10000\\n\", \"10 11 3 2\\n\", \"20 50 10 25\\n\", \"10 10 5 20\\n\", \"15 65 5 50\\n\", \"10 19 1 5\\n\", \"10 19 9 5\\n\", \"23 46 12 2\\n\", \"2... |
47ad32c5da89dfd1c27fa225a5201f02 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given the string s of length n and the numbers p, q. Split the string s to pieces of length p and q.\n\nFor example, the string \"Hello\" for p = 2, q = 3 can be split to the two strings \"Hel\" and \"lo\" or to t... | {
"ground_truth": "{\"inputs\": [\"5 2 3\\nHello\\n\", \"10 9 5\\nCodeforces\\n\", \"6 4 5\\nPrivet\\n\", \"8 1 1\\nabacabac\\n\", \"1 1 1\\n1\\n\", \"10 8 1\\nuTl9w4lcdo\\n\", \"20 6 4\\nfmFRpk2NrzSvnQC9gB61\\n\", \"30 23 6\\nWXDjl9kitaDTY673R5xyTlbL9gqeQ6\\n\", \"40 14 3\\nSOHBIkWEv7ScrkHgMtFFxP9G7JQLYXFoH1sJDAde\\... |
98c56bf5f569c775725452c26f990b8f | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nTwo positive integers a and b have a sum of s and a bitwise XOR of x. How many possible values are there for the ordered pair (a, b)?\n\n\n-----Input-----\n\nThe first line of the input contains two integers s and x (2 ≤ ... | {
"ground_truth": "{\"inputs\": [\"9 5\\n\", \"3 3\\n\", \"5 2\\n\", \"6 0\\n\", \"549755813887 549755813887\\n\", \"2 0\\n\", \"2 2\\n\", \"433864631347 597596794426\\n\", \"80 12\\n\", \"549755813888 549755813886\\n\", \"643057379466 24429729346\\n\", \"735465350041 356516240229\\n\", \"608032203317 318063018433\\n... |
c911aeac35489004a03fb6375c35cf69 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nOne day, the Grasshopper was jumping on the lawn and found a piece of paper with a string. Grasshopper became interested what is the minimum jump ability he should have in order to be able to reach the far end of the stri... | {
"ground_truth": "{\"inputs\": [\"ABABBBACFEYUKOTT\\n\", \"AAA\\n\", \"A\\n\", \"B\\n\", \"AEYUIOAEIYAEOUIYOEIUYEAOIUEOEAYOEIUYAEOUIYEOIKLMJNHGTRWSDZXCVBNMHGFDSXVWRTPPPLKMNBXIUOIUOIUOIUOOIU\\n\", \"AEYUIOAEIYAEOUIYOEIUYEAOIUEOEAYOEIUYAEOUIYEOIAEYUIOAEIYAEOUIYOEIUYEAOIUEOEAYOEIUYAEOUIYEOI\\n\", \"KMLPTGFHNBVCDRFGHNMB... |
09c0c621c1954571db4402818d797eeb | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou may have heard of the pie rule before. It states that if two people wish to fairly share a slice of pie, one person should cut the slice in half, and the other person should choose who gets which slice. Alice and Bob ... | {
"ground_truth": "{\"inputs\": [\"3\\n141 592 653\\n\", \"5\\n10 21 10 21 10\\n\", \"1\\n100000\\n\", \"50\\n100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 10000... |
3316ff20ba99edeaa049d0f0ee62f812 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou've got a positive integer sequence a_1, a_2, ..., a_{n}. All numbers in the sequence are distinct. Let's fix the set of variables b_1, b_2, ..., b_{m}. Initially each variable b_{i} (1 ≤ i ≤ m) contains the value of z... | {
"ground_truth": "{\"inputs\": [\"5\\n1 2 3 6 8\\n\", \"3\\n3 6 5\\n\", \"6\\n2 4 8 6 10 18\\n\", \"7\\n1 2 4 5 3 6 7\\n\", \"10\\n11 22 44 88 132 264 66 33 165 55\\n\", \"10\\n201 402 804 603 1608 2010 1206 2412 4824 2211\\n\", \"16\\n92 184 368 276 552 1104 1196 736 1472 1288 1012 2576 5152 1840 3680 1656\\n\", \"... |
835c888f6cf1b3586efb9fdb585584b7 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nToday, hedgehog Filya went to school for the very first time! Teacher gave him a homework which Filya was unable to complete without your help.\n\nFilya is given an array of non-negative integers a_1, a_2, ..., a_{n}. Fir... | {
"ground_truth": "{\"inputs\": [\"5\\n1 3 3 2 1\\n\", \"5\\n1 2 3 4 5\\n\", \"2\\n1 2\\n\", \"3\\n1 2 3\\n\", \"3\\n1 1 1\\n\", \"2\\n1 1000000000\\n\", \"4\\n1 2 3 4\\n\", \"10\\n1 1 1 1 1 2 2 2 2 2\\n\", \"2\\n4 2\\n\", \"4\\n1 1 4 7\\n\", \"3\\n99999999 1 50000000\\n\", \"1\\n0\\n\", \"5\\n0 0 0 0 0\\n\", \"4\\n4... |
6a7ba635f7c601dfa26ba05d210e659a | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe main street of Berland is a straight line with n houses built along it (n is an even number). The houses are located at both sides of the street. The houses with odd numbers are at one side of the street and are numbe... | {
"ground_truth": "{\"inputs\": [\"4 2\\n\", \"8 5\\n\", \"2 1\\n\", \"2 2\\n\", \"10 1\\n\", \"10 10\\n\", \"100000 100000\\n\", \"100000 2\\n\", \"100000 3\\n\", \"100000 99999\\n\", \"100 100\\n\", \"3000 34\\n\", \"2000 1\\n\", \"100000 1\\n\", \"24842 1038\\n\", \"1628 274\\n\", \"16186 337\\n\", \"24562 2009\\n... |
7cbc20932a2af2e75fc073ca95b87c98 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThere is unrest in the Galactic Senate. Several thousand solar systems have declared their intentions to leave the Republic. Master Heidi needs to select the Jedi Knights who will go on peacekeeping missions throughout th... | {
"ground_truth": "{\"inputs\": [\"5 2\\n1 1 2 2 1\\n1 2\\n\", \"1 1\\n1\\n1\\n\", \"2 1\\n1 1\\n1\\n\", \"2 1\\n1 1\\n2\\n\", \"2 2\\n1 2\\n1 1\\n\", \"3 3\\n1 1 3\\n0 1 2\\n\", \"4 4\\n2 3 3 2\\n0 0 1 0\\n\", \"2 2\\n2 2\\n0 2\\n\", \"3 3\\n1 1 3\\n0 1 1\\n\", \"4 4\\n2 4 4 3\\n1 1 1 1\\n\", \"2 2\\n2 1\\n0 1\\n\",... |
62ddcd156e0d34163cdf994c52248585 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nMishka is a little polar bear. As known, little bears loves spending their free time playing dice for chocolates. Once in a wonderful sunny morning, walking around blocks of ice, Mishka met her friend Chris, and they star... | {
"ground_truth": "{\"inputs\": [\"3\\n3 5\\n2 1\\n4 2\\n\", \"2\\n6 1\\n1 6\\n\", \"3\\n1 5\\n3 3\\n2 2\\n\", \"6\\n4 1\\n4 2\\n5 3\\n5 1\\n5 3\\n4 1\\n\", \"8\\n2 4\\n1 4\\n1 5\\n2 6\\n2 5\\n2 5\\n2 4\\n2 5\\n\", \"8\\n4 1\\n2 6\\n4 2\\n2 5\\n5 2\\n3 5\\n5 2\\n1 5\\n\", \"9\\n2 1\\n2 1\\n2 1\\n2 1\\n2 1\\n1 6\\n2 1... |
7bcfa627fb0b2064456e50cbe1a1259f | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nOne day Alex decided to remember childhood when computers were not too powerful and lots of people played only default games. Alex enjoyed playing Minesweeper that time. He imagined that he saved world from bombs planted ... | {
"ground_truth": "{\"inputs\": [\"3 3\\n111\\n1*1\\n111\\n\", \"2 4\\n*.*.\\n1211\\n\", \"1 10\\n.....1*1..\\n\", \"1 1\\n4\\n\", \"10 10\\n..........\\n...111111.\\n..13*21*1.\\n.12**2111.\\n.1*542..11\\n.13**1..1*\\n..2*31..11\\n..111..111\\n.......1*1\\n.......111\\n\", \"10 17\\n12*2*22123*31....\\n2*333*3*4***3... |
2345426ddb070349f7825776bc12fc81 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAfter passing a test, Vasya got himself a box of $n$ candies. He decided to eat an equal amount of candies each morning until there are no more candies. However, Petya also noticed the box and decided to get some candies ... | {
"ground_truth": "{\"inputs\": [\"68\\n\", \"1\\n\", \"2\\n\", \"42\\n\", \"43\\n\", \"756\\n\", \"999999972\\n\", \"999999973\\n\", \"1000000000000000000\\n\", \"6\\n\", \"3\\n\", \"4\\n\", \"5\\n\", \"66\\n\", \"67\\n\", \"1000\\n\", \"10000\\n\", \"100500\\n\", \"1000000\\n\", \"10000000\\n\", \"100000000\\n\", \... |
132228f98d999efe43e73e17bfd05951 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA necklace can be described as a string of links ('-') and pearls ('o'), with the last link or pearl connected to the first one. $0$ \n\nYou can remove a link or a pearl and insert it between two other existing links or p... | {
"ground_truth": "{\"inputs\": [\"-o-o--\\n\", \"-o---\\n\", \"-o---o-\\n\", \"ooo\\n\", \"---\\n\", \"--o-o-----o----o--oo-o-----ooo-oo---o--\\n\", \"-o--o-oo---o-o-o--o-o----oo------oo-----o----o-o-o--oo-o--o---o--o----------o---o-o-oo---o--o-oo-o--\\n\", \"-ooo--\\n\", \"---o--\\n\", \"oo-ooo\\n\", \"------o-o--o... |
d41809e4f997e4749598f1ec612be942 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nn hobbits are planning to spend the night at Frodo's house. Frodo has n beds standing in a row and m pillows (n ≤ m). Each hobbit needs a bed and at least one pillow to sleep, however, everyone wants as many pillows as po... | {
"ground_truth": "{\"inputs\": [\"4 6 2\\n\", \"3 10 3\\n\", \"3 6 1\\n\", \"3 3 3\\n\", \"1 1 1\\n\", \"1 1000000000 1\\n\", \"100 1000000000 20\\n\", \"1000 1000 994\\n\", \"100000000 200000000 54345\\n\", \"1000000000 1000000000 1\\n\", \"1000000000 1000000000 1000000000\\n\", \"1000000000 1000000000 500000000\\n... |
8996fc1b520636dc55954aa0bdd13aad | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given an array $a_1, a_2, \\dots , a_n$ and two integers $m$ and $k$.\n\nYou can choose some subarray $a_l, a_{l+1}, \\dots, a_{r-1}, a_r$. \n\nThe cost of subarray $a_l, a_{l+1}, \\dots, a_{r-1}, a_r$ is equal to... | {
"ground_truth": "{\"inputs\": [\"7 3 10\\n2 -4 15 -3 4 8 3\\n\", \"5 2 1000\\n-13 -4 -9 -20 -11\\n\", \"5 10 10\\n1000000000 1000000000 1000000000 1000000000 1000000000\\n\", \"1 1 1\\n2\\n\", \"5 10 10\\n1000000000 1000000000 -1000000000 1000000000 1000000000\\n\", \"6 2 5\\n2 2 2 2 2 2\\n\", \"1 10 1000000000\\n9... |
b36e7834eead48331f2a082f54292dcf | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nNot so long ago company R2 bought company R1 and consequently, all its developments in the field of multicore processors. Now the R2 laboratory is testing one of the R1 processors.\n\nThe testing goes in n steps, at each ... | {
"ground_truth": "{\"inputs\": [\"2 1 1 2\\n1\\n\", \"3 1 1 3\\n2\\n\", \"2 1 1 3\\n2\\n\", \"3 1 1 5\\n3\\n\", \"3 2 1 5\\n1 5\\n\", \"3 2 1 5\\n1 1\\n\", \"3 2 1 5\\n5 5\\n\", \"3 2 1 5\\n1 6\\n\", \"3 2 5 10\\n1 10\\n\", \"6 5 3 6\\n4 4 4 4 4\\n\", \"100 50 68 97\\n20 42 93 1 98 6 32 11 48 46 82 96 24 73 40 100 9... |
540265e2b40fc8630ab7ce572db7109d | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nMr. Santa asks all the great programmers of the world to solve a trivial problem. He gives them an integer m and asks for the number of positive integers n, such that the factorial of n ends with exactly m zeroes. Are you... | {
"ground_truth": "{\"inputs\": [\"1\\n\", \"5\\n\", \"2\\n\", \"3\\n\", \"7\\n\", \"12\\n\", \"15\\n\", \"18\\n\", \"38\\n\", \"47\\n\", \"58\\n\", \"66\\n\", \"70\\n\", \"89\\n\", \"417\\n\", \"815\\n\", \"394\\n\", \"798\\n\", \"507\\n\", \"406\\n\", \"570\\n\", \"185\\n\", \"765\\n\", \"967\\n\", \"112\\n\", \"72... |
4ccab6b35445ffdb72b658ec9eb0c448 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nChouti was tired of the tedious homework, so he opened up an old programming problem he created years ago.\n\nYou are given a connected undirected graph with $n$ vertices and $m$ weighted edges. There are $k$ special vert... | {
"ground_truth": "{\"inputs\": [\"2 3 2\\n2 1\\n1 2 3\\n1 2 2\\n2 2 1\\n\", \"4 5 3\\n1 2 3\\n1 2 5\\n4 2 1\\n2 3 2\\n1 4 4\\n1 3 3\\n\", \"5 7 4\\n1 2 3 4\\n1 2 3\\n5 1 4\\n3 1 1\\n4 2 5\\n2 5 6\\n2 3 3\\n3 4 6\\n\", \"2 1 2\\n1 2\\n1 2 1000000000\\n\", \"3 2 2\\n2 3\\n1 2 2\\n2 3 1\\n\", \"3 2 2\\n2 3\\n1 2 5\\n2 ... |
3992f3bb194b05bf480314fae7514276 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nBomboslav likes to look out of the window in his room and watch lads outside playing famous shell game. The game is played by two persons: operator and player. Operator takes three similar opaque shells and places a ball ... | {
"ground_truth": "{\"inputs\": [\"4\\n2\\n\", \"1\\n1\\n\", \"2\\n2\\n\", \"3\\n1\\n\", \"3\\n2\\n\", \"3\\n0\\n\", \"2000000000\\n0\\n\", \"2\\n0\\n\", \"2\\n1\\n\", \"4\\n0\\n\", \"4\\n1\\n\", \"5\\n0\\n\", \"5\\n1\\n\", \"5\\n2\\n\", \"6\\n0\\n\", \"6\\n1\\n\", \"6\\n2\\n\", \"7\\n0\\n\", \"7\\n1\\n\", \"7\\n2\\n... |
a0331bb868990c07c4316981ec67bc0e | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given n rectangles. The corners of rectangles have integer coordinates and their edges are parallel to the Ox and Oy axes. The rectangles may touch each other, but they do not overlap (that is, there are no points... | {
"ground_truth": "{\"inputs\": [\"5\\n0 0 2 3\\n0 3 3 5\\n2 0 5 2\\n3 2 5 5\\n2 2 3 3\\n\", \"4\\n0 0 2 3\\n0 3 3 5\\n2 0 5 2\\n3 2 5 5\\n\", \"5\\n0 0 10000 20000\\n10000 0 15000 19999\\n10000 19999 14999 20000\\n0 20000 15000 31400\\n15000 0 31400 31400\\n\", \"5\\n0 0 10000 20000\\n10000 0 15000 19999\\n10000 199... |
e334ed26459c24cca7f43bf53f185157 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIvan likes to learn different things about numbers, but he is especially interested in really big numbers. Ivan thinks that a positive integer number x is really big if the difference between x and the sum of its digits (... | {
"ground_truth": "{\"inputs\": [\"12 1\\n\", \"25 20\\n\", \"10 9\\n\", \"300 1000\\n\", \"500 1000\\n\", \"1000 2000\\n\", \"10000 1000\\n\", \"1000000000000000000 1000000000000000000\\n\", \"1000000000000000000 100000000000000000\\n\", \"1000000000000000000 10000000000000000\\n\", \"1000000000000000000 10000000000... |
4523bb85e550fab291b375e4d4ddea7e | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThere is a toy building consisting of $n$ towers. Each tower consists of several cubes standing on each other. The $i$-th tower consists of $h_i$ cubes, so it has height $h_i$.\n\nLet's define operation slice on some heig... | {
"ground_truth": "{\"inputs\": [\"5 5\\n3 1 2 2 4\\n\", \"4 5\\n2 3 4 5\\n\", \"2 2\\n1 1\\n\", \"5 5\\n5 5 5 5 5\\n\", \"5 20\\n5 5 5 5 5\\n\", \"2 3\\n2 2\\n\", \"4 5\\n2 2 2 2\\n\", \"5 6\\n2 2 2 2 7\\n\", \"1 1\\n1\\n\", \"5 5\\n1 1 1 1 1\\n\", \"3 3\\n10 10 10\\n\", \"2 3\\n5 5\\n\", \"1 100\\n1\\n\", \"1 4\\n1... |
0692efcad0125fae0cf2fd516b40b903 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nMishka is decorating the Christmas tree. He has got three garlands, and all of them will be put on the tree. After that Mishka will switch these garlands on.\n\nWhen a garland is switched on, it periodically changes its s... | {
"ground_truth": "{\"inputs\": [\"2 2 3\\n\", \"4 2 3\\n\", \"1499 1498 1500\\n\", \"1500 1500 1500\\n\", \"100 4 1\\n\", \"4 2 4\\n\", \"3 3 3\\n\", \"2 3 6\\n\", \"2 3 3\\n\", \"4 4 2\\n\", \"1 1 1\\n\", \"2 11 2\\n\", \"4 4 4\\n\", \"4 4 5\\n\", \"3 3 2\\n\", \"3 6 6\\n\", \"2 3 2\\n\", \"1 1 3\\n\", \"3 3 4\\n\"... |
856232ee2ba0cb80a08a54de8b93aa06 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a string $s$ of length $n$ consisting of lowercase Latin letters. You may apply some operations to this string: in one operation you can delete some contiguous substring of this string, if all letters in the... | {
"ground_truth": "{\"inputs\": [\"5\\nabaca\\n\", \"8\\nabcddcba\\n\", \"1\\nx\\n\", \"500\\nbbababaabaabaabbbbbbaabbabbabbaabababababbbbabaaabbbbaaabbbbbbbabababaaaaabbbbabaababbababbaaaaaabbaaabbaabaaababbbbbabbaabaabaabbbaaabaabbaaabbaabababbaaabaaabaaaaabbbababaabbbbabbbbbababbbaabaabbabaabbabbababbbbbaababbaabb... |
ac9d787f01cccae1957e27981b96ac95 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe Berland State University is hosting a ballroom dance in celebration of its 100500-th anniversary! n boys and m girls are already busy rehearsing waltz, minuet, polonaise and quadrille moves.\n\nWe know that several bo... | {
"ground_truth": "{\"inputs\": [\"4\\n1 4 6 2\\n5\\n5 1 5 7 9\\n\", \"4\\n1 2 3 4\\n4\\n10 11 12 13\\n\", \"5\\n1 1 1 1 1\\n3\\n1 2 3\\n\", \"1\\n1\\n1\\n1\\n\", \"2\\n1 10\\n1\\n9\\n\", \"4\\n4 5 4 4\\n5\\n5 3 4 2 4\\n\", \"1\\n2\\n1\\n1\\n\", \"1\\n3\\n2\\n3 2\\n\", \"1\\n4\\n3\\n4 4 4\\n\", \"1\\n2\\n4\\n3 1 4 2\... |
8fa5b0c53786f65a6aebc88b8481ba3c | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nKicker (table football) is a board game based on football, in which players control the footballers' figures mounted on rods by using bars to get the ball into the opponent's goal. When playing two on two, one player of e... | {
"ground_truth": "{\"inputs\": [\"1 100\\n100 1\\n99 99\\n99 99\\n\", \"1 1\\n2 2\\n3 3\\n2 2\\n\", \"3 3\\n2 2\\n1 1\\n2 2\\n\", \"80 79\\n79 30\\n80 81\\n40 80\\n\", \"10 10\\n4 9\\n8 9\\n7 6\\n\", \"10 2\\n9 3\\n3 1\\n9 4\\n\", \"6 3\\n6 10\\n2 5\\n4 4\\n\", \"8 7\\n1 5\\n7 4\\n8 8\\n\", \"2 7\\n8 4\\n4 6\\n10 8\... |
364c142b2b42ab2838f1ad8e0b6e73b9 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIn this problem you will meet the simplified model of game King of Thieves.\n\nIn a new ZeptoLab game called \"King of Thieves\" your aim is to reach a chest with gold by controlling your character, avoiding traps and obs... | {
"ground_truth": "{\"inputs\": [\"16\\n.**.*..*.***.**.\\n\", \"11\\n.*.*...*.*.\\n\", \"53\\n*.*.****.*.*......**....**.***.*.*.**.*.*.***...*..*.\\n\", \"71\\n**.**..*****.*.*.*.********.....*****.****.*..***...*.*.*.**.****.**.**\\n\", \"56\\n**.*..*...***.*.**.**..**.*.*.*.**...*.**.**....*...**..\\n\", \"64\\n*... |
33dac649cd337b2cfb7dd4f556433a90 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nZS the Coder and Chris the Baboon arrived at the entrance of Udayland. There is a n × n magic grid on the entrance which is filled with integers. Chris noticed that exactly one of the cells in the grid is empty, and to en... | {
"ground_truth": "{\"inputs\": [\"3\\n4 0 2\\n3 5 7\\n8 1 6\\n\", \"4\\n1 1 1 1\\n1 1 0 1\\n1 1 1 1\\n1 1 1 1\\n\", \"4\\n1 1 1 1\\n1 1 0 1\\n1 1 2 1\\n1 1 1 1\\n\", \"1\\n0\\n\", \"10\\n92 67 99 74 1 51 8 58 15 40\\n17 42 24 49 0 26 83 33 90 65\\n98 73 80 55 7 57 14 64 16 41\\n23 48 5 30 82 32 89 39 91 66\\n4 54 81... |
06639a20ef8900a8061790fbaa78f9fb | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are $n$ benches in the Berland Central park. It is known that $a_i$ people are currently sitting on the $i$-th bench. Another $m$ people are coming to the park and each of them is going to have a seat on some bench ... | {
"ground_truth": "{\"inputs\": [\"4\\n6\\n1\\n1\\n1\\n1\\n\", \"1\\n10\\n5\\n\", \"3\\n6\\n1\\n6\\n5\\n\", \"3\\n7\\n1\\n6\\n5\\n\", \"10\\n1000\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n\", \"10\\n1\\n3\\n3\\n2\\n3\\n3\\n3\\n3\\n3\\n3\\n3\\n\", \"51\\n10000\\n54\\n23\\n93\\n86\\n57\\n68\\n42\\n3... |
a30e530ef1fb3354e922be71efc49280 | code | coder1_longcot | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA company of $n$ friends wants to order exactly two pizzas. It is known that in total there are $9$ pizza ingredients in nature, which are denoted by integers from $1$ to $9$.\n\nEach of the $n$ friends has one or more fa... | {
"ground_truth": "{\"inputs\": [\"3 4\\n2 6 7\\n4 2 3 9 5\\n3 2 3 9\\n100 1 7\\n400 3 3 2 5\\n100 2 9 2\\n500 3 2 9 5\\n\", \"4 3\\n1 1\\n1 2\\n1 3\\n1 4\\n10 4 1 2 3 4\\n20 4 1 2 3 4\\n30 4 1 2 3 4\\n\", \"1 5\\n9 9 8 7 6 5 4 3 2 1\\n3 4 1 2 3 4\\n1 4 5 6 7 8\\n4 4 1 3 5 7\\n1 4 2 4 6 8\\n5 4 1 9 2 8\\n\", \"1 2\\n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.