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 C:\nSwimming Jam\nDespite urging requests of the townspeople, the municipal offic...
{ "code_size": 1636, "language": "C++", "problem_id": "p00876", "submission_id": "s470561891" }
[ { "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\nf(n)\nbe the number of triples of integers\n(x,y,z)\nthat satisfy...
{ "code_size": 567, "language": "C", "problem_id": "p02608", "submission_id": "s470990749" }
[ { "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\nnon-negative integers\nA_1, A_2, ..., A_N\nand anoth...
{ "code_size": 1298, "language": "C++", "problem_id": "p03138", "submission_id": "s909215625" }
[ { "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 have a grid with $H$ rows and $W$ columns. Each cell contains one ...
{ "code_size": 1879, "language": "C++", "problem_id": "p02073", "submission_id": "s852572418" }
[ { "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\ncolored balls arranged in a row from left to right; the co...
{ "code_size": 1520, "language": "C", "problem_id": "p02599", "submission_id": "s573090820" }
[ { "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’s take a prime\nP = 200\\,003\n.\nYou are given\nN\nintegers\nA_1,...
{ "code_size": 3197, "language": "C++", "problem_id": "p02590", "submission_id": "s619675009" }
[ { "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": "Reflection\nFor given three points\np1, p2, p\n, find the reflection point\nx\nof\np\nont...
{ "code_size": 1153, "language": "C", "problem_id": "p02291", "submission_id": "s082141987" }
[ { "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 interested in strings that satisfy the following conditions:\...
{ "code_size": 439, "language": "C", "problem_id": "p03951", "submission_id": "s292653069" }
[ { "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\nOn a planet far, far away,\nM\nlanguages are spoken. They are convenie...
{ "code_size": 1400, "language": "C++", "problem_id": "p03921", "submission_id": "s560426485" }
[ { "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:\nElection\nGiselle has just made a vote for a national election. In her countr...
{ "code_size": 3304, "language": "C++", "problem_id": "p01216", "submission_id": "s054088369" }
[ { "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\nMaking Perimeter of the Convex Hull Shortest\nThe convex hull of a set of thre...
{ "code_size": 5008, "language": "C++", "problem_id": "p00960", "submission_id": "s852300274" }
[ { "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": 1979, "language": "C", "problem_id": "p02365", "submission_id": "s777255583" }
[ { "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 tree\nT\nwith\nN\nvertices. The\ni\n-th edge connects Verte...
{ "code_size": 2809, "language": "C", "problem_id": "p02822", "submission_id": "s426384322" }
[ { "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\nblocks, numbered\n1, 2, \\ldots, N\n.\nFor each\ni\n(\n1...
{ "code_size": 644, "language": "C", "problem_id": "p03183", "submission_id": "s663317313" }
[ { "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\nThere are\nN\nstones, numbered\n1, 2, \\ldots, N\n.\nFor each\ni\n(\n1...
{ "code_size": 1954, "language": "C++", "problem_id": "p03185", "submission_id": "s833812409" }
[ { "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\nTakahashi, who is a novice in competitive programming, wants to learn\nM\nalgori...
{ "code_size": 987, "language": "C", "problem_id": "p02683", "submission_id": "s362099618" }
[ { "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\nIbis is fighting with a monster.\nThe\nhealth\nof the monster is\nH\n....
{ "code_size": 644, "language": "C", "problem_id": "p02787", "submission_id": "s743282399" }
[ { "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 three integers\nA\n,\nB\nand\nC\n. Find the minimum numb...
{ "code_size": 561, "language": "C", "problem_id": "p03387", "submission_id": "s022342220" }
[ { "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 Statement\nThere are\nN\nsquares arranged in a row, numbered\n1, 2, ..., N\nfrom ...
{ "code_size": 946, "language": "C", "problem_id": "p03017", "submission_id": "s774160029" }
[ { "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 Statement\nThere is an infinitely large triangular grid, as shown below.\nEach po...
{ "code_size": 5342, "language": "C", "problem_id": "p03115", "submission_id": "s696781003" }
[ { "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\nThere are some coins in the\nxy\n-plane.\nThe positions of the coins a...
{ "code_size": 6435, "language": "C", "problem_id": "p03225", "submission_id": "s513631861" }
[ { "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": "Kingdom of JOIOI\nThe Kingdom of JOIOI is a rectangular grid of $H \\times W$ cells. In t...
{ "code_size": 1845, "language": "C++", "problem_id": "p00561", "submission_id": "s530418155" }
[ { "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": "Grading\nWrite a program which reads a list of student test scores and evaluates the perf...
{ "code_size": 609, "language": "C++", "problem_id": "p02411", "submission_id": "s597002786" }
[ { "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:\n77377\nAt the risk of its future, International Cellular Phones Corporation (...
{ "code_size": 2411, "language": "C", "problem_id": "p00806", "submission_id": "s921867204" }
[ { "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 numbered\n1\nto\nN\n. Each person wears a red hat...
{ "code_size": 320, "language": "C", "problem_id": "p03080", "submission_id": "s937779690" }
[ { "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 playing a puzzle game.\nIn this game, you are given a rectang...
{ "code_size": 1637, "language": "C++", "problem_id": "p03685", "submission_id": "s620615162" }
[ { "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:\nHeadstrong Student\nYou are a teacher at a cram school for elementary school ...
{ "code_size": 477, "language": "C", "problem_id": "p01172", "submission_id": "s378903461" }
[ { "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 string\nS\nof length\nN\nconsisting of characters\n0\nand\n...
{ "code_size": 1495, "language": "C++", "problem_id": "p03859", "submission_id": "s848930568" }
[ { "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 going to open a contest named \"AtCoder\ns\nContest\".\nHere,...
{ "code_size": 149, "language": "C", "problem_id": "p03860", "submission_id": "s625689780" }
[ { "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": 1583, "language": "C++", "problem_id": "p03275", "submission_id": "s842696410" }
[ { "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 connected undirected simple graph, which has\nN\nverti...
{ "code_size": 1378, "language": "C", "problem_id": "p03746", "submission_id": "s310962379" }
[ { "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 letters\nb\n,\nd\n,\np\nand\n...
{ "code_size": 530, "language": "C", "problem_id": "p03889", "submission_id": "s670195270" }
[ { "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 Square\nGiven a matrix (\nH\n×\nW\n) which contains only 1 and 0, find the area o...
{ "code_size": 834, "language": "C++", "problem_id": "p02326", "submission_id": "s558885937" }
[ { "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 an integer sequence\nA\nof length\nN\n.\nHe will make three ...
{ "code_size": 1906, "language": "C", "problem_id": "p03310", "submission_id": "s578303634" }
[ { "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\nMr. Takahashi has a string\ns\nconsisting of lowercase English letters...
{ "code_size": 739, "language": "C++", "problem_id": "p03994", "submission_id": "s651596645" }
[ { "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\nOn a two-dimensional plane, there are\nm\nlines drawn parallel to the\...
{ "code_size": 519, "language": "C", "problem_id": "p03764", "submission_id": "s531374966" }
[ { "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 strings can be obtained by applying the following operation o...
{ "code_size": 1900, "language": "C++", "problem_id": "p02632", "submission_id": "s745102205" }
[ { "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": 516, "language": "C", "problem_id": "p03196", "submission_id": "s452043341" }
[ { "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\nWall Clocks\nYou are the manager of a chocolate sales team. Your team customar...
{ "code_size": 2053, "language": "C++", "problem_id": "p00938", "submission_id": "s064691928" }
[ { "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 with\nH\nrows and\nW\ncolumns. The square at the\ni\n-t...
{ "code_size": 822, "language": "C", "problem_id": "p03426", "submission_id": "s819122204" }
[ { "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": "Patisserie ACM\nAmber Claes Maes, a patissier, opened her own shop last month.\nShe deci...
{ "code_size": 4053, "language": "C++", "problem_id": "p00766", "submission_id": "s138938552" }
[ { "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 G:\nWalking Ant\nAnts are quite diligent. They sometimes build their nests beneat...
{ "code_size": 1176, "language": "C", "problem_id": "p00794", "submission_id": "s819440181" }
[ { "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\nswitches with \"on\" and \"off\" state, and\nM\nbulbs. The...
{ "code_size": 934, "language": "C", "problem_id": "p03031", "submission_id": "s326408202" }
[ { "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:\nCity Merger\nRecent improvements in information and communication technology ...
{ "code_size": 2008, "language": "C", "problem_id": "p00899", "submission_id": "s074534041" }
[ { "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 Statement\nSnuke has an empty sequence\na\n.\nHe will perform\nN\noperations on t...
{ "code_size": 651, "language": "C", "problem_id": "p03089", "submission_id": "s467365943" }
[ { "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 permutation\np_1,p_2,...,p_N\nconsisting of\n1\n,\n2\n...
{ "code_size": 392, "language": "C", "problem_id": "p03612", "submission_id": "s509578437" }
[ { "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\nirregular jigsaw pieces. Each piece is composed of three r...
{ "code_size": 8287, "language": "C", "problem_id": "p03669", "submission_id": "s066930823" }
[ { "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 an integer\nN\n. Determine if there exists a tuple of su...
{ "code_size": 678, "language": "C", "problem_id": "p03230", "submission_id": "s132882701" }
[ { "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": "Disc\nA mysterious device was discovered in an ancient ruin. The device consists of a dis...
{ "code_size": 1889, "language": "C", "problem_id": "p00385", "submission_id": "s462313398" }
[ { "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 price of a product before tax such that, when the consumption...
{ "code_size": 307, "language": "C", "problem_id": "p02755", "submission_id": "s483781684" }
[ { "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\nAkaki, a patissier, can make\nN\nkinds of doughnut using only a certai...
{ "code_size": 338, "language": "C", "problem_id": "p03370", "submission_id": "s282500595" }
[ { "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\n{\\rm comb}(n,r)\nbe the number of ways to choose\nr\nobjects fro...
{ "code_size": 960, "language": "C", "problem_id": "p03382", "submission_id": "s624457958" }
[ { "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": "Map: Search\nFor a dictionary $M$ that stores elements formed by a pair of a string key a...
{ "code_size": 1784, "language": "C", "problem_id": "p02459", "submission_id": "s520398257" }
[ { "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 call a string\nx\ngood\nif it satisfies the following conditio...
{ "code_size": 485, "language": "C", "problem_id": "p03769", "submission_id": "s579580434" }
[ { "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 I\nPrint all subsets of a set $S$, which contains $0, 1, ... n-1$ ...
{ "code_size": 576, "language": "C++", "problem_id": "p02427", "submission_id": "s287545414" }
[ { "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": "Do use segment tree\nGiven a tree with\nn\n(1 ≤ n ≤ 200,000)\nnodes and a list of\nq\n(1 ...
{ "code_size": 5753, "language": "C++", "problem_id": "p01564", "submission_id": "s376089807" }
[ { "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\npeople are arranged in a row from left to right.\nYou are given a s...
{ "code_size": 997, "language": "C", "problem_id": "p03074", "submission_id": "s360394696" }
[ { "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, Takahashi was given the following problem from Aoki:\nYou are...
{ "code_size": 2507, "language": "C++", "problem_id": "p03991", "submission_id": "s788187246" }
[ { "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": "Lower Bound\nFor a given sequence $A = \\{a_0, a_1, ..., a_{n-1}\\}$ which is sorted by a...
{ "code_size": 500, "language": "C++", "problem_id": "p02453", "submission_id": "s649070013" }
[ { "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": "Bridge Removal\nICPC islands once had been a popular tourist destination.\nFor nature pre...
{ "code_size": 1893, "language": "C++", "problem_id": "p00777", "submission_id": "s442559395" }
[ { "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 is going on a trip in a two-dimensional plane.\nIn h...
{ "code_size": 572, "language": "C", "problem_id": "p03457", "submission_id": "s442010222" }
[ { "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:\nYoung, Poor and Busy\nKen and Keiko are young, poor and busy. Short explanati...
{ "code_size": 5045, "language": "C++", "problem_id": "p00808", "submission_id": "s812748652" }
[ { "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 found an integer sequence\n(A_1,A_2,...,A_N)\nwith\nN\nterms...
{ "code_size": 3444, "language": "C++", "problem_id": "p03900", "submission_id": "s194946122" }
[ { "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:\nGalaxy Wide Web Service\nThe volume of access to a web service varies from ti...
{ "code_size": 1212, "language": "C++", "problem_id": "p01280", "submission_id": "s031911340" }
[ { "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 one biscuit and zero Japanese yen (the currency) in his pock...
{ "code_size": 595, "language": "C++", "problem_id": "p03131", "submission_id": "s643417278" }
[ { "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 large collection of cards. Each card has an integer betwee...
{ "code_size": 681, "language": "C++", "problem_id": "p04020", "submission_id": "s684571944" }
[ { "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:\nEarth Observation with a Mobile Robot Team\nA new type of mobile robot has be...
{ "code_size": 4203, "language": "C++", "problem_id": "p00720", "submission_id": "s438660868" }
[ { "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": "Problem Statement\nSnuke loves colorful balls. He has a total of\nN×K\nballs,\nK\nin each...
{ "code_size": 7018, "language": "C", "problem_id": "p04038", "submission_id": "s740359054" }
[ { "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": "Jigsaw Puzzles for Computers\nOrdinary Jigsaw puzzles are solved with visual hints;\nplay...
{ "code_size": 1326, "language": "C++", "problem_id": "p00697", "submission_id": "s383975842" }
[ { "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 Takahashi Kingdom, which once existed, there are\nN\ncities, and so...
{ "code_size": 1192, "language": "C", "problem_id": "p03600", "submission_id": "s921000313" }
[ { "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": "Selection of Participants of an Experiment\nDr. Tsukuba has devised a new method of progr...
{ "code_size": 503, "language": "C", "problem_id": "p01093", "submission_id": "s558932668" }
[ { "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": "The Number of Windows\nFor a given array $a_1, a_2, a_3, ... , a_N$ of $N$ elements and $...
{ "code_size": 872, "language": "C++", "problem_id": "p02356", "submission_id": "s712001350" }
[ { "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 giving cookies to his three goats.\nHe has two cookie tins. O...
{ "code_size": 207, "language": "C", "problem_id": "p03657", "submission_id": "s975863758" }
[ { "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 G:\nSearch of Concatenated Strings\nThe amount of information on the World Wide W...
{ "code_size": 1619, "language": "C++", "problem_id": "p00870", "submission_id": "s485306253" }
[ { "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 living on a number line.\nThe\ni\n-th person live...
{ "code_size": 550, "language": "C++", "problem_id": "p02767", "submission_id": "s076026806" }
[ { "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\npinholes on the\nxy\n-plane. The\ni\n-th pinhole is loca...
{ "code_size": 3096, "language": "C++", "problem_id": "p03858", "submission_id": "s935741092" }
[ { "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 a two-dimensional plane.\nThe coordinates of t...
{ "code_size": 2626, "language": "C", "problem_id": "p03882", "submission_id": "s408401360" }
[ { "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:\nSo Sleepy\nYou have an appointment to meet a friend of yours today, but you a...
{ "code_size": 3312, "language": "C++", "problem_id": "p01166", "submission_id": "s402474005" }
[ { "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 an integer sequence of length\nN\n,\na =\n{\na_1, a_2, …...
{ "code_size": 1334, "language": "C", "problem_id": "p03703", "submission_id": "s113880923" }
[ { "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\nNote the unusual memory limit.\nFor a rectangular grid where each squa...
{ "code_size": 2189, "language": "C++", "problem_id": "p03056", "submission_id": "s631638002" }
[ { "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\nballs. The\ni\n-th ball has an integer\nA_i\nwritten on it...
{ "code_size": 575, "language": "C", "problem_id": "p02732", "submission_id": "s442688913" }
[ { "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\nmen and\nN\nwomen, both numbered\n1, 2, \\ldots, N\n.\nF...
{ "code_size": 566, "language": "C", "problem_id": "p03174", "submission_id": "s164776488" }
[ { "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 have\nN\nitems and a bag of strength\nW\n.\nThe\ni\n-th item has a...
{ "code_size": 1380, "language": "C++", "problem_id": "p03734", "submission_id": "s137342571" }
[ { "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\nfriends of Takahashi has come to a theme park.\nTo ride the most po...
{ "code_size": 325, "language": "C++", "problem_id": "p02898", "submission_id": "s655718347" }
[ { "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": "Equal Range\nFor a given sequence $A = \\{a_0, a_1, ..., a_{n-1}\\}$ which is sorted by a...
{ "code_size": 1083, "language": "C", "problem_id": "p02454", "submission_id": "s769742213" }
[ { "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\nas input. This represents a valid date in t...
{ "code_size": 236, "language": "C", "problem_id": "p03109", "submission_id": "s249963588" }
[ { "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 circle. The\ni\n-th box contains\nA_...
{ "code_size": 812, "language": "C", "problem_id": "p03808", "submission_id": "s818902511" }
[ { "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 a user of a site that hosts programming contests.\nWhen a...
{ "code_size": 128, "language": "C++", "problem_id": "p03563", "submission_id": "s904122814" }
[ { "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 and Aoki are training for long-distance races in an infinite...
{ "code_size": 1788, "language": "C", "problem_id": "p02846", "submission_id": "s372836738" }
[ { "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 set consisting of\nN\ndistinct integers. The\ni\n-th smalle...
{ "code_size": 1657, "language": "C++", "problem_id": "p03823", "submission_id": "s012568228" }
[ { "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:\nWeather Forecast\nYou are the God of Wind.\nBy moving a big cloud around, you...
{ "code_size": 1660, "language": "C", "problem_id": "p00822", "submission_id": "s382449569" }
[ { "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": "0-1 Knapsack Problem\nYou have\nN\nitems that you want to put them into a knapsack. Item\...
{ "code_size": 630, "language": "C", "problem_id": "p02315", "submission_id": "s578223619" }
[ { "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" }