messages
listlengths
3
3
metadata
dict
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nWe have a cord whose length is a positive integer. We will perform the...
{ "code_size": 238, "language": "C", "problem_id": "p03893", "submission_id": "s775453163" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Rotate\nWrite a program which reads a sequence of integers $A = \\{a_0, a_1, ..., a_{n-1}...
{ "code_size": 574, "language": "C", "problem_id": "p02444", "submission_id": "s369441965" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nWe have a\n3×3\nsquare grid, where each square contains a lowercase En...
{ "code_size": 246, "language": "C++", "problem_id": "p03415", "submission_id": "s518534471" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Connected Components\nWrite a program which reads relations in a SNS (Social Network Serv...
{ "code_size": 1100, "language": "C", "problem_id": "p02240", "submission_id": "s939287591" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem B:\nLeft Hand Rule\nThe left-hand rule, which is also known as the wall follower,...
{ "code_size": 2098, "language": "C++", "problem_id": "p01251", "submission_id": "s943836813" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Minimum Spanning Tree\nFor a given weighted graph $G = (V, E)$, find the minimum spanning...
{ "code_size": 936, "language": "C", "problem_id": "p02241", "submission_id": "s241035537" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nSnuke has a string\nS\nconsisting of three kinds of letters:\na\n,\nb\...
{ "code_size": 740, "language": "C++", "problem_id": "p03524", "submission_id": "s310772302" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Building a Space Station\nYou are a member of the space station engineering team,\nand ar...
{ "code_size": 1874, "language": "C++", "problem_id": "p00708", "submission_id": "s932448183" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou are given two integer sequences, each of length\nN\n:\na_1, ..., a...
{ "code_size": 1316, "language": "C++", "problem_id": "p03412", "submission_id": "s795590635" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Minimum-Cost Arborescence\nFind the sum of the weights of edges of the Minimum-Cost Arbor...
{ "code_size": 3275, "language": "C++", "problem_id": "p02365", "submission_id": "s391073462" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Unique\nFor a sequence of integers $A = \\{a_0, a_1, ..., a_{n-1}\\}$ which is sorted by ...
{ "code_size": 432, "language": "C++", "problem_id": "p02446", "submission_id": "s892798991" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Taro's Shopping\nMammy decided to give Taro his first shopping experience.\nMammy tells h...
{ "code_size": 643, "language": "C++", "problem_id": "p01101", "submission_id": "s747331936" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem D:\nPrivate Teacher\nYou are working as a private teacher. Since you are giving l...
{ "code_size": 1386, "language": "C", "problem_id": "p01219", "submission_id": "s205511754" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nIn a two-dimensional plane, we have a rectangle\nR\nwhose vertices are...
{ "code_size": 1524, "language": "C++", "problem_id": "p02650", "submission_id": "s697201754" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem D:\nSum of Different Primes\nA positive integer may be expressed as a sum of diff...
{ "code_size": 818, "language": "C", "problem_id": "p00848", "submission_id": "s539858974" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou are given a sequence with\nN\nintegers:\nA = \\{ A_1, A_2, \\cdots...
{ "code_size": 668, "language": "C", "problem_id": "p02973", "submission_id": "s683620646" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem F:\nControlled Tournament\nNational Association of Tennis is planning to hold a t...
{ "code_size": 1327, "language": "C++", "problem_id": "p01176", "submission_id": "s736425864" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem J:\nBillion Million Thousand\nA linguist, Nodvic Natharus Damenhof (commonly call...
{ "code_size": 1481, "language": "C", "problem_id": "p01249", "submission_id": "s926156409" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Sorting Tuples\nWrite a program which reads $n$ items and sorts them. Each item has attri...
{ "code_size": 840, "language": "C++", "problem_id": "p02448", "submission_id": "s196879568" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nGiven is an integer sequence of length\nN+1\n:\nA_0, A_1, A_2, \\ldots...
{ "code_size": 1265, "language": "C++", "problem_id": "p02665", "submission_id": "s519808839" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Exhaustive Search\nWrite a program which reads a sequence\nA\nof\nn\nelements and an inte...
{ "code_size": 503, "language": "C", "problem_id": "p02271", "submission_id": "s536276391" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are\nK\npieces of cakes.\nMr. Takahashi would like to eat one ca...
{ "code_size": 668, "language": "C++", "problem_id": "p03958", "submission_id": "s800618015" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou are given a tree with\nN\nvertices. The vertices are numbered\n0\n...
{ "code_size": 6575, "language": "C", "problem_id": "p03442", "submission_id": "s217419533" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nWe have a grid of squares with\nN\nrows and\nM\ncolumns. Let\n(i, j)\n...
{ "code_size": 1048, "language": "C", "problem_id": "p03039", "submission_id": "s212731916" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nTakahashi is standing on a multiplication table with infinitely many r...
{ "code_size": 449, "language": "C++", "problem_id": "p02881", "submission_id": "s424547726" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are\nN\ncandles placed on a number line.\nThe\ni\n-th candle fro...
{ "code_size": 856, "language": "C++", "problem_id": "p03276", "submission_id": "s279853490" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou are given\nN\npoints\n(x_i,y_i)\nlocated on a two-dimensional plan...
{ "code_size": 6225, "language": "C", "problem_id": "p03615", "submission_id": "s349734757" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem F:\nICPC: Intelligent Congruent Partition of Chocolate\nThe twins named Tatsuya a...
{ "code_size": 3069, "language": "C++", "problem_id": "p00739", "submission_id": "s491799992" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nAs a token of his gratitude, Takahashi has decided to give his mother ...
{ "code_size": 302, "language": "C++", "problem_id": "p03479", "submission_id": "s855875779" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem C:\nLeaky Cryptography\nThe ACM ICPC judges are very careful about not leaking th...
{ "code_size": 444, "language": "C", "problem_id": "p00829", "submission_id": "s436573560" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Treasure Map\nMr. Kobou found a bundle of old paper when he was cleaning his family home....
{ "code_size": 1114, "language": "C", "problem_id": "p00391", "submission_id": "s729453118" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nFor a positive integer\nX\n, let\nf(X)\nbe the number of positive divi...
{ "code_size": 425, "language": "C", "problem_id": "p02624", "submission_id": "s638587046" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem B:\nBook Replacement\nThe deadline of Prof. Hachioji’s assignment is tomorrow. To...
{ "code_size": 2307, "language": "C", "problem_id": "p00837", "submission_id": "s442031469" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem D:\nFind the Outlier\nProfessor Abacus has just built a new computing engine for ...
{ "code_size": 1866, "language": "C++", "problem_id": "p00907", "submission_id": "s324120945" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are\nN\nboxes arranged in a row.\nInitially, the\ni\n-th box fro...
{ "code_size": 470, "language": "C", "problem_id": "p03864", "submission_id": "s155316664" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nLet\nN\nbe a positive odd number.\nThere are\nN\ncoins, numbered\n1, 2...
{ "code_size": 913, "language": "C++", "problem_id": "p03168", "submission_id": "s285506400" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nGiven is a sequence of integers\nA_1, A_2, ..., A_N\n.\nIf its element...
{ "code_size": 538, "language": "C", "problem_id": "p02779", "submission_id": "s366009938" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nSnuke got a grid from his mother, as a birthday present. The grid has\...
{ "code_size": 1947, "language": "C++", "problem_id": "p04024", "submission_id": "s483162473" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem A\nRearranging a Sequence\nYou are given an ordered sequence of integers, ($1, 2,...
{ "code_size": 484, "language": "C", "problem_id": "p00946", "submission_id": "s230528230" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Board Arrangements for Concentration Games\nYou have to organize a wedding party. The pro...
{ "code_size": 1022, "language": "C++", "problem_id": "p00685", "submission_id": "s270032823" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nCat Snuke is learning to write characters.\nToday, he practiced writin...
{ "code_size": 242, "language": "C", "problem_id": "p03242", "submission_id": "s662985509" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are two (6-sided) dice: a red die and a blue die.\nWhen a red di...
{ "code_size": 1445, "language": "C++", "problem_id": "p03881", "submission_id": "s250430129" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nA\nbracket sequence\nis a string that is one of the following:\nAn emp...
{ "code_size": 1765, "language": "C++", "problem_id": "p02686", "submission_id": "s435985469" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nFennec is fighting with\nN\nmonsters.\nThe\nhealth\nof the\ni\n-th mon...
{ "code_size": 477, "language": "C++", "problem_id": "p02785", "submission_id": "s220825098" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Cake Party\nI’m planning to have a party on my birthday. Many of my friends will come to ...
{ "code_size": 247, "language": "C", "problem_id": "p00377", "submission_id": "s001728696" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nTakahashi is now competing in a programming contest, but he received T...
{ "code_size": 181, "language": "C", "problem_id": "p03549", "submission_id": "s457626948" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Encryption System\nA programmer developed a new encryption system.\nHowever, his system h...
{ "code_size": 1332, "language": "C++", "problem_id": "p00776", "submission_id": "s251221871" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Counting Sort\nCounting sort can be used for sorting elements in an array which each of t...
{ "code_size": 609, "language": "C", "problem_id": "p02275", "submission_id": "s744435665" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nWe say that a odd number\nN\nis\nsimilar to 2017\nwhen both\nN\nand\n(...
{ "code_size": 793, "language": "C", "problem_id": "p03476", "submission_id": "s238285158" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Vector Compression\nYou are recording a result of a secret experiment, which consists of ...
{ "code_size": 4325, "language": "C++", "problem_id": "p01426", "submission_id": "s715248742" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou are given string\nS\nand\nT\nconsisting of lowercase English lette...
{ "code_size": 497, "language": "C++", "problem_id": "p03293", "submission_id": "s413263824" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Enumeration of Subsets II\nYou are given a set $T$, which is a subset of $U$. The set $U$...
{ "code_size": 833, "language": "C", "problem_id": "p02428", "submission_id": "s695897494" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nTakahashi loves palindromes. Non-palindromic strings are unacceptable ...
{ "code_size": 273, "language": "C", "problem_id": "p02836", "submission_id": "s452979387" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nIn\n2937\n, DISCO creates a new universe called DISCOSMOS to celebrate...
{ "code_size": 1712, "language": "C++", "problem_id": "p02858", "submission_id": "s197536581" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem D:\nLong Distance Taxi\nA taxi driver, Nakamura, was so delighted because he got ...
{ "code_size": 2370, "language": "C++", "problem_id": "p00897", "submission_id": "s109937068" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are\nN\npeople, conveniently numbered\n1\nthrough\nN\n.\nThey we...
{ "code_size": 690, "language": "C", "problem_id": "p03846", "submission_id": "s471714756" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Range Update Query (RUQ)\nWrite a program which manipulates a sequence\nA\n= {\na\n0\n, a...
{ "code_size": 2347, "language": "C++", "problem_id": "p02348", "submission_id": "s765544427" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nJAG land is a country, which is represented as an $M \\times M$ grid. ...
{ "code_size": 3200, "language": "C++", "problem_id": "p02077", "submission_id": "s303043726" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nSnuke is buying a bicycle.\nThe bicycle of his choice does not come wi...
{ "code_size": 252, "language": "C++", "problem_id": "p03671", "submission_id": "s322467610" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem H:\nWinter Bells\nThe best night ever in the world has come! It's 8 p.m. of Decem...
{ "code_size": 2114, "language": "C", "problem_id": "p00644", "submission_id": "s222026682" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Integral Rectangles\nLet us consider rectangles whose height,\nh\n, and\nwidth,\nw\n, are...
{ "code_size": 677, "language": "C", "problem_id": "p00767", "submission_id": "s985199693" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nIn this problem, we use the\n24\n-hour clock.\nTakahashi gets up exact...
{ "code_size": 216, "language": "C", "problem_id": "p02663", "submission_id": "s928895406" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem E:\nSubdividing a Land\nIndigo Real-estate Company is now planning to develop a n...
{ "code_size": 1003, "language": "C", "problem_id": "p01238", "submission_id": "s432341294" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem H:\nLaser Cutter\nCiel is going to do woodworking. Ciel wants to make a cut in a ...
{ "code_size": 2993, "language": "C++", "problem_id": "p01825", "submission_id": "s858294425" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Balance Scale\nYou, an experimental chemist, have a balance scale and a kit of\nweights f...
{ "code_size": 1695, "language": "C++", "problem_id": "p01119", "submission_id": "s440778997" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nSnuke is having another barbeque party.\nThis time, he will make one s...
{ "code_size": 1315, "language": "C++", "problem_id": "p04051", "submission_id": "s074025235" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are\nN\ncities in Republic of AtCoder. The size of the\ni\n-th c...
{ "code_size": 2664, "language": "C++", "problem_id": "p03153", "submission_id": "s452547177" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nGiven are a sequence of\nN\npositive integers\nA_1, A_2, \\ldots, A_N\...
{ "code_size": 994, "language": "C++", "problem_id": "p02851", "submission_id": "s668968650" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem C:\nDie Game\nLife is not easy. Sometimes it is beyond your control. Now, as cont...
{ "code_size": 1016, "language": "C++", "problem_id": "p00790", "submission_id": "s311302191" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nDetermine if we can choose\nK\ndifferent integers between\n1\nand\nN\n...
{ "code_size": 187, "language": "C", "problem_id": "p03129", "submission_id": "s679265142" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nIn Republic of AtCoder, Snuke Chameleons (Family: Chamaeleonidae, Genu...
{ "code_size": 7468, "language": "C", "problem_id": "p03431", "submission_id": "s165546375" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nTakahashi has\nA\nuntasty cookies containing antidotes,\nB\ntasty cook...
{ "code_size": 363, "language": "C++", "problem_id": "p03186", "submission_id": "s663297206" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nTakahashi loves gold coins. He gains\n1000\nhappiness points\nfor each...
{ "code_size": 311, "language": "C++", "problem_id": "p02724", "submission_id": "s896803394" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nN\ncells are arranged in a row.\nSome of them may contain tokens.\nYou...
{ "code_size": 1401, "language": "C++", "problem_id": "p03580", "submission_id": "s003396492" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nJoisino is planning to open a shop in a shopping street.\nEach of the ...
{ "code_size": 931, "language": "C", "problem_id": "p03503", "submission_id": "s999419510" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nWe will define the\nmedian\nof a sequence\nb\nof length\nM\n, as follo...
{ "code_size": 1549, "language": "C++", "problem_id": "p03277", "submission_id": "s569427922" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are\n2N\npeople numbered\n1\nthrough\n2N\n.\nThe height of Perso...
{ "code_size": 4547, "language": "C++", "problem_id": "p02539", "submission_id": "s106529900" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou are given two non-negative integers\nL\nand\nR\n.\nWe will choose ...
{ "code_size": 575, "language": "C++", "problem_id": "p02983", "submission_id": "s068696645" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nDetermine if an\nN\n-sided polygon (not necessarily convex) with sides...
{ "code_size": 432, "language": "C++", "problem_id": "p03136", "submission_id": "s545175980" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem E:\nConfusing Login Names\nMeikyokan University is very famous for its research a...
{ "code_size": 2145, "language": "C++", "problem_id": "p00831", "submission_id": "s137107343" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Traveling Salesman Problem\nFor a given weighted directed graph\nG(V, E)\n, find the dist...
{ "code_size": 973, "language": "C", "problem_id": "p02323", "submission_id": "s594766967" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nTakahashi is locked within a building.\nThis building consists of\nH×W...
{ "code_size": 1681, "language": "C++", "problem_id": "p03725", "submission_id": "s329826607" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nTakahashi has a maze, which is a grid of\nH \\times W\nsquares with\nH...
{ "code_size": 1715, "language": "C++", "problem_id": "p02803", "submission_id": "s602430150" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem A:\nRational Irrationals\nRational numbers are numbers represented by ratios of t...
{ "code_size": 912, "language": "C", "problem_id": "p00788", "submission_id": "s959128486" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nIn the beginning, Takahashi has\nA\ncookies, and Aoki has\nB\ncookies....
{ "code_size": 385, "language": "C", "problem_id": "p03228", "submission_id": "s615623427" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem E:\nReverse a Road\nAndrew R. Klein resides in the city of Yanwoe, and goes to hi...
{ "code_size": 2555, "language": "C", "problem_id": "p01254", "submission_id": "s274754016" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou planned a trip using trains and buses.\nThe train fare will be\nA\...
{ "code_size": 242, "language": "C++", "problem_id": "p03399", "submission_id": "s528974861" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem C. Santa's Gift\nSanta is going to pack gifts into a bag for a family. There are ...
{ "code_size": 862, "language": "C++", "problem_id": "p02006", "submission_id": "s904399492" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nIn some other world, today is Christmas.\nMr. Takaha decides to make a...
{ "code_size": 949, "language": "C++", "problem_id": "p03209", "submission_id": "s584612205" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are\nN\ntowns in Takahashi Kingdom. They are conveniently number...
{ "code_size": 1233, "language": "C++", "problem_id": "p03914", "submission_id": "s130870019" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nAtCoDeer is thinking of painting an infinite two-dimensional grid in a...
{ "code_size": 1393, "language": "C", "problem_id": "p03458", "submission_id": "s956501398" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "D - Medical Inspection\nProblem Statement\nThe government has declared a state of emergen...
{ "code_size": 4221, "language": "C++", "problem_id": "p01670", "submission_id": "s983623182" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nKurohashi has never participated in AtCoder Beginner Contest (ABC).\nT...
{ "code_size": 359, "language": "C++", "problem_id": "p03243", "submission_id": "s367468187" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Prime Factorization\nFactorize a given integer\nn\n.\nInput\nn\nAn integer\nn\nis given i...
{ "code_size": 691, "language": "C++", "problem_id": "p02467", "submission_id": "s202801422" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nOne day, Snuke was given a permutation of length\nN\n,\na_1, a_2, ...,...
{ "code_size": 1711, "language": "C", "problem_id": "p03987", "submission_id": "s256303519" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Deque\nFor a dynamic array $A = \\{a_0, a_1, ...\\}$ of integers, perform a sequence of t...
{ "code_size": 695, "language": "C++", "problem_id": "p02432", "submission_id": "s197283501" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou are given a simple connected undirected graph\nG\nconsisting of\nN...
{ "code_size": 2876, "language": "C++", "problem_id": "p03052", "submission_id": "s759442830" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThree people, A, B and C, are trying to communicate using transceivers...
{ "code_size": 282, "language": "C", "problem_id": "p03351", "submission_id": "s151903200" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem D:\nTraveling by Stagecoach\nOnce upon a time, there was a traveler.\nHe plans to...
{ "code_size": 1845, "language": "C++", "problem_id": "p00719", "submission_id": "s914882000" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nFind the sum of the integers between\n1\nand\nN\n(inclusive), whose su...
{ "code_size": 363, "language": "C", "problem_id": "p03478", "submission_id": "s019864843" }