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": "Exact Arithmetic\nLet\nX\nbe a set of all rational numbers and all numbers of form\nq\n√\...
{ "code_size": 5123, "language": "C", "problem_id": "p01201", "submission_id": "s967715312" }
[ { "content": "You are a helpful coding 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": 938, "language": "C++", "problem_id": "p03791", "submission_id": "s126677174" }
[ { "content": "You are a helpful coding 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 three-digit positive integer\nN\n.\nDetermine whether\...
{ "code_size": 245, "language": "C++", "problem_id": "p03631", "submission_id": "s153724522" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem K: Rearranging Seats\nHaruna is a high school student.\nShe must remember the sea...
{ "code_size": 181, "language": "C", "problem_id": "p00657", "submission_id": "s835871074" }
[ { "content": "You are a helpful coding 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": 680, "language": "C", "problem_id": "p03309", "submission_id": "s753057597" }
[ { "content": "You are a helpful coding 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\nN\n.\nFind the minimum possible positive integer\...
{ "code_size": 2132, "language": "C++", "problem_id": "p02541", "submission_id": "s633257010" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "GCD and LCM\nWrite a program which computes the greatest common divisor (GCD) and the lea...
{ "code_size": 368, "language": "C", "problem_id": "p00005", "submission_id": "s306613398" }
[ { "content": "You are a helpful coding 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 Festival 2017 will be held in a tree with\nN\nvertices numbered\...
{ "code_size": 3072, "language": "C", "problem_id": "p03515", "submission_id": "s614063058" }
[ { "content": "You are a 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\nAtCoDeer the deer has\nN\nsquare tiles. The tiles are numbered\n1\nthr...
{ "code_size": 2843, "language": "C", "problem_id": "p03968", "submission_id": "s889979188" }
[ { "content": "You are a helpful coding 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\n3N\ncolored balls with IDs from\n1\nto\n3N\n.\nA string\nS\no...
{ "code_size": 1594, "language": "C", "problem_id": "p02940", "submission_id": "s693601880" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Circles Intersection\nYou are given circle $A$ with radius $r_a$ and with central coordin...
{ "code_size": 503, "language": "C", "problem_id": "p00023", "submission_id": "s680865113" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are\nN\nintegers,\nA_1, A_2, ..., A_N\n, arranged in a row in th...
{ "code_size": 708, "language": "C++", "problem_id": "p03062", "submission_id": "s374074811" }
[ { "content": "You are a helpful 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:\nSpace Coconut Crab II\nA space hunter, Ken Marineblue traveled the universe, ...
{ "code_size": 860, "language": "C++", "problem_id": "p01163", "submission_id": "s851351248" }
[ { "content": "You are a helpful coding 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 circular pond with a perimeter of\nK\nmeters, and\nN\nhouse...
{ "code_size": 425, "language": "C", "problem_id": "p02725", "submission_id": "s904871963" }
[ { "content": "You are a helpful coding 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": 591, "language": "C++", "problem_id": "p03659", "submission_id": "s987781228" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Story\nI am a Summoner who can invoke monsters. I can embody the pictures of monsters dra...
{ "code_size": 1319, "language": "C++", "problem_id": "p03985", "submission_id": "s905659944" }
[ { "content": "You are a helpful coding 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 (with different names) and\nK\nclubs. For each cl...
{ "code_size": 2584, "language": "C++", "problem_id": "p02674", "submission_id": "s024972851" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Trampoline\nA plurality of trampolines are arranged in a line at 10 m intervals. Each tra...
{ "code_size": 634, "language": "C", "problem_id": "p00357", "submission_id": "s965391580" }
[ { "content": "You are a helpful 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:\nCleaning Robot\nDr. Asimov, a robotics researcher, loves to research, but hat...
{ "code_size": 1156, "language": "C++", "problem_id": "p00606", "submission_id": "s200697262" }
[ { "content": "You are a helpful coding 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\nthrough\nN\n.\nThe\ni\n...
{ "code_size": 2007, "language": "C++", "problem_id": "p03358", "submission_id": "s842653978" }
[ { "content": "You are a helpful coding 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 received\notoshidama\n(New Year's money gifts) from\nN\nof h...
{ "code_size": 428, "language": "C++", "problem_id": "p03110", "submission_id": "s383245048" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Intersection\nFor given two segments\ns1\nand\ns2\n, print \"1\" if they are intersect, \...
{ "code_size": 2832, "language": "C++", "problem_id": "p02294", "submission_id": "s177427458" }
[ { "content": "You are a helpful coding 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": 1050, "language": "C", "problem_id": "p03498", "submission_id": "s243106843" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Twin Prime\nPrime numbers are widely applied for cryptographic and communication technolo...
{ "code_size": 446, "language": "C", "problem_id": "p00150", "submission_id": "s768841656" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nIroha has a sequence of\nN\nstrings\ns_1, s_2, ..., s_N\n.\nShe will c...
{ "code_size": 2041, "language": "C++", "problem_id": "p04042", "submission_id": "s487918235" }
[ { "content": "You are a helpful coding 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 Statement\nThere are\nN\npeople. The name of the\ni\n-th person is\nS_i\n.\nWe wo...
{ "code_size": 718, "language": "C", "problem_id": "p03425", "submission_id": "s809343463" }
[ { "content": "You are a helpful 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:\nSpherical Mirrors\nA long time ago in a galaxy, far, far away, there were N s...
{ "code_size": 3046, "language": "C++", "problem_id": "p00868", "submission_id": "s026708079" }
[ { "content": "You are a helpful 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:\nMake a Sequence\nYour company’s next product will be a new game, which is a t...
{ "code_size": 1908, "language": "C++", "problem_id": "p00828", "submission_id": "s296060546" }
[ { "content": "You are a helpful coding 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\ngemstones labeled\n1\nthrough\nN\n.\nYou can perform the f...
{ "code_size": 2338, "language": "C++", "problem_id": "p03553", "submission_id": "s505006417" }
[ { "content": "You are a helpful coding 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-ya\", a ramen restaurant, a bowl of ramen costs\n700\ny...
{ "code_size": 251, "language": "C++", "problem_id": "p03369", "submission_id": "s454581631" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Graph\nThere are two standard ways to represent a graph $G = (V, E)$, where $V$ is a set ...
{ "code_size": 547, "language": "C++", "problem_id": "p02237", "submission_id": "s471328926" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Longest Increasing Subsequence\nFor a given sequence\nA = {a\n0\n, a\n1\n, ... , a\nn-1\n...
{ "code_size": 704, "language": "C++", "problem_id": "p02317", "submission_id": "s402707698" }
[ { "content": "You are a helpful coding 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. Among the divisors of\nN!\n(= 1 \\times...
{ "code_size": 1176, "language": "C", "problem_id": "p03213", "submission_id": "s895049364" }
[ { "content": "You are a helpful coding 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": 383, "language": "C", "problem_id": "p03131", "submission_id": "s832941867" }
[ { "content": "You are a helpful 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:\nDirichlet's Theorem on Arithmetic Progressions\nGood evening, contestants.\nI...
{ "code_size": 677, "language": "C++", "problem_id": "p00722", "submission_id": "s590445043" }
[ { "content": "You are a helpful coding 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 two strings\nA = A_1 A_2 ... A_n\nand\nB = B_1 B_2 ... B_n\no...
{ "code_size": 2070, "language": "C++", "problem_id": "p03620", "submission_id": "s241836283" }
[ { "content": "You are a helpful 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:\nCubist Artwork\nInternational Center for Picassonian Cubism\nis a Spanish nat...
{ "code_size": 401, "language": "C", "problem_id": "p00874", "submission_id": "s613671274" }
[ { "content": "You are a helpful coding 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 grass field that stretches infinitely.\nIn this field, ther...
{ "code_size": 3819, "language": "C", "problem_id": "p02680", "submission_id": "s614956205" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "What Color Is The Universe?\nOn a clear night, a boy, Campanella looked up at the sky, th...
{ "code_size": 779, "language": "C", "problem_id": "p00594", "submission_id": "s713606827" }
[ { "content": "You are a 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: Union Ball\nProblem Statement\nThere are\nN\nballs in a box. The\ni\n-th ball is label...
{ "code_size": 451, "language": "C++", "problem_id": "p02088", "submission_id": "s707407282" }
[ { "content": "You are a helpful coding 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 will play a game using a piece on an array of squares number...
{ "code_size": 1698, "language": "C++", "problem_id": "p02585", "submission_id": "s506144483" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nProblem F and F2 are the same problem, but with different constraints ...
{ "code_size": 1915, "language": "C++", "problem_id": "p03236", "submission_id": "s530803453" }
[ { "content": "You are a helpful coding 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\nturkeys.\nWe number them from\n1\nthrough\nN\n.\nM\nmen ...
{ "code_size": 6437, "language": "C", "problem_id": "p03691", "submission_id": "s562090376" }
[ { "content": "You are a helpful coding 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 sequence\nA\nof length\nN\n.\nOn this sequence, we can perfo...
{ "code_size": 1785, "language": "C++", "problem_id": "p03522", "submission_id": "s682455223" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Bridges\nFind bridges of an undirected graph\nG(V, E)\n.\nA bridge (also known as a cut-e...
{ "code_size": 1814, "language": "C++", "problem_id": "p02367", "submission_id": "s540313168" }
[ { "content": "You are a helpful 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:\nLattice Practices\nOnce upon a time, there was a king who loved beautiful cos...
{ "code_size": 1118, "language": "C", "problem_id": "p00781", "submission_id": "s762701264" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nTakahashi loves gold coins. He gains\n1000\nhappiness points\nfor each...
{ "code_size": 194, "language": "C", "problem_id": "p02724", "submission_id": "s851499603" }
[ { "content": "You are a helpful 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:\nDriving an Icosahedral Rover\nAfter decades of fruitless efforts, one of the ...
{ "code_size": 2756, "language": "C++", "problem_id": "p00898", "submission_id": "s609354078" }
[ { "content": "You are a helpful coding 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 lives on the number line, is now at coordinate\nX\n. He...
{ "code_size": 743, "language": "C++", "problem_id": "p02584", "submission_id": "s553508161" }
[ { "content": "You are a helpful 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:\nDirectional Resemblance\nVectors have their directions and two vectors make a...
{ "code_size": 2173, "language": "C", "problem_id": "p00919", "submission_id": "s845436225" }
[ { "content": "You are a helpful coding 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 an\nN \\times N\ngrid. The square at the\ni\n-th row and...
{ "code_size": 3064, "language": "C++", "problem_id": "p03199", "submission_id": "s484346451" }
[ { "content": "You are a helpful coding 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": 758, "language": "C++", "problem_id": "p03966", "submission_id": "s191489393" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "I - The J-th Number\nProblem Statement\nYou are given\nN\nempty arrays,\nt_1, ..., t_n\n....
{ "code_size": 3064, "language": "C++", "problem_id": "p01675", "submission_id": "s920215278" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "B - Cube Coloring\nProblem Statement\nGreat painter Cubic is famous for using cubes for h...
{ "code_size": 1399, "language": "C++", "problem_id": "p01781", "submission_id": "s272746721" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nKen loves\nken-ken-pa\n(Japanese version of hopscotch). Today, he will...
{ "code_size": 2421, "language": "C", "problem_id": "p02991", "submission_id": "s435272789" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nFennec and Snuke are playing a board game.\nOn the board, there are\nN...
{ "code_size": 1976, "language": "C", "problem_id": "p03660", "submission_id": "s502077326" }
[ { "content": "You are a helpful coding 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\nsticks that are distinguishable from each other. The...
{ "code_size": 679, "language": "C", "problem_id": "p02888", "submission_id": "s698854553" }
[ { "content": "You are a helpful coding 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\nYou are given three integers\nA\n,\nB\nand\nC\n. Find the minimum numb...
{ "code_size": 597, "language": "C++", "problem_id": "p03387", "submission_id": "s037023912" }
[ { "content": "You are a helpful coding 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 tree with\nN\nvertices numbered\n1\nto\nN\n. The\ni\n-th edg...
{ "code_size": 3234, "language": "C++", "problem_id": "p02728", "submission_id": "s127435358" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Nets of Dice\nIn mathematics, some plain words have special meanings.\nThe word \"\nnet\n...
{ "code_size": 2131, "language": "C", "problem_id": "p00699", "submission_id": "s009992651" }
[ { "content": "You are a helpful coding 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\nballs in a two-dimensional plane. The\ni\n-th ball is at...
{ "code_size": 1046, "language": "C", "problem_id": "p03006", "submission_id": "s864028322" }
[ { "content": "You are a helpful 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:\nDeadly Dice Game\nT.I. Financial Group, a world-famous group of finance compa...
{ "code_size": 767, "language": "C", "problem_id": "p01253", "submission_id": "s979975539" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nRaccoon is fighting with a monster.\nThe\nhealth\nof the monster is\nH...
{ "code_size": 371, "language": "C++", "problem_id": "p02784", "submission_id": "s429618046" }
[ { "content": "You are a helpful coding 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 undirected connected graph with\nN\nvertices and\nM...
{ "code_size": 6497, "language": "C", "problem_id": "p03903", "submission_id": "s413513973" }
[ { "content": "You are a helpful coding 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": 687, "language": "C", "problem_id": "p03687", "submission_id": "s927606598" }
[ { "content": "You are a 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 Operation II\nGiven two non-negative decimal integers $a$ and $b$, calculate their AN...
{ "code_size": 656, "language": "C", "problem_id": "p02424", "submission_id": "s593669854" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Hit and Blow\nLet's play Hit and Blow game.\nA\nimagines four numbers and\nB\nguesses the...
{ "code_size": 450, "language": "C", "problem_id": "p00025", "submission_id": "s784774315" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nAkari has\nn\nkinds of flowers, one of each kind.\nShe is going to cho...
{ "code_size": 1402, "language": "C++", "problem_id": "p02768", "submission_id": "s357353337" }
[ { "content": "You are a helpful coding 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 from left to right. The\ni\n-th ...
{ "code_size": 929, "language": "C", "problem_id": "p03301", "submission_id": "s814982173" }
[ { "content": "You are a helpful 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:\nOperations with Finite Sets\nLet\nA, B, C, D, E\nbe sets of integers and let\...
{ "code_size": 2751, "language": "C++", "problem_id": "p00598", "submission_id": "s255246613" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nGiven are\nN\npositive integers\nA_1,...,A_N\n.\nConsider positive int...
{ "code_size": 1822, "language": "C", "problem_id": "p02793", "submission_id": "s686178494" }
[ { "content": "You are a helpful 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": "Problem Statement\nInfinite Chronicle -Princess Castle-\nis a simple role-playing game.\n...
{ "code_size": 1180, "language": "C++", "problem_id": "p01703", "submission_id": "s238097890" }
[ { "content": "You are a helpful coding 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\nchildren in AtCoder Kindergarten. Mr. Evi will arrange t...
{ "code_size": 147, "language": "C", "problem_id": "p04029", "submission_id": "s158927458" }
[ { "content": "You are a 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 Sort\nYou are given $n$ integers $w_i (i = 0, 1, ..., n-1)$ to be sorted in ...
{ "code_size": 1084, "language": "C++", "problem_id": "p02278", "submission_id": "s599217644" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Advanced Algorithm Class\nIn the advanced algorithm class, n\n2\nstudents sit in n rows a...
{ "code_size": 853, "language": "C", "problem_id": "p00591", "submission_id": "s916394839" }
[ { "content": "You are a helpful 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\nYou are given three words\ns_1\n,\ns_2\nand\ns_3\n, each composed of l...
{ "code_size": 292, "language": "C++", "problem_id": "p03737", "submission_id": "s704073385" }
[ { "content": "You are a helpful coding 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": 599, "language": "C++", "problem_id": "p03951", "submission_id": "s435142830" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThe server in company A has a structure where\nN\ndevices numbered\n1,...
{ "code_size": 2297, "language": "C++", "problem_id": "p03159", "submission_id": "s125765383" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nConstruct an\nN\n-gon that satisfies the following conditions:\nThe po...
{ "code_size": 5948, "language": "C", "problem_id": "p03886", "submission_id": "s682969052" }
[ { "content": "You are a helpful coding 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\nx\nthat is greater than or equal to\n0\n, and les...
{ "code_size": 140, "language": "C", "problem_id": "p02552", "submission_id": "s918181728" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Mode Value\nYour task is to write a program which reads a sequence of integers and prints...
{ "code_size": 373, "language": "C++", "problem_id": "p00028", "submission_id": "s132396951" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem K: Rearranging Seats\nHaruna is a high school student.\nShe must remember the sea...
{ "code_size": 246, "language": "C++", "problem_id": "p00657", "submission_id": "s037304776" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nGiven is an integer sequence\nA_1, ..., A_N\nof length\nN\n.\nWe will ...
{ "code_size": 1376, "language": "C++", "problem_id": "p02716", "submission_id": "s531919116" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Carry a Cheese\nJerry is a little mouse. He is trying to survive from the cat Tom. Jerry ...
{ "code_size": 462, "language": "C", "problem_id": "p00107", "submission_id": "s858806963" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nGiven are positive integers\nN\nand\nK\n.\nDetermine if the\n3N\ninteg...
{ "code_size": 1254, "language": "C++", "problem_id": "p02869", "submission_id": "s105124866" }
[ { "content": "You are a helpful 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\nStarting a Scenic Railroad Service\nJim, working for a railroad company, is re...
{ "code_size": 892, "language": "C", "problem_id": "p00965", "submission_id": "s341143621" }
[ { "content": "You are a helpful coding 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": 661, "language": "C++", "problem_id": "p03701", "submission_id": "s765140430" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nChelsea is a modern artist. She decided to make her next work with lad...
{ "code_size": 7474, "language": "C++", "problem_id": "p01654", "submission_id": "s881198953" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Coin Changing Problem\nFind the minimum number of coins to make change for\nn\ncents usin...
{ "code_size": 640, "language": "C++", "problem_id": "p02314", "submission_id": "s608434930" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThe\nABC number\nof a string\nT\nis the number of triples of integers\...
{ "code_size": 1048, "language": "C", "problem_id": "p03291", "submission_id": "s941806642" }
[ { "content": "You are a helpful coding 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": 1184, "language": "C++", "problem_id": "p03867", "submission_id": "s498740351" }
[ { "content": "You are a helpful coding 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 magician. He can cast a spell on an integer sequence\n(...
{ "code_size": 2685, "language": "C++", "problem_id": "p03902", "submission_id": "s671672833" }
[ { "content": "You are a helpful 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:\nCornering at Poles\nYou are invited to a robot contest. In the contest, you a...
{ "code_size": 7010, "language": "C++", "problem_id": "p00931", "submission_id": "s052178871" }
[ { "content": "You are a 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": 855, "language": "C++", "problem_id": "p02282", "submission_id": "s999620301" }
[ { "content": "You are a helpful coding 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 an integer sequence of length\nN\n:\na_1, a_2, ..., a_N\n.\nY...
{ "code_size": 1814, "language": "C++", "problem_id": "p03413", "submission_id": "s856010540" }