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 A:\nInfnity Maze\nDr. Fukuoka has placed a simple robot in a two-dimensional maze...
{ "code_size": 1058, "language": "C", "problem_id": "p01437", "submission_id": "s295084133" }
[ { "content": "You are a helpful 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 Statement\nGiven an integer\nN\n, find the base\n-2\nrepresentation of\nN\n.\nHer...
{ "code_size": 462, "language": "C", "problem_id": "p03286", "submission_id": "s612205773" }
[ { "content": "You are a helpful 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:\nDig or Climb\nBenjamin Forest VIII is a king of a country. One of his best fr...
{ "code_size": 3599, "language": "C", "problem_id": "p01173", "submission_id": "s053374278" }
[ { "content": "You are a helpful 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 participating in a programming contest, AXC001. He has ju...
{ "code_size": 234, "language": "C++", "problem_id": "p02789", "submission_id": "s697144156" }
[ { "content": "You are a helpful 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\nhotels are located on a straight line. The coordinate of the\ni\n-t...
{ "code_size": 1074, "language": "C", "problem_id": "p04017", "submission_id": "s874552154" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are\nN\nboxes arranged in a row.\nInitially, the\ni\n-th box fro...
{ "code_size": 456, "language": "C", "problem_id": "p03862", "submission_id": "s722825693" }
[ { "content": "You are a helpful 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\nof length\nN\n.\nFind the maximum length of a no...
{ "code_size": 660, "language": "C", "problem_id": "p02913", "submission_id": "s813482204" }
[ { "content": "You are a helpful 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, Niwango-kun, an employee of Dwango Co., Ltd., found an intege...
{ "code_size": 1073, "language": "C", "problem_id": "p03215", "submission_id": "s013552371" }
[ { "content": "You are a helpful 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 that can be obtained by concatenating two equal ...
{ "code_size": 1661, "language": "C++", "problem_id": "p03678", "submission_id": "s445400135" }
[ { "content": "You are a helpful 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 freely choo...
{ "code_size": 706, "language": "C++", "problem_id": "p03311", "submission_id": "s034931237" }
[ { "content": "You are a 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 Sum Sequence\nGiven a sequence of numbers\na\n1\n,\na\n2\n,\na\n3\n, ...,\na\nn\n...
{ "code_size": 480, "language": "C++", "problem_id": "p00022", "submission_id": "s563625247" }
[ { "content": "You are a helpful 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\nbamboos. The lengths (in centimeters) of these are\nl_1, ...
{ "code_size": 1139, "language": "C++", "problem_id": "p03111", "submission_id": "s027755416" }
[ { "content": "You are a helpful 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 maze which can be described as a\nW \\times H\ngrid.\nThe u...
{ "code_size": 2640, "language": "C++", "problem_id": "p01650", "submission_id": "s993766872" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Minimum Spanning Tree\nFind the sum of weights of edges of the Minimum Spanning Tree for ...
{ "code_size": 1629, "language": "C++", "problem_id": "p02364", "submission_id": "s172945783" }
[ { "content": "You are a helpful 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": "Problem Statement\nThere are\nN(N+1)/2\ndots arranged to form an equilateral triangle who...
{ "code_size": 1392, "language": "C++", "problem_id": "p03670", "submission_id": "s993815070" }
[ { "content": "You are a helpful 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": 763, "language": "C", "problem_id": "p02748", "submission_id": "s154443776" }
[ { "content": "You are a helpful 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\n2000001\nstones placed on a number line. The coordinates of...
{ "code_size": 192, "language": "C", "problem_id": "p02946", "submission_id": "s330244395" }
[ { "content": "You are a helpful 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:\nFull Text Search\nMr. Don is an administrator of a famous quiz website named ...
{ "code_size": 2363, "language": "C++", "problem_id": "p01441", "submission_id": "s859214425" }
[ { "content": "You are a helpful 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": 1880, "language": "C", "problem_id": "p03685", "submission_id": "s363538262" }
[ { "content": "You are a helpful 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 play a one-player game using a number line and\nN\npieces.\nFi...
{ "code_size": 695, "language": "C", "problem_id": "p03137", "submission_id": "s240763693" }
[ { "content": "You are a helpful 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+1\ntowns. The\ni\n-th town is being attacked by\nA_i\nmon...
{ "code_size": 618, "language": "C", "problem_id": "p02959", "submission_id": "s989024916" }
[ { "content": "You are a helpful 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 to take the entrance examination of Kyoto University tom...
{ "code_size": 2134, "language": "C++", "problem_id": "p03981", "submission_id": "s765296630" }
[ { "content": "You are a helpful 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 formula consisting of\nN\nterms:\nA_1\nop_1\nA_2\n...\no...
{ "code_size": 798, "language": "C", "problem_id": "p03850", "submission_id": "s071768960" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Dice I\nWrite a program to simulate rolling a dice, which can be constructed by the follo...
{ "code_size": 997, "language": "C", "problem_id": "p02383", "submission_id": "s913049452" }
[ { "content": "You are a helpful 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\npalindromic numbers\namong the integers between\nA...
{ "code_size": 389, "language": "C++", "problem_id": "p03416", "submission_id": "s637060509" }
[ { "content": "You are a helpful 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": 3847, "language": "C", "problem_id": "p03536", "submission_id": "s503448535" }
[ { "content": "You are a helpful 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, Bob and Charlie are playing\nCard Game for Three\n, as below:\n...
{ "code_size": 816, "language": "C++", "problem_id": "p03998", "submission_id": "s346671297" }
[ { "content": "You are a helpful 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": 1098, "language": "C++", "problem_id": "p03224", "submission_id": "s356983857" }
[ { "content": "You are a helpful 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+1\ntowns. The\ni\n-th town is being attacked by\nA_i\nmon...
{ "code_size": 738, "language": "C++", "problem_id": "p02959", "submission_id": "s760460309" }
[ { "content": "You are a helpful 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.\nYou have to guess a secret password\nS\n...
{ "code_size": 1278, "language": "C", "problem_id": "p02672", "submission_id": "s896836555" }
[ { "content": "You are a helpful 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 and his friend TopCoDeer is playing a game.\nThe gam...
{ "code_size": 627, "language": "C++", "problem_id": "p03967", "submission_id": "s308515817" }
[ { "content": "You are a helpful 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\nHaiku is a short form of Japanese poetry. A Haiku consists of three ph...
{ "code_size": 1498, "language": "C++", "problem_id": "p04041", "submission_id": "s865019488" }
[ { "content": "You are a helpful 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:\nReaction\nYou are a hero of a role playing game, asked by the king to defeat ...
{ "code_size": 2711, "language": "C++", "problem_id": "p01263", "submission_id": "s495706224" }
[ { "content": "You are a helpful 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\nof length\n2N\nconsisting of lowercase Engl...
{ "code_size": 1259, "language": "C++", "problem_id": "p03298", "submission_id": "s029452586" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nGiven is an integer\nS\n.\nFind how many sequences there are whose ter...
{ "code_size": 527, "language": "C", "problem_id": "p02555", "submission_id": "s209684011" }
[ { "content": "You are a helpful 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 play with a six-sided die. Each of its six sides ...
{ "code_size": 251, "language": "C", "problem_id": "p03815", "submission_id": "s072650083" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem I:\nOperator\nThe customer telephone support center of the computer sales company...
{ "code_size": 1060, "language": "C", "problem_id": "p01367", "submission_id": "s660407400" }
[ { "content": "You are a helpful 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. There are also\nK\nroads and\nL\nrailways, exten...
{ "code_size": 1869, "language": "C", "problem_id": "p03857", "submission_id": "s493046095" }
[ { "content": "You are a helpful 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 integer sequences\nA_1,A_2,\\ldots,A_N\nof length\nN\nsatisfy...
{ "code_size": 927, "language": "C++", "problem_id": "p02554", "submission_id": "s512845031" }
[ { "content": "You are a helpful 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:\nHit and Blow\nHit and blow\nis a popular code-breaking game played by two peo...
{ "code_size": 2055, "language": "C++", "problem_id": "p01207", "submission_id": "s531325070" }
[ { "content": "You are a 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\nThis is an interactive task.\nAtCoDeer the deer came across\nN\npeople...
{ "code_size": 379, "language": "C", "problem_id": "p03784", "submission_id": "s812911757" }
[ { "content": "You are a helpful 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 developing frog-shaped robots, and decided to race them agains...
{ "code_size": 500, "language": "C", "problem_id": "p03791", "submission_id": "s333974678" }
[ { "content": "You are a helpful 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:\nHanafuda Shuffle\nThere are a number of ways to shuffle a deck of cards. Ha...
{ "code_size": 579, "language": "C", "problem_id": "p00710", "submission_id": "s995138781" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "J - Unfair Game\nProblem Statement\nRabbit Hanako and Fox Jiro are great friends going to...
{ "code_size": 980, "language": "C++", "problem_id": "p01789", "submission_id": "s728956391" }
[ { "content": "You are a helpful 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:\nNeko's Treasure\nMaki is a house cat. One day she fortunately came at a wonde...
{ "code_size": 2490, "language": "C++", "problem_id": "p01299", "submission_id": "s160488138" }
[ { "content": "You are a helpful 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\nHaving learned the multiplication table, Takahashi can multiply two in...
{ "code_size": 305, "language": "C", "problem_id": "p02880", "submission_id": "s431667564" }
[ { "content": "You are a helpful 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\nN\nintegers\nA_1, \\ldots, A_N\n.\nFind the (m...
{ "code_size": 370, "language": "C++", "problem_id": "p02934", "submission_id": "s625437131" }
[ { "content": "You are a helpful 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 going to together construct a sequence of integ...
{ "code_size": 6714, "language": "C", "problem_id": "p03867", "submission_id": "s717941832" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Reconstruction of a Tree\nWrite a program which reads two sequences of nodes obtained by ...
{ "code_size": 702, "language": "C", "problem_id": "p02282", "submission_id": "s908281026" }
[ { "content": "You are a helpful 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 game that involves three variables, denoted\nA\n,\nB\n, and...
{ "code_size": 2075, "language": "C", "problem_id": "p02692", "submission_id": "s226309090" }
[ { "content": "You are a helpful 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 tree with\nN\nvertices, numbered\n1, 2, \\ldots, N\n.\nFor ...
{ "code_size": 2170, "language": "C++", "problem_id": "p03181", "submission_id": "s854547827" }
[ { "content": "You are a helpful 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\nFind the minimum prime number greater than or equal to\nX\n.\nNotes\nA...
{ "code_size": 382, "language": "C", "problem_id": "p02819", "submission_id": "s591391139" }
[ { "content": "You are a helpful 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 candies on the table. The piles are numbered\n1...
{ "code_size": 5600, "language": "C", "problem_id": "p04037", "submission_id": "s022197031" }
[ { "content": "You are a helpful 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\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 Statement\nWe have a two-dimensional grid with\nH \\times W\nsquares. There are\n...
{ "code_size": 1650, "language": "C", "problem_id": "p02580", "submission_id": "s506578521" }
[ { "content": "You are a helpful 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 seeing a quick report of election results on TV.\...
{ "code_size": 575, "language": "C", "problem_id": "p03964", "submission_id": "s675365365" }
[ { "content": "You are a helpful 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\npoints in a two-dimensional plane. The initial coordinat...
{ "code_size": 2525, "language": "C++", "problem_id": "p03004", "submission_id": "s323688059" }
[ { "content": "You are a helpful 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 a grid with\nH\nrows and\nW\ncolumns of squares. Let\n(r, c)\...
{ "code_size": 1107, "language": "C", "problem_id": "p02735", "submission_id": "s054630247" }
[ { "content": "You are a helpful 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\nDecades have passed since the beginning of AtCoder Beginner Contest.\n...
{ "code_size": 149, "language": "C", "problem_id": "p03327", "submission_id": "s889401121" }
[ { "content": "You are a helpful 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 board with\nH\nhorizontal rows and\nW\nvertical columns of s...
{ "code_size": 285, "language": "C", "problem_id": "p02742", "submission_id": "s977858439" }
[ { "content": "You are a helpful 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\n0\nand\n1\n.\nFind the maxim...
{ "code_size": 388, "language": "C", "problem_id": "p03480", "submission_id": "s541357563" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Parallel/Orthogonal\nFor given two lines\ns1\nand\ns2\n, print \"2\" if they are parallel...
{ "code_size": 746, "language": "C", "problem_id": "p02293", "submission_id": "s622371498" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Baseball Simulation\nIchiro likes baseball and has decided to write a program which simul...
{ "code_size": 694, "language": "C++", "problem_id": "p00103", "submission_id": "s344816512" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Strongly Connected Components\nA direced graph is strongly connected if every two nodes a...
{ "code_size": 1908, "language": "C", "problem_id": "p02368", "submission_id": "s635574482" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nFind the sum of the integers between\n1\nand\nN\n(inclusive), whose su...
{ "code_size": 427, "language": "C++", "problem_id": "p03478", "submission_id": "s910868576" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Go around the Labyrinth\nExplorer Taro got a floor plan of a labyrinth.\nThe floor of thi...
{ "code_size": 2244, "language": "C++", "problem_id": "p01107", "submission_id": "s841924201" }
[ { "content": "You are a helpful 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\nA\n500\n-yen coins,\nB\n100\n-yen coins and\nC\n50\n-yen coi...
{ "code_size": 402, "language": "C++", "problem_id": "p03448", "submission_id": "s683725467" }
[ { "content": "You are a helpful 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:\nMobile Computing\nThere is a mysterious planet called Yaen, whose space is 2-...
{ "code_size": 1421, "language": "C", "problem_id": "p00840", "submission_id": "s895136487" }
[ { "content": "You are a helpful 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 the following game:\nThe game is played using a row of\nN\nsq...
{ "code_size": 1457, "language": "C++", "problem_id": "p03539", "submission_id": "s889539061" }
[ { "content": "You are a helpful 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 lot of red and blue bricks and a large box.\nShe will bu...
{ "code_size": 1146, "language": "C++", "problem_id": "p03748", "submission_id": "s587995608" }
[ { "content": "You are a 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 Statement\nSnuke can change a string\nt\nof length\nN\ninto a string\nt'\nof leng...
{ "code_size": 937, "language": "C++", "problem_id": "p03687", "submission_id": "s160636509" }
[ { "content": "You are a helpful 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:\nCount the Regions\nThere are a number of rectangles on the\nx-y\nplane. The f...
{ "code_size": 2455, "language": "C", "problem_id": "p00916", "submission_id": "s454019170" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Celsius/Fahrenheit\nIn Japan, temperature is usually expressed using the Celsius (℃) scal...
{ "code_size": 110, "language": "C", "problem_id": "p00375", "submission_id": "s550282566" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nTakahashi loves numbers divisible by\n2\n.\nYou are given a positive i...
{ "code_size": 371, "language": "C++", "problem_id": "p03644", "submission_id": "s349112858" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Debt Hell\nYour friend who lives in undisclosed country is involved in debt. He is borrow...
{ "code_size": 269, "language": "C++", "problem_id": "p00007", "submission_id": "s640391785" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Bit Flag\nA state with $n$ flags of ON or OFF can be represented by a sequence of bits wh...
{ "code_size": 1700, "language": "C", "problem_id": "p02425", "submission_id": "s080545545" }
[ { "content": "You are a helpful 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\nconsisting of digits from\n1\nthrough\n9\n.\nFin...
{ "code_size": 594, "language": "C", "problem_id": "p02702", "submission_id": "s613458500" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are\nN\npeople, conveniently numbered\n1\nthrough\nN\n.\nWe want...
{ "code_size": 1889, "language": "C++", "problem_id": "p03832", "submission_id": "s018218687" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Parentheses Editor\nYou are working with a strange text editor for texts consisting only ...
{ "code_size": 1589, "language": "C++", "problem_id": "p00986", "submission_id": "s148590801" }
[ { "content": "You are a 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": 317, "language": "C", "problem_id": "p02439", "submission_id": "s492356559" }
[ { "content": "You are a helpful 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 four integers:\nH\n,\nW\n,\nh\nand\nw\n(\n1 ≤ h ≤ H\n,\n...
{ "code_size": 1038, "language": "C++", "problem_id": "p03689", "submission_id": "s382729541" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Card Game\nTaro and Hanako are playing card games. They have\nn\ncards each, and they com...
{ "code_size": 482, "language": "C", "problem_id": "p02421", "submission_id": "s994840028" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem I:\nIntersection of Two Prisms\nSuppose that\nP\n1\nis an infinite-height prism w...
{ "code_size": 1818, "language": "C", "problem_id": "p00892", "submission_id": "s879144789" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Heat Stroke\nWe have had record hot temperatures this summer. To avoid heat stroke, you d...
{ "code_size": 449, "language": "C++", "problem_id": "p00378", "submission_id": "s099506307" }
[ { "content": "You are a helpful 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": 1569, "language": "C", "problem_id": "p01280", "submission_id": "s898008349" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "A Garden with Ponds\nMr. Gardiner is a modern garden designer who is excellent at utilizi...
{ "code_size": 1481, "language": "C", "problem_id": "p01103", "submission_id": "s740819573" }
[ { "content": "You are a helpful 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 built an online judge to hold a programming contest.\nWhen a pro...
{ "code_size": 278, "language": "C", "problem_id": "p03567", "submission_id": "s714439553" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Extended Euclid Algorithm\nGiven positive integers\na\nand\nb\n, find the integer solutio...
{ "code_size": 618, "language": "C", "problem_id": "p02471", "submission_id": "s766394456" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Almost Identical Programs\nThe programming contest named\nConcours de Programmation Comte...
{ "code_size": 1432, "language": "C++", "problem_id": "p01102", "submission_id": "s958913614" }
[ { "content": "You are a helpful 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\n, of length\nN\n. The\ni\n-th eleme...
{ "code_size": 1239, "language": "C", "problem_id": "p03496", "submission_id": "s254888264" }
[ { "content": "You are a helpful 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": 262, "language": "C++", "problem_id": "p03564", "submission_id": "s965728916" }
[ { "content": "You are a helpful 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 wants to gain muscle, and decides to work out at AtCoder Gym...
{ "code_size": 374, "language": "C", "problem_id": "p03680", "submission_id": "s491593833" }
[ { "content": "You are a helpful 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\nAn\nX\n-layered kagami mochi\n(X ≥ 1)\nis a pile of\nX\nround mochi (r...
{ "code_size": 368, "language": "C++", "problem_id": "p03470", "submission_id": "s241549094" }
[ { "content": "You are a helpful 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\nN\nred points and\nN\nblue poin...
{ "code_size": 1239, "language": "C++", "problem_id": "p03409", "submission_id": "s956520870" }