data_source stringclasses 4
values | prompt listlengths 1 1 | ability stringclasses 1
value | reward_model dict | extra_info dict |
|---|---|---|---|---|
codecontests | [
{
"content": "You are given undirected weighted graph. Find the length of the shortest cycle which starts from the vertex 1 and passes throught all the edges at least once. Graph may contain multiply edges between a pair of vertices and loops (edges from the vertex to itself).\n\nInput\n\nThe first line of the ... | code | {
"ground_truth": "{\"inputs\": [\"3 3\\n1 2 1\\n2 3 1\\n3 1 1\\n\", \"3 2\\n1 2 3\\n2 3 4\\n\", \"2 10\\n1 2 9\\n1 2 9\\n2 1 9\\n1 2 8\\n2 1 9\\n1 2 9\\n1 2 9\\n1 2 11\\n1 2 9\\n1 2 9\\n\", \"4 4\\n1 3 1953\\n3 2 2844\\n1 3 2377\\n3 2 2037\\n\", \"2 1\\n2 2 44\\n\", \"4 8\\n1 2 4824\\n3 1 436\\n2 2 3087\\n2 4 2955\\... | {
"index": 0,
"split": "dummy"
} |
codeforces | [
{
"content": "Title: Round Subset\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nLet's call the roundness of the number the number of zeros to which it ends.\n\nYou have an array of *n* numbers. You need to choose a subset of exactly *k* numbers so that the roundness of the... | code | {
"ground_truth": "{\"inputs\": [\"3 2\\n50 4 20\", \"5 3\\n15 16 3 25 9\", \"3 3\\n9 77 13\", \"1 1\\n200000000\", \"1 1\\n3\", \"3 1\\n1000000000000000000 800000000000000000 625\", \"20 13\\n93050001 1 750000001 950000001 160250001 482000001 145875001 900000001 500000001 513300001 313620001 724750001 205800001 4000... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Jack is working on his jumping skills recently. Currently he's located at point zero of the number line. He would like to get to the point x. In order to train, he has decided that he'll first jump by only one unit, and each subsequent jump will be exactly one longer than the previous one. He can ... | code | {
"ground_truth": "{\"inputs\": [\"2\\n\", \"0\\n\", \"6\\n\", \"-245245154\\n\", \"999961559\\n\", \"103702792\\n\", \"294680891\\n\", \"16417015\\n\", \"485658989\\n\", \"-779406751\\n\", \"-6985106\\n\", \"-904422532\\n\", \"288916443\\n\", \"27254274\\n\", \"-517744582\\n\", \"-278253406\\n\", \"823078041\\n\", \... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "The black king is standing on a chess field consisting of 10^9 rows and 10^9 columns. We will consider the rows of the field numbered with integers from 1 to 10^9 from top to bottom. The columns are similarly numbered with integers from 1 to 10^9 from left to right. We will denote a cell of the fi... | code | {
"ground_truth": "{\n \"inputs\": [\n \"5 7 6 11\\n3\\n5 3 8\\n6 7 11\\n5 2 5\\n\",\n \"3 4 3 10\\n3\\n3 1 4\\n4 5 9\\n3 10 10\\n\",\n \"1 1 2 10\\n2\\n1 1 3\\n2 6 10\\n\",\n \"9 8 7 8\\n9\\n10 6 6\\n10 6 6\\n7 7 8\\n9 5 6\\n8 9 9\\n9 5 5\\n9 8 8\\n8 5 6\\n9 10 10\\n\",\n \"6 15 7 15\\n9\\n6 15 15\\n... | {
"index": 0,
"split": "dummy"
} |
codeforces | [
{
"content": "Title: Endless Roses Most Beautiful\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nArkady decided to buy roses for his girlfriend.\n\nA flower shop has white, orange and red roses, and the total amount of them is *n*. Arkady thinks that red roses are not good ... | code | {
"ground_truth": "{\"inputs\": [\"5 3\\n4 3 4 1 6\\nRROWW\", \"5 2\\n10 20 14 20 11\\nRRRRR\", \"11 5\\n5 6 3 2 3 4 7 5 4 5 6\\nRWOORWORROW\", \"15 10\\n8560 6244 9607 5137 7187 3217 5527 9919 282 8748 3529 6110 5767 521 3393\\nOWRWOORWRORWWRO\", \"10 4\\n1208 5835 2637 5827 3722 6837 3499 6438 43 5333\\nWRRWRWRWRW\... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Programmers working on a large project have just received a task to write exactly m lines of code. There are n programmers working on a project, the i-th of them makes exactly ai bugs in every line of code that he writes. \n\nLet's call a sequence of non-negative integers v1, v2, ..., vn a plan, i... | code | {
"ground_truth": "{\"inputs\": [\"3 6 5 1000000007\\n1 2 3\\n\", \"3 3 3 100\\n1 1 1\\n\", \"3 5 6 11\\n1 2 1\\n\", \"1 1 1 1\\n0\\n\", \"3 10 10 150691913\\n8 7 10\\n\", \"1 5 5 1000\\n500\\n\", \"21 63 40 1009\\n4 4 2 2 4 4 3 2 4 2 0 3 3 4 3 4 3 0 4 2 4\\n\", \"29 157 50 1\\n3 0 0 3 1 1 2 0 4 4 1 2 2 1 0 0 2 0 3 2... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Imagine that you have a twin brother or sister. Having another person that looks exactly like you seems very unusual. It's hard to say if having something of an alter ego is good or bad. And if you do have a twin, then you very well know what it's like.\n\nNow let's imagine a typical morning in yo... | code | {
"ground_truth": "{\"inputs\": [\"2\\n3 3\\n\", \"3\\n2 1 2\\n\", \"100\\n5 5 4 3 5 1 2 5 1 1 3 5 4 4 1 1 1 1 5 4 4 5 1 5 5 1 2 1 3 1 5 1 3 3 3 2 2 2 1 1 5 1 3 4 1 1 3 2 5 2 2 5 5 4 4 1 3 4 3 3 4 5 3 3 3 1 2 1 4 2 4 4 1 5 1 3 5 5 5 5 3 4 4 3 1 2 5 2 3 5 4 2 4 5 3 2 4 2 4 3\\n\", \"5\\n2 2 2 4 4\\n\", \"100\\n85 50 1... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "There was girl named Julia in their neighbourhood. Both of them liked her and were trying to impress her. Now that Tim and Bob are done with daddy’s game. Julia thought that Tim solved the game on his own and was deeply impressed. After few days, Julia and Tim realised they fell in love with each ... | code | {
"ground_truth": "{\"inputs\": [\"4\\n2\\nKOKUUW\\n4\\nALEXCSYIEX\\n9\\nFQHJANHXDXOOURWN\\n1\\nXIPXBTTIF\\n\\nSAMPLE\", \"4\\n2\\nKOKUUW\\n4\\nALEXCSYIEX\\n9\\nFQHJANHXDXOOURWN\\n1\\nXIPXBTTIF\", \"8\\n4\\nRLALFNFDJAIDFHSLFJSAA\\n5\\nSJFLRAHIALOANFGHSIEHD\\n6\\nAFLSJFEIVNSARIENBALAED\\n5\\nADFLAJDFEHELDFSALJ\\n25\\n... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "The grand museum has just announced a large exhibit on jewelry from around the world. In the hopes of his potential future prosperity, the world-renowned thief and master criminal Edward Terrenando has decided to attempt the magnum opus of his career in thievery.\n\nEdward is hoping to purloin a l... | code | {
"ground_truth": "{\n \"inputs\": [\n \"4 9\\n2 8\\n1 1\\n3 4\\n5 100\\n\",\n \"5 7\\n2 2\\n3 8\\n2 7\\n2 4\\n3 8\\n\",\n \"2 6\\n300 1\\n300 2\\n\"\n ],\n \"outputs\": [\n \"1 8 9 9 100 101 108 109 109\\n\",\n \"0 7 8 11 15 16 19\\n\",\n \"0 0 0 0 0 0\\n\"\n ]\n... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "There is a new TV game on BerTV. In this game two players get a number A consisting of 2n digits. Before each turn players determine who will make the next move. Each player should make exactly n moves. On it's turn i-th player takes the leftmost digit of A and appends it to his or her number Si. ... | code | {
"ground_truth": "{\"inputs\": [\"2\\n1234\\n\", \"2\\n9911\\n\", \"12\\n254163163934611135461589\\n\", \"1\\n21\\n\", \"4\\n00013213\\n\", \"1\\n01\\n\", \"5\\n9823921785\\n\", \"18\\n112233445566778899112233445566778899\\n\", \"18\\n101011411002041200101000000000001000\\n\", \"15\\n051911296923361789993851872792\\... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "There is a country with n citizens. The i-th of them initially has a_{i} money. The government strictly controls the wealth of its citizens. Whenever a citizen makes a purchase or earns some money, they must send a receipt to the social services mentioning the amount of money they currently have.\... | code | {
"ground_truth": "{\"inputs\": [\"5\\n3 50 2 1 10\\n3\\n1 2 0\\n2 8\\n1 3 20\\n\", \"4\\n1 2 3 4\\n3\\n2 3\\n1 2 2\\n2 1\\n\", \"4\\n1 2 3 4\\n2\\n2 3\\n2 2\\n\", \"4\\n1 2 3 4\\n2\\n2 1000\\n2 1\\n\", \"1\\n1\\n3\\n2 4\\n1 1 2\\n2 10\\n\", \"5\\n1 2 3 4 5\\n10\\n1 1 0\\n2 1\\n1 2 0\\n2 2\\n1 3 0\\n2 3\\n1 4 0\\n2 4... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write a program which manipulates a sequence $A$ = {$a_0, a_1, ..., a_{n-1}$} with the following operations:\n\n* $add(s, t, x)$ : add $x$ to $a_s, a_{s+1}, ..., a_t$.\n* $find(s, t)$ : report the minimum value in $a_s, a_{s+1}, ..., a_t$.\n\n\n\nNote that the initial values of $a_i ( i = 0, 1, ..... | code | {
"ground_truth": "{\"inputs\": [\"6 7\\n0 1 3 1\\n0 2 4 -2\\n1 0 5\\n1 0 1\\n0 1 5 3\\n1 3 4\\n1 0 5\", \"6 7\\n0 0 3 1\\n0 2 4 -2\\n1 0 5\\n1 0 1\\n0 3 5 3\\n1 3 4\\n1 0 5\", \"6 7\\n0 1 3 1\\n0 2 4 0\\n1 0 5\\n1 0 1\\n0 3 5 3\\n1 3 4\\n1 0 5\", \"6 7\\n0 0 6 1\\n0 2 4 -2\\n1 0 5\\n1 0 1\\n0 3 5 3\\n1 3 4\\n1 0 5\"... | {
"index": 0,
"split": "dummy"
} |
codeforces | [
{
"content": "Title: Clothes\n\nTime Limit: 2 seconds\n\nMemory Limit: 256 megabytes\n\nProblem Description:\nA little boy Gerald entered a clothes shop and found out something very unpleasant: not all clothes turns out to match. For example, Gerald noticed that he looks rather ridiculous in a smoking suit and ... | code | {
"ground_truth": "{\"inputs\": [\"3 3\\n1 2 3\\n1 2\\n2 3\\n3 1\", \"3 2\\n2 3 4\\n2 3\\n2 1\", \"4 4\\n1 1 1 1\\n1 2\\n2 3\\n3 4\\n4 1\", \"4 3\\n10 10 5 1\\n2 1\\n3 1\\n3 4\", \"4 0\\n9 8 2 10\", \"4 3\\n5 5 9 6\\n3 2\\n1 4\\n3 4\", \"4 3\\n5 1 10 1\\n2 1\\n3 2\\n1 4\", \"4 3\\n1 2 8 6\\n1 3\\n1 4\\n3 4\", \"4 4\\... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Amugae has a sentence consisting of $n$ words. He want to compress this sentence into one word. Amugae doesn't like repetitions, so when he merges two words into one word, he removes the longest prefix of the second word that coincides with a suffix of the first word. For example, he merges \"samp... | code | {
"ground_truth": "{\n \"inputs\": [\n \"5\\nI want to order pizza\\n\",\n \"5\\nsample please ease in out\\n\",\n \"5\\n1101 1001 001001 101 010\\n\",\n \"4\\nX XtS XtS XtSo4P0Mhj\\n\",\n \"3\\nU Ur Ur0d0\\n\",\n \"1\\n6\\n\",\n \"9\\nM M5 M5D M5DAYBl0r6gmttCTR M5DAYBl0r6gmttCTRoKdM9EFrX22qBZpA... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "In this task Anna and Maria play a game with a very unpleasant rival. Anna and Maria are in the opposite squares of a chessboard (8 × 8): Anna is in the upper right corner, and Maria is in the lower left one. Apart from them, the board has several statues. Each statue occupies exactly one square. ... | code | {
"ground_truth": "{\"inputs\": [\"S......A\\n.SS..S..\\nS....S..\\nSSS...S.\\n.SS.SSS.\\n.S.SS...\\n..S..S..\\nM.SS....\\n\", \"SSSSSSSA\\n......S.\\n......S.\\n.....SS.\\n....SS..\\n...SS...\\n..SS....\\nMSS.....\\n\", \"S..SSSSA\\n.S..S...\\nS.S....S\\nSS..S.S.\\nSSSS.S..\\n.SS..SS.\\n....SS..\\nMS..S...\\n\", \".... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Consider a house plan. \n\nLet the house be represented by an infinite horizontal strip defined by the inequality - h ≤ y ≤ h. Strictly outside the house there are two light sources at the points (0, f) and (0, - f). Windows are located in the walls, the windows are represented by segments on the... | code | {
"ground_truth": "{\"inputs\": [\"2 2 4\\n-1 0\\n1 2\\n\", \"1 1 2\\n-1 1\\n\", \"1 10 11\\n-5000 5000\\n\", \"3 1 100\\n-10 -5\\n-1 1\\n5 10\\n\", \"5 3 5\\n6 9\\n0 1\\n2 4\\n-9 -6\\n-4 -2\\n\", \"5 4 8\\n-4302 -3978\\n246 537\\n669 3430\\n3451 3885\\n-3081 -1725\\n\", \"5 1 25\\n-232 -78\\n-77 -34\\n-2 32\\n65 776... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Now-a-days, Manish is becoming famous for bank robbery in the country because of his cleverness, he never robs own his own.He has four workers A , B, C, and D , all working under him.All of the four take some amount for that. There are total N banks in the country and Manish wants to rob all the ... | code | {
"ground_truth": "{\"inputs\": [\"1\\n4\\n2 4 6 8\\n1 3 5 7\\n10 12 14 16\\n9 11 13 15\\n\", \"2\\n3\\n1 2 3 4\\n5 6 7 8\\n9 10 11 12\\n2\\n13 14 15 16\\n17 18 19 20\\n\", \"1\\n5\\n10 20 30 40\\n50 60 70 80\\n90 100 110 120\\n130 140 150 160\\n170 180 190 200\\n\", \"1\\n2\\n4 7 2 9\\n5 6 4 7\\n\", \"1\\n3\\n5 6 4 ... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Being stuck at home, Ray became extremely bored. To pass time, he asks Lord Omkar to use his time bending power: Infinity Clock! However, Lord Omkar will only listen to mortals who can solve the following problem:\n\nYou are given an array a of n integers. You are also given an integer k. Lord Omk... | code | {
"ground_truth": "{\"inputs\": [\"3\\n2 1\\n-199 192\\n5 19\\n5 -1 4 2 0\\n1 2\\n69\\n\", \"1\\n2 1\\n-2 -3\\n\", \"3\\n1 1\\n1\\n5 4\\n5 -1 4 2 0\\n1 2\\n69\\n\", \"1\\n5 1\\n-5 -4 -3 -2 -1\\n\", \"1\\n2 1\\n-6 -9\\n\", \"1\\n1 398708496844866113\\n959414461\\n\", \"1\\n2 1\\n-5 -4\\n\", \"2\\n3 1\\n-1 -2 0\\n3 2\\... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Given two square Matrices A[][] and B[][]. Your task is to complete the function multiply which stores the multiplied matrices in a new matrix C[][].\n \nExample 1:\nInput: \nN = 2\nA[][] = {{7, 8}, {2 , 9}}\nB[][] = {{14, 5}, {5, 18}}\nOutput: \nC[][] = {{138, 179}, {73, 172}}\n \nExample 2:\nInp... | code | {
"ground_truth": "{\"fn_name\": \"multiply\", \"inputs\": [\"N = 2\\r\\nA[][] = {{7, 8}, {2 , 9}}\\r\\nB[][] = {{14, 5}, {5, 18}}\", \"N = 2\\r\\nA[][] = {{17, 4}, {17 , 16}}\\r\\nB[][] = {{9, 2}, {7, 1}}\"], \"outputs\": [\"C[][] = {{138, 179}, {73, 172}}\", \"C[][] = {{181, 38}, {265, 50}}\"]}",
"style": "rule"
... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "After finding a suitable residence in the Swiss Alps, Robin thought he finally had what it takes to be happy. But every day he woke up feeling that something was missing. Maybe it was the lack of English food in these parts? Spotting a market opportunity and solving his problem at the same time, h... | code | {
"ground_truth": "{\"inputs\": [\"3 3 2\\n1 2 3\\n\", \"4 11 4\\n10 10 10 10\\n\", \"4 3 3\\n4 1 3 2\\n\"], \"outputs\": [\"3.666666667\\n\", \"20.000000000\\n\", \"5.888888888888\\n\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "After entering high school, Takeko, who joined the programming club, gradually became absorbed in the fun of algorithms. Now, when I'm in the second grade, I'd like to participate in Programming Koshien.\n\nAt one point, Takeko, who learned about sorting algorithms, tried to design a sorting algor... | code | {
"ground_truth": "{\"inputs\": [\"4\\n4 3 2 1\", \"6\\n1 3 6 5 8 2\", \"4\\n4 3 2 0\", \"6\\n0 3 6 5 8 2\", \"4\\n0 3 2 1\", \"6\\n1 0 6 5 8 2\", \"6\\n1 5 6 4 12 0\", \"4\\n-1 5 0 1\", \"6\\n0 3 1 5 8 2\", \"6\\n-2 3 6 0 13 2\", \"6\\n-1 1 0 5 10 3\", \"4\\n-1 1 0 2\", \"6\\n1 3 6 0 8 2\", \"6\\n1 3 0 5 8 4\", \"6\... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "You are given a string $S$, which is balanced parentheses with a star symbol '*' inserted.\n\nAny balanced parentheses can be constructed using the following rules:\n\n* An empty string is balanced.\n* Concatenation of two balanced parentheses is balanced.\n* If $T$ is balanced parentheses, concat... | code | {
"ground_truth": "{\"inputs\": [\"((*)(()\", \"(*)())(\", \"((()(*(\", \"((((((((((*))))))()))\", \"*))()((\", \"(((((((()(*))))))()))\", \"(((((((()()*)))))()()\", \"((((*()\", \"((()(((()(*)))))())))\", \"(((((*)\", \"((*)(((\", \"()()(*(\", \"(*()(((\", \"()()(*'\", \"((()*((\", \"(*()()(\", \"(((((((()(*))))))()... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "You might have remembered Theatre square from the [problem 1A](https://codeforces.com/problemset/problem/1/A). Now it's finally getting repaved.\n\nThe square still has a rectangular shape of n × m meters. However, the picture is about to get more complicated now. Let a_{i,j} be the j-th square in... | code | {
"ground_truth": "{\"inputs\": [\"4\\n1 1 10 1\\n.\\n1 2 10 1\\n..\\n2 1 10 1\\n.\\n.\\n3 3 3 7\\n..*\\n*..\\n.*.\\n\", \"1\\n3 3 2 4\\n**.\\n***\\n***\\n\", \"1\\n9 9 9 9\\n.........\\n.........\\n.........\\n.........\\n.........\\n.........\\n.........\\n.........\\n.........\\n\", \"1\\n3 3 2 7\\n**.\\n***\\n***... | {
"index": 0,
"split": "dummy"
} |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- -