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\n2N\nballs,\nN\nwhite and\nN\nblack, arranged in a row. The ...
{ "code_size": 1542, "language": "C", "problem_id": "p03357", "submission_id": "s063030273" }
[ { "content": "You are a 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": 206, "language": "C", "problem_id": "p03035", "submission_id": "s054918413" }
[ { "content": "You are a 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:\nCubic Eight-Puzzle\nLet's play a puzzle using eight cubes placed on a 3 × 3 b...
{ "code_size": 2752, "language": "C++", "problem_id": "p00847", "submission_id": "s675782939" }
[ { "content": "You are a 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\nKenus, the organizer of\nInternational Euclidean Olympiad\n, is seekin...
{ "code_size": 1382, "language": "C++", "problem_id": "p03710", "submission_id": "s607730916" }
[ { "content": "You are a 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: Range Search\nFor a dictionary $M$ that stores elements formed by a pair of a string...
{ "code_size": 963, "language": "C++", "problem_id": "p02461", "submission_id": "s071092331" }
[ { "content": "You are a 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 member of a programming competition site,\nButCoder\n.\...
{ "code_size": 263, "language": "C++", "problem_id": "p02765", "submission_id": "s576587514" }
[ { "content": "You are a 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\nX+Y\nballs.\nX\nof them have an integer\nA\nwritten on them...
{ "code_size": 2029, "language": "C++", "problem_id": "p02656", "submission_id": "s210466358" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "F: Invariant Tree\nProblem Statement\nYou have a permutation\np_1, p_2, ... , p_N\nof int...
{ "code_size": 2207, "language": "C++", "problem_id": "p02093", "submission_id": "s495831675" }
[ { "content": "You are a 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\nSitting in a station waiting room, Joisino is gazing at her train tick...
{ "code_size": 744, "language": "C", "problem_id": "p03545", "submission_id": "s654083991" }
[ { "content": "You are a 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": 457, "language": "C++", "problem_id": "p02779", "submission_id": "s204103046" }
[ { "content": "You are a 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 long street that runs west to east, which we co...
{ "code_size": 1677, "language": "C++", "problem_id": "p03033", "submission_id": "s499629920" }
[ { "content": "You are a 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 directed graph with\nN\nvertices and\nM\nedges.\nThe v...
{ "code_size": 1527, "language": "C++", "problem_id": "p03414", "submission_id": "s560726327" }
[ { "content": "You are a 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:\ne-Market\nThe city of Hakodate recently established a commodity exchange mark...
{ "code_size": 2562, "language": "C", "problem_id": "p00804", "submission_id": "s521398605" }
[ { "content": "You are a 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\nTakahashi has a maze, which is a grid of\nH \\times W\nsquares with\nH...
{ "code_size": 1953, "language": "C", "problem_id": "p02803", "submission_id": "s407641131" }
[ { "content": "You are a 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:\nCards\nThere are many blue cards and red cards on the table.\nFor each card, ...
{ "code_size": 1235, "language": "C", "problem_id": "p00744", "submission_id": "s597951834" }
[ { "content": "You are a 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 array\na_0, a_1, ..., a_{N-1}\nof length\nN\n. Proces...
{ "code_size": 4361, "language": "C++", "problem_id": "p02568", "submission_id": "s974977666" }
[ { "content": "You are a 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\nA\n,\nB\nand\nC\n.\nSnuke wa...
{ "code_size": 571, "language": "C", "problem_id": "p03018", "submission_id": "s567402814" }
[ { "content": "You are a 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:\nStep Step Evolution\nJapanese video game company has developed the music vide...
{ "code_size": 1399, "language": "C++", "problem_id": "p01360", "submission_id": "s186399134" }
[ { "content": "You are a 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 wants a directed graph that satisfies the following ...
{ "code_size": 6988, "language": "C", "problem_id": "p03461", "submission_id": "s406791122" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Bubble Sort\nWrite a program of the Bubble Sort algorithm which sorts a sequence\nA\nin a...
{ "code_size": 519, "language": "C", "problem_id": "p02259", "submission_id": "s383103503" }
[ { "content": "You are a 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 in his room an art object with\nH\nrows and\nW\ncolu...
{ "code_size": 241, "language": "C", "problem_id": "p03960", "submission_id": "s039559722" }
[ { "content": "You are a 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 very long bench.\nThe bench is divided into\nM\nsections, w...
{ "code_size": 6074, "language": "C", "problem_id": "p03118", "submission_id": "s120403234" }
[ { "content": "You are a 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 lowercase English letters.\nD...
{ "code_size": 1967, "language": "C++", "problem_id": "p03483", "submission_id": "s825854820" }
[ { "content": "You are a 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 visiting a large electronics store to buy a refrigerator and a...
{ "code_size": 787, "language": "C++", "problem_id": "p02748", "submission_id": "s341999530" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "8 Puzzle\nThe goal of the 8 puzzle problem is to complete pieces on $3 \\times 3$ cells w...
{ "code_size": 1645, "language": "C++", "problem_id": "p02245", "submission_id": "s049696171" }
[ { "content": "You are a 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, AtCoDeer the deer found a simple graph (that is, a graph with...
{ "code_size": 2473, "language": "C++", "problem_id": "p03969", "submission_id": "s170646973" }
[ { "content": "You are a 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 Kingdom of AtCoder, only banknotes are used as currency. There ...
{ "code_size": 751, "language": "C", "problem_id": "p02775", "submission_id": "s738149026" }
[ { "content": "You are a 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:\nColored Octahedra\nA young boy John is playing with eight triangular panels. ...
{ "code_size": 1868, "language": "C", "problem_id": "p01287", "submission_id": "s126629937" }
[ { "content": "You are a 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 conducted a survey on newspaper subscriptions.\nMore specifically, ...
{ "code_size": 365, "language": "C++", "problem_id": "p03139", "submission_id": "s079119476" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Spreadsheet\nYour task is to perform a simple table calculation.\nWrite a program which r...
{ "code_size": 612, "language": "C", "problem_id": "p02413", "submission_id": "s265528026" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Max Score: $250$ Points\nProblem Statement\nSnuke has a very long calendar. It has a grid...
{ "code_size": 532, "language": "C", "problem_id": "p03929", "submission_id": "s102491619" }
[ { "content": "You are a 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 State of Takahashi in AtCoderian Federation, there are\nN\nciti...
{ "code_size": 1851, "language": "C++", "problem_id": "p03321", "submission_id": "s127801916" }
[ { "content": "You are a 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": 1952, "language": "C", "problem_id": "p02358", "submission_id": "s040980970" }
[ { "content": "You are a 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 always an integer in Takahashi's mind.\nInitially, the intege...
{ "code_size": 284, "language": "C++", "problem_id": "p03315", "submission_id": "s593456412" }
[ { "content": "You are a 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. Consider an infinite\nN\n-ary tree as s...
{ "code_size": 902, "language": "C++", "problem_id": "p03506", "submission_id": "s450070108" }
[ { "content": "You are a 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:\nSecret Operation\nMary Ice is a member of a spy group. She is about to carry ...
{ "code_size": 5475, "language": "C++", "problem_id": "p01292", "submission_id": "s322590905" }
[ { "content": "You are a 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 sequences\na\nand\nb\n, both of length\n2N\n. The\ni...
{ "code_size": 1931, "language": "C++", "problem_id": "p03519", "submission_id": "s829050256" }
[ { "content": "You are a 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 start with the number\n0\nand you want to reach the number\nN\n.\n...
{ "code_size": 1604, "language": "C++", "problem_id": "p02669", "submission_id": "s617840069" }
[ { "content": "You are a 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.\nThe squares are numbered\n1\...
{ "code_size": 1684, "language": "C++", "problem_id": "p03717", "submission_id": "s240109318" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Matrix Vector Multiplication\nWrite a program which reads a $ n \\times m$ matrix $A$ an...
{ "code_size": 488, "language": "C++", "problem_id": "p02410", "submission_id": "s562640415" }
[ { "content": "You are a 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 integers\na\nand\nb\n.\nDetermine if\na+b=15\nor\na\...
{ "code_size": 195, "language": "C", "problem_id": "p03302", "submission_id": "s005163505" }
[ { "content": "You are a 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:\nThe Devil of Gravity\nHaven't you ever thought that programs written in Java,...
{ "code_size": 2941, "language": "C++", "problem_id": "p00800", "submission_id": "s663240658" }
[ { "content": "You are a 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 graph which has even numbers of n...
{ "code_size": 1468, "language": "C", "problem_id": "p01648", "submission_id": "s283107537" }
[ { "content": "You are a 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 and Raccoon have a heap of\nN\ncards. The\ni\n-th card from the ...
{ "code_size": 494, "language": "C", "problem_id": "p03659", "submission_id": "s990015858" }
[ { "content": "You are a 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 will play a game on a tree.\nThe tree has\nN\nverti...
{ "code_size": 2319, "language": "C", "problem_id": "p03055", "submission_id": "s123571829" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Pilling Blocks\nWe make a tower by stacking up blocks. The tower consists of several stag...
{ "code_size": 361, "language": "C", "problem_id": "p00389", "submission_id": "s584626525" }
[ { "content": "You are a 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\nD_1, D_2, ..., D_N\nof length\nN\n.\nThe val...
{ "code_size": 1322, "language": "C++", "problem_id": "p03249", "submission_id": "s722449254" }
[ { "content": "You are a 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\nCODE FESTIVAL 2016 is going to be held. For the occasion, Mr. Takahash...
{ "code_size": 347, "language": "C++", "problem_id": "p03970", "submission_id": "s256258646" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Deciphering Characters\nImage data which are left by a mysterious syndicate were discover...
{ "code_size": 3298, "language": "C++", "problem_id": "p01098", "submission_id": "s361399435" }
[ { "content": "You are a 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:\nExpected Allowance\nHideyuki is allowed by his father Ujisato some 1000 yen b...
{ "code_size": 876, "language": "C++", "problem_id": "p00865", "submission_id": "s151344331" }
[ { "content": "You are a 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": 1253, "language": "C++", "problem_id": "p03602", "submission_id": "s284077911" }
[ { "content": "You are a 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": "p03121", "submission_id": "s610050350" }
[ { "content": "You are a 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\nP\n, a permutation of\n(1,\\ 2,\\ ...\\ N)\n.\nA string...
{ "code_size": 2289, "language": "C++", "problem_id": "p03235", "submission_id": "s162477446" }
[ { "content": "You are a 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\nlines in the\nxy\n-plane. The\ni\n-th line is represente...
{ "code_size": 2400, "language": "C++", "problem_id": "p03585", "submission_id": "s077524235" }
[ { "content": "You are a 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:\nJaggie Spheres\nLet\nJ\n(\nn\n) be a three-dimensional body that\nis a union ...
{ "code_size": 1921, "language": "C++", "problem_id": "p01217", "submission_id": "s905713615" }
[ { "content": "You are a 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\nprogrammers are going to participate in the preliminary stage of DD...
{ "code_size": 923, "language": "C", "problem_id": "p02856", "submission_id": "s507776464" }
[ { "content": "You are a 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 string\nS\nrepresenting the day of the week today.\nS\nis\n...
{ "code_size": 446, "language": "C", "problem_id": "p02847", "submission_id": "s481876655" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Set Intersection\nFind the intersection of two sets $A = \\{a_0, a_1, ..., a_{n-1}\\}$ an...
{ "code_size": 743, "language": "C", "problem_id": "p02464", "submission_id": "s645645524" }
[ { "content": "You are a 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(A, B)\n, where\nA\nand\nB\nare positive integers, be the string...
{ "code_size": 6953, "language": "C", "problem_id": "p03466", "submission_id": "s882737114" }
[ { "content": "You are a 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:\nOne-Dimensional Cellular Automaton\nThere is a one-dimensional cellular autom...
{ "code_size": 1804, "language": "C", "problem_id": "p00906", "submission_id": "s639217125" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Diameter of a Convex Polygon\nFind the diameter of a convex polygon\ng\n. In other words,...
{ "code_size": 2528, "language": "C", "problem_id": "p02301", "submission_id": "s666169786" }
[ { "content": "You are a 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:\nSort the Panels\nThere was an explorer Henry Nelson traveling all over the wo...
{ "code_size": 2201, "language": "C", "problem_id": "p01164", "submission_id": "s334762442" }
[ { "content": "You are a 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 cave.\nThe cave has\nN\nrooms and\nM\npassages. The rooms a...
{ "code_size": 1716, "language": "C", "problem_id": "p02678", "submission_id": "s908147050" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Ninja Map\nIntersections of Crossing Path City are aligned to a grid. There are $N$ east-...
{ "code_size": 1881, "language": "C++", "problem_id": "p01947", "submission_id": "s045856992" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Flag\nAHK Education, the educational program section of Aizu Broadcasting Cooperation, br...
{ "code_size": 604, "language": "C", "problem_id": "p00363", "submission_id": "s301817717" }
[ { "content": "You are a 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 country there are\nN\ncities numbered\n1\nthrough\nN\n, which a...
{ "code_size": 2047, "language": "C++", "problem_id": "p03941", "submission_id": "s377668306" }
[ { "content": "You are a 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\nBased on some criterion, Snuke divided the integers from\n1\nthrough\n...
{ "code_size": 495, "language": "C++", "problem_id": "p03711", "submission_id": "s462318151" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Triangle\nFor given two sides of a triangle\na\nand\nb\nand the angle\nC\nbetween them, c...
{ "code_size": 395, "language": "C++", "problem_id": "p02380", "submission_id": "s495045534" }
[ { "content": "You are a 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 a total of\nA + B\ncats and dogs.\nAmong them,\nA\nare known...
{ "code_size": 246, "language": "C++", "problem_id": "p03377", "submission_id": "s351524606" }
[ { "content": "You are a 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 integer sequence\nA\nof length\nN\n.\nFind the number of t...
{ "code_size": 575, "language": "C", "problem_id": "p03342", "submission_id": "s390563716" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Equilateral Triangular Fence\nMs. Misumi owns an orchard along a straight road.\nRecently...
{ "code_size": 2247, "language": "C++", "problem_id": "p01114", "submission_id": "s952785002" }
[ { "content": "You are a 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\\mathrm{popcount}(n)\nbe the number of\n1\ns in the binary repre...
{ "code_size": 1359, "language": "C", "problem_id": "p02609", "submission_id": "s618094363" }
[ { "content": "You are a 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": "Problem Statement\nTakahashi has two positive integers\nA\nand\nB\n.\nIt is known that\nA...
{ "code_size": 388, "language": "C", "problem_id": "p03331", "submission_id": "s559910824" }
[ { "content": "You are a 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\nConsider writing each of the integers from\n1\nto\nN \\times M\nin a g...
{ "code_size": 1707, "language": "C", "problem_id": "p03152", "submission_id": "s445435054" }
[ { "content": "You are a 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:\nDivisor is the Conqueror\nDivisor is the Conquerer\nis a solitaire card game....
{ "code_size": 1265, "language": "C", "problem_id": "p01151", "submission_id": "s428814930" }
[ { "content": "You are a 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 string\nS\nconsisting of uppercase English letters. Addition...
{ "code_size": 290, "language": "C", "problem_id": "p02848", "submission_id": "s621257335" }
[ { "content": "You are a 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 conducting an optical experiment using mirrors and his new in...
{ "code_size": 524, "language": "C++", "problem_id": "p04048", "submission_id": "s778106031" }
[ { "content": "You are a 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\nlocked treasure boxes, numbered\n1\nto\nN\n.\nA shop sells...
{ "code_size": 789, "language": "C", "problem_id": "p02901", "submission_id": "s074011146" }
[ { "content": "You are a 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 three tasks, all of which need to be completed.\nFirst, you c...
{ "code_size": 333, "language": "C++", "problem_id": "p03292", "submission_id": "s068625846" }
[ { "content": "You are a 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:\nDr. Podboq or: How We Became Asymmetric\nAfter long studying how embryos of o...
{ "code_size": 2963, "language": "C++", "problem_id": "p00733", "submission_id": "s989619540" }
[ { "content": "You are a 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:\nFibonacci Sets\nFibonacci number\nf\n(\ni\n) appear in a variety of puzzles i...
{ "code_size": 860, "language": "C++", "problem_id": "p00602", "submission_id": "s160924464" }
[ { "content": "You are a 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 CODE FESTIVAL XXXX, there are\nN+1\nparticipants from all over the ...
{ "code_size": 3685, "language": "C", "problem_id": "p03535", "submission_id": "s835431252" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Weighted Union Find Trees\nThere is a sequence $A = a_0, a_1, ..., a_{n-1}$. You are give...
{ "code_size": 1265, "language": "C", "problem_id": "p02344", "submission_id": "s561412645" }
[ { "content": "You are a 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\nTaichi thinks a binary string\nX\nof odd length\nN\nis\nbeautiful\nif ...
{ "code_size": 1170, "language": "C++", "problem_id": "p03397", "submission_id": "s791498341" }
[ { "content": "You are a 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\nnon-negative integers written on a blackboard. The\ni\n-...
{ "code_size": 1911, "language": "C", "problem_id": "p03562", "submission_id": "s031605597" }
[ { "content": "You are a 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:\nTwirl Around\nLet's think about a bar rotating clockwise as if it were a\ntwi...
{ "code_size": 6455, "language": "C++", "problem_id": "p00732", "submission_id": "s109027226" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Balls and Boxes 10\nBalls\nBoxes\nAny way\nAt most one ball\nAt least one ball\nDistingui...
{ "code_size": 1671, "language": "C++", "problem_id": "p02340", "submission_id": "s887320564" }
[ { "content": "You are a 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 Mart, a convenience store, sells apple juice.\nOn the opening da...
{ "code_size": 1020, "language": "C++", "problem_id": "p03297", "submission_id": "s518783357" }
[ { "content": "You are a 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\ntowns numbered\n1\nto\nN\nand\nM\nroads. The\ni\n-th roa...
{ "code_size": 1735, "language": "C++", "problem_id": "p02889", "submission_id": "s463620476" }
[ { "content": "You are a 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": 595, "language": "C", "problem_id": "p03168", "submission_id": "s551640046" }
[ { "content": "You are a 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\nN\nmonsters...
{ "code_size": 918, "language": "C++", "problem_id": "p03702", "submission_id": "s463352151" }
[ { "content": "You are a 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:\nLying about Your Age\nYou have moved to a new town. As starting a new life, y...
{ "code_size": 1139, "language": "C", "problem_id": "p01168", "submission_id": "s375857371" }
[ { "content": "You are a 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\nclocks. The hand of the\ni\n-th clock\n(1≤i≤N)\nrotates th...
{ "code_size": 471, "language": "C", "problem_id": "p03633", "submission_id": "s855697385" }
[ { "content": "You are a 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: The House of Huge Family\nMr. Dango's family has an extremely huge number of m...
{ "code_size": 2362, "language": "C++", "problem_id": "p00650", "submission_id": "s016613167" }
[ { "content": "You are a 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\nLa Confiserie d'ABC\nsells cakes at\n4\ndollars each and doughnuts at\...
{ "code_size": 378, "language": "C++", "problem_id": "p03285", "submission_id": "s443656384" }
[ { "content": "You are a 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\nSqueeze the Cylinders\nLaid on the flat ground in the stockyard are a number o...
{ "code_size": 848, "language": "C++", "problem_id": "p00936", "submission_id": "s882448866" }
[ { "content": "You are a 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:\nTwirling Robot\nLet's play a game using a robot on a rectangular board\ncover...
{ "code_size": 2508, "language": "C", "problem_id": "p00737", "submission_id": "s981463659" }