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\nThere are\nN\nsquares arranged in a row, numbered\n1\nto\nN\nfrom left...
{ "code_size": 5608, "language": "C", "problem_id": "p03009", "submission_id": "s184050686" }
[ { "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\nN+1\nintegers:\n10^{100}\n,\n10^{100}+1\n, ...,\n10^{100}+N\n...
{ "code_size": 735, "language": "C++", "problem_id": "p02708", "submission_id": "s886635899" }
[ { "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:\nClock Hands\nWe have an analog clock whose three hands (the second hand, the\...
{ "code_size": 1084, "language": "C", "problem_id": "p00917", "submission_id": "s757535261" }
[ { "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\n12:17 (UTC): The sample input 1 and 2 were swapped. The error is now f...
{ "code_size": 1364, "language": "C++", "problem_id": "p04027", "submission_id": "s187236862" }
[ { "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 company has\nN\nmembers, who are assigned ID numbers\n1, ..., N\n.\n...
{ "code_size": 291, "language": "C", "problem_id": "p02707", "submission_id": "s835870690" }
[ { "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\nS\nsheep and\nW\nwolves.\nIf the number of wolves is greate...
{ "code_size": 264, "language": "C++", "problem_id": "p02699", "submission_id": "s469493917" }
[ { "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\nIroha is very particular about numbers. There are\nK\ndigits that she ...
{ "code_size": 715, "language": "C++", "problem_id": "p04039", "submission_id": "s560459499" }
[ { "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\nK\n500\n-yen coins. (Yen is the currency of Japan.)\nIf...
{ "code_size": 256, "language": "C++", "problem_id": "p02811", "submission_id": "s905651049" }
[ { "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": "Watch\nWrite a program which reads an integer $S$ [second] and converts it to $h:m:s$ whe...
{ "code_size": 173, "language": "C", "problem_id": "p02390", "submission_id": "s109123106" }
[ { "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 taking a computer-based examination. The examination consists ...
{ "code_size": 500, "language": "C", "problem_id": "p03699", "submission_id": "s283895877" }
[ { "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 an integer\nN\n, we will choose a permutation\n\\{P_1, P_2, ..., P...
{ "code_size": 299, "language": "C++", "problem_id": "p02924", "submission_id": "s303792232" }
[ { "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": "Recurring Decimals\nA decimal representation of an integer can be transformed to another ...
{ "code_size": 1099, "language": "C++", "problem_id": "p00761", "submission_id": "s814375931" }
[ { "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 is an infinitely large triangular grid, as shown below.\nEach po...
{ "code_size": 1140, "language": "C++", "problem_id": "p03115", "submission_id": "s786794815" }
[ { "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:\nUnit Fraction Partition\nA fraction whose numerator is 1\nand whose denominat...
{ "code_size": 795, "language": "C", "problem_id": "p00712", "submission_id": "s744302754" }
[ { "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": "Arithmetic Progressions\nAn arithmetic progression is a sequence of numbers $a_1, a_2, .....
{ "code_size": 944, "language": "C++", "problem_id": "p00969", "submission_id": "s941018172" }
[ { "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\nH\nrows and\nW\ncolumns of squares. The color of th...
{ "code_size": 995, "language": "C", "problem_id": "p02614", "submission_id": "s990951606" }
[ { "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:\nDial Lock\nA dial lock is a kind of lock which has some dials with printed nu...
{ "code_size": 1266, "language": "C", "problem_id": "p01275", "submission_id": "s066375816" }
[ { "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\nAlice lives on a line. Today, she will travel to some place in a myste...
{ "code_size": 552, "language": "C", "problem_id": "p03743", "submission_id": "s476790290" }
[ { "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": "Maximum Flow\nA flow network is a directed graph which has a $source$ and a $sink$. In a ...
{ "code_size": 2187, "language": "C++", "problem_id": "p02376", "submission_id": "s551865291" }
[ { "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": "We don't wanna work!\nACM is an organization of programming contests. The purpose of ACM ...
{ "code_size": 3069, "language": "C++", "problem_id": "p01882", "submission_id": "s800082724" }
[ { "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": "Print a Chessboard\nDraw a chessboard which has a height of\nH\ncm and a width of\nW\ncm....
{ "code_size": 464, "language": "C++", "problem_id": "p02405", "submission_id": "s368456328" }
[ { "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 going out for a walk, when you suddenly encounter a monster. F...
{ "code_size": 830, "language": "C++", "problem_id": "p03472", "submission_id": "s253605909" }
[ { "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\nsquares arranged in a row from left to right. The height...
{ "code_size": 425, "language": "C", "problem_id": "p02953", "submission_id": "s889183907" }
[ { "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\nSnuke Cats numbered\n1, 2, \\ldots, N\n, where\nN\nis\ne...
{ "code_size": 373, "language": "C", "problem_id": "p02631", "submission_id": "s054961056" }
[ { "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\nN\ncards. The\ni\n-th of these cards has an integer\nA_...
{ "code_size": 646, "language": "C", "problem_id": "p02890", "submission_id": "s896182841" }
[ { "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\npiles of stones. The\ni\n-th pile has\nA_i\nstones.\nAok...
{ "code_size": 3674, "language": "C", "problem_id": "p02626", "submission_id": "s452548824" }
[ { "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": "Multi-Set\nFor a set $S$ of integers, perform a sequence of the following operations. Not...
{ "code_size": 2862, "language": "C", "problem_id": "p02458", "submission_id": "s276135923" }
[ { "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": "One-Way Conveyors\nYou are working at a factory manufacturing many different products. Pr...
{ "code_size": 4688, "language": "C++", "problem_id": "p00987", "submission_id": "s052962229" }
[ { "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": "Dungeon Creation\nThe king demon is waiting in his dungeon to defeat a brave man.\nHis du...
{ "code_size": 3298, "language": "C++", "problem_id": "p01507", "submission_id": "s469922231" }
[ { "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": "Common Tangent\nFind common tangent lines of two circles $c1$ and $c2$.\nInput\nCenter co...
{ "code_size": 2219, "language": "C", "problem_id": "p02311", "submission_id": "s256246831" }
[ { "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": "(Please read problem A first. The maximum score you can get by solving this problem B is ...
{ "code_size": 1082, "language": "C++", "problem_id": "p02619", "submission_id": "s187294573" }
[ { "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": "Distance II\nYour task is to calculate the distance between two $n$ dimensional vectors $...
{ "code_size": 737, "language": "C++", "problem_id": "p02382", "submission_id": "s515281239" }
[ { "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": 5482, "language": "C", "problem_id": "p03153", "submission_id": "s687154945" }
[ { "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 rooted binary tree with\nN\nvertices, where the vertices are...
{ "code_size": 2627, "language": "C", "problem_id": "p02648", "submission_id": "s032142840" }
[ { "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": "Union of Rectangles\nGiven a set of $N$ axis-aligned rectangles in the plane, find the ar...
{ "code_size": 1890, "language": "C++", "problem_id": "p02358", "submission_id": "s956159436" }
[ { "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\nobservatories in AtCoder Hill, called Obs.\n1\n, Obs.\n2...
{ "code_size": 804, "language": "C++", "problem_id": "p02689", "submission_id": "s434623993" }
[ { "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": "Optimal Tournament\nIn 21XX, an annual programming contest \"Japan Algorithmist GrandPrix...
{ "code_size": 978, "language": "C++", "problem_id": "p01838", "submission_id": "s729267279" }
[ { "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:\nChinese Classics\nTaro, a junior high school student, is working on his homew...
{ "code_size": 2047, "language": "C", "problem_id": "p01439", "submission_id": "s372982268" }
[ { "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 come to a store that sells boxes containing balls. The store...
{ "code_size": 534, "language": "C++", "problem_id": "p03048", "submission_id": "s978636647" }
[ { "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 2028 and after a continuous growth, AtCoder Inc. finally built an e...
{ "code_size": 470, "language": "C++", "problem_id": "p03077", "submission_id": "s620374685" }
[ { "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:\nElectrophoretic\nScientist Frank, majoring in electrochemistry, has developed...
{ "code_size": 5401, "language": "C++", "problem_id": "p01235", "submission_id": "s530014927" }
[ { "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\nIt is September\n9\nin Japan now.\nYou are given a two-digit integer\n...
{ "code_size": 245, "language": "C++", "problem_id": "p03605", "submission_id": "s043001459" }
[ { "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:\nLuigi's Tavern\nLuigi's Tavern is a thriving tavern in the Kingdom of Nahaila...
{ "code_size": 3240, "language": "C++", "problem_id": "p01286", "submission_id": "s229714751" }
[ { "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 is an infinitely large pond, which we consider as a number line....
{ "code_size": 1147, "language": "C++", "problem_id": "p03034", "submission_id": "s280540455" }
[ { "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: Earn Big\nA group of\nN\npeople is trying to challenge the following game\nto ...
{ "code_size": 414, "language": "C++", "problem_id": "p01593", "submission_id": "s823823232" }
[ { "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\nN\nlogs of lengths\nA_1,A_2,\\cdots A_N\n.\nWe can cut these ...
{ "code_size": 687, "language": "C", "problem_id": "p02598", "submission_id": "s850067629" }
[ { "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": "Naive String Search\nFind places where a string\nP\nis found within a text\nT\n.\nPrint a...
{ "code_size": 416, "language": "C", "problem_id": "p02247", "submission_id": "s556323641" }
[ { "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 is a hotel with the following accommodation fee:\nX\nyen (the cu...
{ "code_size": 232, "language": "C", "problem_id": "p04011", "submission_id": "s816974762" }
[ { "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, who is\nA\nyears old, is riding a Ferris wheel.\nIt costs\n...
{ "code_size": 279, "language": "C++", "problem_id": "p03035", "submission_id": "s695474873" }
[ { "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:\nWater Tank\nYou built an apartment. The apartment has a water tank with a cap...
{ "code_size": 1163, "language": "C", "problem_id": "p01298", "submission_id": "s570928075" }
[ { "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\nintegers,\nA_1, A_2, ..., A_N\n, written on a blackboard...
{ "code_size": 1565, "language": "C++", "problem_id": "p03007", "submission_id": "s780309712" }
[ { "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": "M and A\nThe CEO of the company named $S$ is planning M&A with another company named $T$....
{ "code_size": 616, "language": "C", "problem_id": "p01828", "submission_id": "s402358438" }
[ { "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 hosting an sports meet.\nThere are\nN\npeople who will pa...
{ "code_size": 953, "language": "C", "problem_id": "p03652", "submission_id": "s430218865" }
[ { "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": "Mode Value\nYour task is to write a program which reads a sequence of integers and prints...
{ "code_size": 316, "language": "C", "problem_id": "p00028", "submission_id": "s517629010" }
[ { "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\nN\nstrings of lowercase English letters:\nS_1, S_2, \\cdots, ...
{ "code_size": 5592, "language": "C", "problem_id": "p02587", "submission_id": "s031756828" }
[ { "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": 2381, "language": "C", "problem_id": "p00831", "submission_id": "s888931187" }
[ { "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\nA= {a_1,a_2,......a_N}\nof\nN\npositive even num...
{ "code_size": 738, "language": "C", "problem_id": "p02814", "submission_id": "s399217869" }
[ { "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\npositive integers\nA_1, A_2, ..., A_N\n.\nTakahashi can ...
{ "code_size": 1847, "language": "C", "problem_id": "p03198", "submission_id": "s840269974" }
[ { "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": "Bipartite Matching\nA bipartite graph\nG = (V, E)\nis a graph in which the vertex set\nV\...
{ "code_size": 1696, "language": "C", "problem_id": "p02378", "submission_id": "s857475707" }
[ { "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:\nReading a Chord\nIn this problem, you are required to write a program that en...
{ "code_size": 1884, "language": "C", "problem_id": "p01152", "submission_id": "s714916061" }
[ { "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 number of integers between\n1\nand\nN\n(inclusive) that conta...
{ "code_size": 1069, "language": "C", "problem_id": "p02781", "submission_id": "s052518380" }
[ { "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, Aoki and Snuke love cookies. They have\nA\n,\nB\nand\nC\nco...
{ "code_size": 491, "language": "C", "problem_id": "p03723", "submission_id": "s004591092" }
[ { "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:\nSubstring Expression\nTrees are sometimes represented in the form of strings....
{ "code_size": 464, "language": "C++", "problem_id": "p01579", "submission_id": "s368837810" }
[ { "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": "Tangent to a Circle\nFind the tangent lines between a point $p$ and a circle $c$.\nInput\...
{ "code_size": 6735, "language": "C++", "problem_id": "p02310", "submission_id": "s088412559" }
[ { "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 string\nS\nconsisting of digits between\n1\nand\n9\n, ...
{ "code_size": 3225, "language": "C++", "problem_id": "p03904", "submission_id": "s667772567" }
[ { "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:\nDistorted Love\nSaying that it is not surprising that people want to know abo...
{ "code_size": 1781, "language": "C++", "problem_id": "p00640", "submission_id": "s682884160" }
[ { "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\nSquare1001 has seen an electric bulletin board displaying the integer\...
{ "code_size": 240, "language": "C", "problem_id": "p03564", "submission_id": "s651183652" }
[ { "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\nrobots numbered\n1\nto\nN\nplaced on a number line. Robo...
{ "code_size": 2442, "language": "C", "problem_id": "p02758", "submission_id": "s518894378" }
[ { "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 Add Query (RAQ)\nWrite a program which manipulates a sequence\nA\n= {\na\n1\n, a\n2...
{ "code_size": 1404, "language": "C", "problem_id": "p02349", "submission_id": "s661065982" }
[ { "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:\nMagical Island\nThis is a story in the epoch of magic. A clan of magicians li...
{ "code_size": 2127, "language": "C++", "problem_id": "p01264", "submission_id": "s316151672" }
[ { "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\nHow many multiples of\nd\nare there among the integers between\nL\nand...
{ "code_size": 216, "language": "C", "problem_id": "p02606", "submission_id": "s310808840" }
[ { "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": "Min-Max\nFor given three integers $a, b, c$, print the minimum value and the maximum val...
{ "code_size": 264, "language": "C++", "problem_id": "p02439", "submission_id": "s194862650" }
[ { "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:\nViva Confetti\nDo you know\nconfetti\n? They are small discs of colored paper...
{ "code_size": 2187, "language": "C", "problem_id": "p00818", "submission_id": "s818780493" }
[ { "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 decided to construct a string that starts with\nA\nand ends ...
{ "code_size": 399, "language": "C++", "problem_id": "p03814", "submission_id": "s045051651" }
[ { "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:\nFinding the Top RPS Player\nA company “ACM Foods” is preparing for opening it...
{ "code_size": 745, "language": "C++", "problem_id": "p01241", "submission_id": "s316931981" }
[ { "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": "Largest Rectangle in a Histogram\nA histogram is made of a number of contiguous bars, whi...
{ "code_size": 1034, "language": "C", "problem_id": "p02328", "submission_id": "s891749144" }
[ { "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": "Fermat's Last Theorem\nIn the 17th century, Fermat wrote that he proved for any integer $...
{ "code_size": 389, "language": "C", "problem_id": "p00691", "submission_id": "s214039768" }
[ { "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\nThree Kingdoms of Bourdelot\nYou are an archaeologist at the Institute for Cry...
{ "code_size": 1895, "language": "C++", "problem_id": "p00951", "submission_id": "s976486061" }
[ { "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 final of CODE FESTIVAL in some year, there are\nN\nparticipants...
{ "code_size": 1111, "language": "C++", "problem_id": "p03526", "submission_id": "s399201744" }
[ { "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\ndishes, numbered\n1, 2, \\ldots, N\n.\nInitially, for ea...
{ "code_size": 796, "language": "C", "problem_id": "p03169", "submission_id": "s570685391" }
[ { "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\nmountains ranging from east to west, and an ocean to the...
{ "code_size": 411, "language": "C++", "problem_id": "p03072", "submission_id": "s342873452" }
[ { "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": "Cycle Detection for a Directed Graph\nFind a cycle in a directed graph\nG(V, E)\n.\nInput...
{ "code_size": 1260, "language": "C++", "problem_id": "p02369", "submission_id": "s377407233" }
[ { "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:\nTriangles\nThere is a group that paints an emblem on the ground to invite ali...
{ "code_size": 326, "language": "C", "problem_id": "p01220", "submission_id": "s794887869" }
[ { "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 received a triangle as a birthday present.\nThe coordinates of t...
{ "code_size": 1228, "language": "C++", "problem_id": "p03879", "submission_id": "s321388634" }
[ { "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\nThis is an interactive task.\nSnuke has a favorite positive integer,\n...
{ "code_size": 1468, "language": "C++", "problem_id": "p03663", "submission_id": "s608243309" }
[ { "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 strings\ns\nand\nt\nof length\nN\neach, both consisting of l...
{ "code_size": 329, "language": "C++", "problem_id": "p02830", "submission_id": "s600504456" }
[ { "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 positive integer\nN\n. Consider repeatedly applying the ope...
{ "code_size": 1090, "language": "C++", "problem_id": "p02660", "submission_id": "s923207733" }
[ { "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": "Single Source Shortest Path\nFor a given weighted graph $G = (V, E)$, find the shortest p...
{ "code_size": 1029, "language": "C", "problem_id": "p02242", "submission_id": "s223514056" }
[ { "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\nRingo is giving a present to Snuke.\nRingo has found out that Snuke lo...
{ "code_size": 366, "language": "C++", "problem_id": "p03591", "submission_id": "s168022530" }
[ { "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 cheetah and a cheater are going to play the game of Nim.\nIn this ga...
{ "code_size": 631, "language": "C", "problem_id": "p03870", "submission_id": "s593389062" }
[ { "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": "Maximum Heap\nA binary heap which satisfies max-heap property is called max-heap. In a ma...
{ "code_size": 711, "language": "C", "problem_id": "p02288", "submission_id": "s418486151" }
[ { "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 taking a computer-based examination. The examination consists ...
{ "code_size": 630, "language": "C++", "problem_id": "p03699", "submission_id": "s839240895" }
[ { "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": "Anchored Balloon\nA balloon placed on the ground is connected to one or more anchors on t...
{ "code_size": 3342, "language": "C++", "problem_id": "p00771", "submission_id": "s927269730" }
[ { "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": "Common Tangent\nFind common tangent lines of two circles $c1$ and $c2$.\nInput\nCenter co...
{ "code_size": 7238, "language": "C++", "problem_id": "p02311", "submission_id": "s154519853" }
[ { "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 has a bar of length\nN\n, which has\nM\nmarks on it.\nThe dist...
{ "code_size": 7620, "language": "C", "problem_id": "p03749", "submission_id": "s300679550" }
[ { "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": "Rectangle\nWrite a program which calculates the area and perimeter of a given rectangle.\...
{ "code_size": 131, "language": "C", "problem_id": "p02389", "submission_id": "s945710481" }
[ { "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\nintegers\na_1, a_2, ..., a_N\nnot less than\n1\n.\nThe v...
{ "code_size": 422, "language": "C", "problem_id": "p03194", "submission_id": "s121322476" }
[ { "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 recursively define\nuninity\nof a tree, as follows: (\nUni\nis...
{ "code_size": 7109, "language": "C", "problem_id": "p03824", "submission_id": "s883261367" }
[ { "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 the deer recently bought three paint cans.\nThe color of the ...
{ "code_size": 256, "language": "C", "problem_id": "p03962", "submission_id": "s744471031" }
[ { "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\nintegers\nA_1\n,\nA_2\n,\n\\ldots\n,\nA_N\...
{ "code_size": 1280, "language": "C++", "problem_id": "p02734", "submission_id": "s767102466" }