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\nTakahashi will take part in an eating contest. Teams of\nN\nmembers wi...
{ "code_size": 1066, "language": "C", "problem_id": "p02883", "submission_id": "s944431115" }
[ { "content": "You are a helpful coding 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 is working as a receptionist at a theater.\nThe theater has\n1...
{ "code_size": 226, "language": "C", "problem_id": "p03606", "submission_id": "s915427117" }
[ { "content": "You are a helpful coding 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 some other world, today is Christmas.\nMr. Takaha decides to make a...
{ "code_size": 683, "language": "C", "problem_id": "p03209", "submission_id": "s667351126" }
[ { "content": "You are a helpful coding 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": 178, "language": "C++", "problem_id": "p04029", "submission_id": "s614249394" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Sale Result\nThere is data on sales of your company. Your task is to write a program whic...
{ "code_size": 732, "language": "C++", "problem_id": "p00100", "submission_id": "s833608977" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nCompute\nA \\times B\n.\nConstraints\n1 \\leq A \\leq 100\n1 \\leq B \...
{ "code_size": 113, "language": "C", "problem_id": "p02657", "submission_id": "s322218314" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "C - Decoding Ancient Messages\nProblem Statement\nProfessor Y's work is to dig up ancient...
{ "code_size": 3665, "language": "C++", "problem_id": "p01782", "submission_id": "s075451542" }
[ { "content": "You are a helpful coding 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 standing in a queue from west to east.\nGiven is ...
{ "code_size": 504, "language": "C", "problem_id": "p02918", "submission_id": "s320972066" }
[ { "content": "You are a helpful coding 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 uppercase or lowercase English letter\n\\alpha\nwill be given as in...
{ "code_size": 172, "language": "C", "problem_id": "p02627", "submission_id": "s739003929" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou are given\nN\npositive integers\na_1, a_2, ..., a_N\n.\nFor a non-...
{ "code_size": 206, "language": "C", "problem_id": "p03294", "submission_id": "s838964041" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nGiven are a sequence of\nN\npositive integers\nA_1\n,\nA_2\n,\n\\ldots...
{ "code_size": 1442, "language": "C++", "problem_id": "p02662", "submission_id": "s735778992" }
[ { "content": "You are a 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": 376, "language": "C++", "problem_id": "p00389", "submission_id": "s232197465" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "G - Revenge of Minimum Cost Flow\nProblem Statement\nFlora is a freelance carrier pigeon....
{ "code_size": 2393, "language": "C++", "problem_id": "p01673", "submission_id": "s809344977" }
[ { "content": "You are a helpful coding 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": "Dice III\nWrite a program which reads the two dices constructed in the same way as\nDice ...
{ "code_size": 1737, "language": "C++", "problem_id": "p02385", "submission_id": "s937050353" }
[ { "content": "You are a helpful coding 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 three integers\nN\n,\nK\n, and\nS\n.\nFind a sequence\nA_1, ...
{ "code_size": 404, "language": "C", "problem_id": "p02797", "submission_id": "s836044056" }
[ { "content": "You are a helpful coding 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 standing on a two-dimensional plane. In one operation, he can...
{ "code_size": 831, "language": "C", "problem_id": "p02782", "submission_id": "s843121896" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Is it a Right Triangle?\nWrite a program which judges wheather given length of three side...
{ "code_size": 397, "language": "C++", "problem_id": "p00003", "submission_id": "s713975707" }
[ { "content": "You are a helpful 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\nWe have a grid with\nH\nrows and\nW\ncolumns of squares.\nSnuke is pai...
{ "code_size": 965, "language": "C++", "problem_id": "p03640", "submission_id": "s006217694" }
[ { "content": "You are a helpful 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:\nMinimal Backgammon\nHere is a very simple variation of the game backgammon, n...
{ "code_size": 467, "language": "C", "problem_id": "p00856", "submission_id": "s821157108" }
[ { "content": "You are a helpful coding 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 participated in a magic show.\nA magician prepared\nN\nidentical...
{ "code_size": 5307, "language": "C", "problem_id": "p03113", "submission_id": "s890684763" }
[ { "content": "You are a helpful coding 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\nConsider the following arithmetic progression with\nn\nterms:\nx, x + ...
{ "code_size": 1768, "language": "C", "problem_id": "p03027", "submission_id": "s792894064" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Income Inequality\nWe often compute the average as the first step\nin processing statisti...
{ "code_size": 404, "language": "C", "problem_id": "p01109", "submission_id": "s854706483" }
[ { "content": "You are a helpful 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:\nBlue Forest\nJohn is playing a famous console game named 'Tales of Algorithme...
{ "code_size": 3738, "language": "C++", "problem_id": "p01446", "submission_id": "s384159028" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nTak has\nN\ncards. On the\ni\n-th\n(1 \\leq i \\leq N)\ncard is writte...
{ "code_size": 578, "language": "C", "problem_id": "p04015", "submission_id": "s299788592" }
[ { "content": "You are a helpful coding 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 pyramid with\nN\nsteps, built with blocks.\nThe steps are nu...
{ "code_size": 1178, "language": "C++", "problem_id": "p03952", "submission_id": "s351065225" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nPrint the circumference of a circle of radius\nR\n.\nConstraints\n1 \\...
{ "code_size": 258, "language": "C++", "problem_id": "p02705", "submission_id": "s813000804" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Chebyshev's Theorem\nIf\nn\nis a positive integer,\nthere exists at least one prime numbe...
{ "code_size": 441, "language": "C", "problem_id": "p00753", "submission_id": "s585661805" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Age Difference\nA trick of fate caused Hatsumi and Taku to come to know each other. To ke...
{ "code_size": 632, "language": "C++", "problem_id": "p00365", "submission_id": "s843722195" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "There are\nn\nprocesses in a queue. Each process has name\ni\nand time\ni\n. The round-r...
{ "code_size": 778, "language": "C", "problem_id": "p02264", "submission_id": "s608368753" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "You have a board with height two and width\nW\n.\nThe board is divided into 1x1 cells.\nE...
{ "code_size": 2778, "language": "C++", "problem_id": "p01740", "submission_id": "s528235991" }
[ { "content": "You are a helpful coding 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 one slime.\nYou can set the\nhealth\nof this slime to any inte...
{ "code_size": 1267, "language": "C++", "problem_id": "p02920", "submission_id": "s778441220" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Map: Search\nFor a dictionary $M$ that stores elements formed by a pair of a string key a...
{ "code_size": 1784, "language": "C", "problem_id": "p02459", "submission_id": "s520398257" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nHow many infinite sequences\na_1, a_2, ...\nconsisting of {\n{1, ... ,...
{ "code_size": 871, "language": "C++", "problem_id": "p03766", "submission_id": "s249993104" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere is a string\ns\nof length\n3\nor greater.\nNo two neighboring ch...
{ "code_size": 203, "language": "C", "problem_id": "p03865", "submission_id": "s755710508" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nGiven are strings\nS\nand\nT\n. Consider changing\nS\nto\nT\nby repeat...
{ "code_size": 278, "language": "C", "problem_id": "p02622", "submission_id": "s356293614" }
[ { "content": "You are a helpful coding 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\nWe have a grid with\nH\nrows and\nW\ncolumns. The square at the\ni\n-t...
{ "code_size": 822, "language": "C", "problem_id": "p03426", "submission_id": "s819122204" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou have a digit sequence\nS\nof length\n4\n. You are wondering which ...
{ "code_size": 618, "language": "C++", "problem_id": "p03042", "submission_id": "s427533340" }
[ { "content": "You are a helpful coding 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 two strings\nS\nand\nT\nconsisting of lowercase English lett...
{ "code_size": 197, "language": "C++", "problem_id": "p02817", "submission_id": "s683791469" }
[ { "content": "You are a helpful coding 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 lowercase English letters.\nSnuke i...
{ "code_size": 841, "language": "C", "problem_id": "p03570", "submission_id": "s339450239" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere is a string\nS\nof length\nN\nconsisting of characters\n0\nand\n...
{ "code_size": 1495, "language": "C++", "problem_id": "p03859", "submission_id": "s848930568" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nIn the city of Nevermore, there are\n10^8\nstreets and\n10^8\navenues,...
{ "code_size": 6754, "language": "C", "problem_id": "p03619", "submission_id": "s391689014" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nFor strings\ns\nand\nt\n, we will say that\ns\nand\nt\nare\nprefix-fre...
{ "code_size": 1424, "language": "C++", "problem_id": "p03491", "submission_id": "s278110953" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nCompute\nA \\times B\n, truncate its fractional part, and print the re...
{ "code_size": 445, "language": "C++", "problem_id": "p02659", "submission_id": "s502820638" }
[ { "content": "You are a helpful coding 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": "Problem Statement\nThere is a tree with\nN\nvertices numbered\n1, 2, ..., N\n.\nThe edges...
{ "code_size": 821, "language": "C++", "problem_id": "p03668", "submission_id": "s137544386" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nSelect any integer\nN\nbetween\n1000\nand\n2000\n(inclusive), and any ...
{ "code_size": 608, "language": "C", "problem_id": "p03528", "submission_id": "s121255552" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "The Smallest Window I\nFor a given array $a_1, a_2, a_3, ... , a_N$ of $N$ elements and a...
{ "code_size": 697, "language": "C++", "problem_id": "p02354", "submission_id": "s733690459" }
[ { "content": "You are a helpful coding 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 season for Snuke Festival has come again this year. First of all, ...
{ "code_size": 979, "language": "C++", "problem_id": "p03559", "submission_id": "s191121161" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nSnuke received a triangle as a birthday present.\nThe coordinates of t...
{ "code_size": 1329, "language": "C++", "problem_id": "p03869", "submission_id": "s902952928" }
[ { "content": "You are a 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: $850$ Points\nProblem statement\nThere is a circle which radius is 1.\nThere a...
{ "code_size": 1709, "language": "C++", "problem_id": "p03933", "submission_id": "s519403890" }
[ { "content": "You are a helpful 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:\nGeometric Map\nYour task in this problem is to create a program that finds th...
{ "code_size": 5738, "language": "C++", "problem_id": "p00858", "submission_id": "s366315261" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Convex Cut\nAs shown in the figure above, cut a convex polygon\ng\nby a line\np1p2\nand p...
{ "code_size": 5175, "language": "C++", "problem_id": "p02302", "submission_id": "s461828459" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nM-kun is a brilliant air traffic controller.\nOn the display of his ra...
{ "code_size": 3361, "language": "C++", "problem_id": "p02605", "submission_id": "s788872122" }
[ { "content": "You are a helpful coding 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\nstudents in a school.\nWe will divide these students int...
{ "code_size": 108, "language": "C", "problem_id": "p03423", "submission_id": "s352029500" }
[ { "content": "You are a helpful coding 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 tree with\nN\nvertices.\nHere, a\ntree\nis a kind of g...
{ "code_size": 1280, "language": "C++", "problem_id": "p03634", "submission_id": "s517410817" }
[ { "content": "You are a helpful 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:\nCurling 2.0\nOn Planet MM-21, after their Olympic games this year, curling is...
{ "code_size": 1168, "language": "C", "problem_id": "p00725", "submission_id": "s672064666" }
[ { "content": "You are a helpful coding 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\nA\nslimes lining up in a row.\nInitially, the sizes of the ...
{ "code_size": 1022, "language": "C++", "problem_id": "p03596", "submission_id": "s985937486" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nImagine a game played on a line. Initially, the player is located at p...
{ "code_size": 1218, "language": "C++", "problem_id": "p03940", "submission_id": "s683327598" }
[ { "content": "You are a helpful coding 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 integer sequences, each of length\nN\n:\na_1, ..., a...
{ "code_size": 1393, "language": "C", "problem_id": "p03410", "submission_id": "s138661957" }
[ { "content": "You are a helpful coding 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\nN\n-car train.\nYou are given an integer\ni\n. Find the v...
{ "code_size": 114, "language": "C", "problem_id": "p03272", "submission_id": "s114359873" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nSnuke is going to open a contest named \"AtCoder\ns\nContest\".\nHere,...
{ "code_size": 149, "language": "C", "problem_id": "p03860", "submission_id": "s625689780" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nA\ntetromino\nis a figure formed by joining four squares edge to edge....
{ "code_size": 492, "language": "C", "problem_id": "p03840", "submission_id": "s762789669" }
[ { "content": "You are a helpful 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:\nLost in Space\nWilliam Robinson was completely puzzled in the music room; he ...
{ "code_size": 1137, "language": "C++", "problem_id": "p00796", "submission_id": "s576292484" }
[ { "content": "You are a 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: $600$ Points\nProblem Statement\nSigma and his brother Sugim are in the $H \\t...
{ "code_size": 1481, "language": "C++", "problem_id": "p03932", "submission_id": "s690686960" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Stack\nStack is a container of elements that are inserted and deleted according to LIFO (...
{ "code_size": 1165, "language": "C", "problem_id": "p02435", "submission_id": "s415650712" }
[ { "content": "You are a helpful 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:\nRepeated Substitution with Sed\nDo you know \"sed,\" a tool provided with Uni...
{ "code_size": 1181, "language": "C", "problem_id": "p00875", "submission_id": "s752836403" }
[ { "content": "You are a helpful coding 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 held a popularity poll for\nN\nitems on sale. Item\ni\nreceive...
{ "code_size": 545, "language": "C++", "problem_id": "p02718", "submission_id": "s998445712" }
[ { "content": "You are a 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 day is today?\nYour task is to write a program which reads a date (from 2004/1/1 to ...
{ "code_size": 625, "language": "C++", "problem_id": "p00027", "submission_id": "s881751157" }
[ { "content": "You are a 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": 497, "language": "C++", "problem_id": "p00025", "submission_id": "s301768736" }
[ { "content": "You are a helpful coding 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+M\nballs, each of which has an integer written on it.\nIt i...
{ "code_size": 308, "language": "C++", "problem_id": "p02729", "submission_id": "s260700079" }
[ { "content": "You are a helpful coding 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 B:\nHeadstrong Student\nYou are a teacher at a cram school for elementary school ...
{ "code_size": 477, "language": "C", "problem_id": "p01172", "submission_id": "s378903461" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nN\ncontestants participated in a competition. The total of\nN-1\nmatch...
{ "code_size": 1759, "language": "C", "problem_id": "p03822", "submission_id": "s730933378" }
[ { "content": "You are a helpful coding 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 directed graph\nG\nwith\nN\nvertices and\nM\nedges.\nThe ve...
{ "code_size": 996, "language": "C++", "problem_id": "p03166", "submission_id": "s395743075" }
[ { "content": "You are a helpful coding 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 the possible tuples of sequences\n(A_0,A_1,...,A_N)...
{ "code_size": 957, "language": "C++", "problem_id": "p03349", "submission_id": "s599826491" }
[ { "content": "You are a helpful coding 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\ncubes stacked vertically on a desk.\nYou are given a str...
{ "code_size": 459, "language": "C++", "problem_id": "p03107", "submission_id": "s574657656" }
[ { "content": "You are a helpful coding 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 K\nRunner and Sniper\nYou are escaping from an enemy for some reason. The enemy i...
{ "code_size": 1786, "language": "C++", "problem_id": "p01800", "submission_id": "s689769776" }
[ { "content": "You are a helpful coding 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\nA\nballs with the string\nS\nwritten on each of them and\nB\n...
{ "code_size": 328, "language": "C++", "problem_id": "p02777", "submission_id": "s333398030" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Binary Search Tree III\nWrite a program which performs the following operations to a bina...
{ "code_size": 2697, "language": "C++", "problem_id": "p02285", "submission_id": "s306304385" }
[ { "content": "You are a helpful coding 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 positive integer\nL\nin base two.\nHow many pairs of n...
{ "code_size": 1187, "language": "C++", "problem_id": "p03015", "submission_id": "s676508619" }
[ { "content": "You are a helpful 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:\nRoll-A-Big-Ball\nACM University holds its sports day in every July. The \"Rol...
{ "code_size": 4517, "language": "C", "problem_id": "p00738", "submission_id": "s315287515" }
[ { "content": "You are a helpful coding 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\nof length\nN\nconsisting of uppercase English let...
{ "code_size": 286, "language": "C", "problem_id": "p02812", "submission_id": "s483903553" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are\nN\nrobots and\nM\nexits on a number line.\nThe\nN + M\ncoor...
{ "code_size": 7925, "language": "C", "problem_id": "p03279", "submission_id": "s077728682" }
[ { "content": "You are a helpful coding 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\ndigits\na_1a_2\\ldots a_N\n, where each ele...
{ "code_size": 1280, "language": "C++", "problem_id": "p02736", "submission_id": "s560670472" }
[ { "content": "You are a helpful coding 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\nstrings of lowercase alphabet only. The\ni\n-th string i...
{ "code_size": 1610, "language": "C", "problem_id": "p03974", "submission_id": "s281113089" }
[ { "content": "You are a helpful coding 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 positive integer\nX\n.\nFind the largest\nperfect powe...
{ "code_size": 483, "language": "C++", "problem_id": "p03352", "submission_id": "s207927932" }
[ { "content": "You are a helpful 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": "Problem Statement\nWe have a sequence of length\nN\nconsisting of non-negative integers. ...
{ "code_size": 759, "language": "C++", "problem_id": "p03646", "submission_id": "s347134070" }
[ { "content": "You are a helpful coding 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 went to an all-you-can-eat buffet with\nN\nkinds of dishes a...
{ "code_size": 478, "language": "C", "problem_id": "p02916", "submission_id": "s437357011" }
[ { "content": "You are a helpful coding 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 Statement\nThere is a grid with\nH\nhorizontal rows and\nW\nvertical columns, and...
{ "code_size": 1587, "language": "C++", "problem_id": "p03014", "submission_id": "s031153305" }
[ { "content": "You are a helpful coding 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 some village, there are\n999\ntowers that are\n1,(1+2),(1+2+3),...,...
{ "code_size": 241, "language": "C", "problem_id": "p03328", "submission_id": "s302151491" }
[ { "content": "You are a helpful 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\nMin-Max Distance Game\nAlice and Bob are playing the following game. Initially...
{ "code_size": 968, "language": "C", "problem_id": "p00945", "submission_id": "s327921634" }
[ { "content": "You are a helpful coding 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\n. Each character in\nS\nis either a digit (\n0\n...
{ "code_size": 958, "language": "C", "problem_id": "p02960", "submission_id": "s481109584" }
[ { "content": "You are a helpful coding 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": 298, "language": "C", "problem_id": "p03285", "submission_id": "s069127638" }