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\nN\npeople are standing in a queue, numbered\n1, 2, 3, ..., N\nfrom fro...
{ "code_size": 1048, "language": "C++", "problem_id": "p02845", "submission_id": "s908080973" }
[ { "content": "You are a 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 Maximum Number of Customers\n$N$ persons visited a restaurant. The restaurant is open...
{ "code_size": 673, "language": "C", "problem_id": "p02359", "submission_id": "s049013592" }
[ { "content": "You are a 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 is the Number in my Mind ?\nLet us enjoy a number guess game.\nA number containing L...
{ "code_size": 1858, "language": "C++", "problem_id": "p00703", "submission_id": "s216198894" }
[ { "content": "You are a helpful coding 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 image with a height of\nH\npixels and a width of\nW\npixel...
{ "code_size": 406, "language": "C++", "problem_id": "p03853", "submission_id": "s146903763" }
[ { "content": "You are a helpful coding 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": 1741, "language": "C++", "problem_id": "p03027", "submission_id": "s507233347" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nShichi-Go-San\n(literally \"Seven-Five-Three\") is a traditional event...
{ "code_size": 166, "language": "C", "problem_id": "p03210", "submission_id": "s191921713" }
[ { "content": "You are a helpful 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:\nNever Wait for Weights\nIn a laboratory, an assistant, Nathan Wada, is measur...
{ "code_size": 1482, "language": "C", "problem_id": "p00909", "submission_id": "s482733699" }
[ { "content": "You are a helpful 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. Sum of QQ\nYou received a card with an integer $S$ and a\nmultiplication table...
{ "code_size": 860, "language": "C++", "problem_id": "p02012", "submission_id": "s080068831" }
[ { "content": "You are a helpful coding 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.\nTakahashi chooses an integer\na\nfrom the p...
{ "code_size": 287, "language": "C++", "problem_id": "p02897", "submission_id": "s741678948" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Circumscribed Circle of a Triangle\nWrite a program which prints the central coordinate (...
{ "code_size": 8668, "language": "C++", "problem_id": "p02307", "submission_id": "s217155844" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Calculation of Expressions\nWrite a program to calculate values of arithmetic expressions...
{ "code_size": 2213, "language": "C++", "problem_id": "p00684", "submission_id": "s392735753" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nRecently, AIs which play Go (a traditional board game) are well invest...
{ "code_size": 850, "language": "C", "problem_id": "p02067", "submission_id": "s746970844" }
[ { "content": "You are a helpful coding 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 connected undirected graph with\nN\nvertices and\nM\nedges....
{ "code_size": 2389, "language": "C++", "problem_id": "p03143", "submission_id": "s182058877" }
[ { "content": "You are a helpful coding 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 grid of\nN\nrows and\nM\ncolumns. The square at the\ni...
{ "code_size": 5966, "language": "C", "problem_id": "p02562", "submission_id": "s854703932" }
[ { "content": "You are a helpful 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:\nHexerpents of Hexwamp\nHexwamp is a strange swamp, paved with regular hexagon...
{ "code_size": 3254, "language": "C++", "problem_id": "p00724", "submission_id": "s367743990" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Diameter of a Tree\nGiven a tree\nT\nwith non-negative weight, find the diameter of the t...
{ "code_size": 1430, "language": "C++", "problem_id": "p02371", "submission_id": "s925697678" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nN\nprogrammers are going to participate in the preliminary stage of DD...
{ "code_size": 923, "language": "C", "problem_id": "p02856", "submission_id": "s507776464" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nWe have a grid with\nN\nrows and\nM\ncolumns of squares. Initially, al...
{ "code_size": 383, "language": "C", "problem_id": "p03592", "submission_id": "s082648426" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nEvery day,\nN\npassengers arrive at Takahashi Airport.\nThe\ni\n-th pa...
{ "code_size": 727, "language": "C++", "problem_id": "p03785", "submission_id": "s831515908" }
[ { "content": "You are a helpful 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:\nMarching Course\nSince members of Kitafuji High School Brass Band Club succee...
{ "code_size": 1310, "language": "C++", "problem_id": "p01823", "submission_id": "s320534047" }
[ { "content": "You are a helpful coding 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 bar of chocolate with a height of\nH\nblocks and a width of...
{ "code_size": 1133, "language": "C++", "problem_id": "p03713", "submission_id": "s795614610" }
[ { "content": "You are a helpful coding 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 planning to record\nN\nTV programs with recorders.\nThe TV ...
{ "code_size": 843, "language": "C", "problem_id": "p03504", "submission_id": "s044303975" }
[ { "content": "You are a helpful coding 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 playing with\nN\ncards.\nThe\ni\n-th card has an integer\...
{ "code_size": 1369, "language": "C++", "problem_id": "p03922", "submission_id": "s313671490" }
[ { "content": "You are a helpful coding 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 permutation of the integers from\n1\nthrough\nN\n,\np_1\n,\n...
{ "code_size": 1041, "language": "C", "problem_id": "p03354", "submission_id": "s327461934" }
[ { "content": "You are a helpful coding 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 strings\nA, B\nand\nC\n. Each of these is a string...
{ "code_size": 470, "language": "C", "problem_id": "p03140", "submission_id": "s482283740" }
[ { "content": "You are a helpful 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:\nPi is Three\nπ\n(spelled pi in English) is a mathematical constant representi...
{ "code_size": 482, "language": "C", "problem_id": "p01250", "submission_id": "s008220517" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Dock to the Future\nYou had long wanted a spaceship, and finally you bought a used one ye...
{ "code_size": 1603, "language": "C++", "problem_id": "p01198", "submission_id": "s582208558" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Equilateral Triangular Fence\nMs. Misumi owns an orchard along a straight road.\nRecently...
{ "code_size": 2247, "language": "C++", "problem_id": "p01114", "submission_id": "s952785002" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nWe have a deck consisting of\nN\ncards. Each card has an integer writt...
{ "code_size": 585, "language": "C", "problem_id": "p03550", "submission_id": "s006721477" }
[ { "content": "You are a helpful coding 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, numbered\n1, 2, \\ldots, N\n.\nThey have decid...
{ "code_size": 1117, "language": "C++", "problem_id": "p03172", "submission_id": "s724635327" }
[ { "content": "You are a helpful coding 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 a factory, there are\nN\nrobots placed on a number line.\nRobot\ni\...
{ "code_size": 869, "language": "C++", "problem_id": "p02796", "submission_id": "s489228014" }
[ { "content": "You are a helpful coding 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": 1304, "language": "C++", "problem_id": "p03692", "submission_id": "s315829697" }
[ { "content": "You are a helpful 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:\nHow Many Islands?\nYou are given a marine area map that is a mesh of squares,...
{ "code_size": 1099, "language": "C++", "problem_id": "p00741", "submission_id": "s848711707" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "National Budget\nA country has a budget of more than 81 trillion yen. We want to process ...
{ "code_size": 1223, "language": "C", "problem_id": "p00015", "submission_id": "s521393097" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Line Gimmick\nYou are in front of a linear gimmick of a game. It consists of $N$ panels i...
{ "code_size": 894, "language": "C++", "problem_id": "p01831", "submission_id": "s010077084" }
[ { "content": "You are a helpful coding 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\n.\nAmong the\ndifferent\nsubstrings of\ns\n...
{ "code_size": 1206, "language": "C", "problem_id": "p03353", "submission_id": "s712842120" }
[ { "content": "You are a 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 Tree Intersection And Union\nGiven two binary trees, we consider the “intersection...
{ "code_size": 1777, "language": "C++", "problem_id": "p00587", "submission_id": "s676301854" }
[ { "content": "You are a helpful coding 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 AtCoder City, there are three stations numbered\n1\n,\n2\n, and\n3\...
{ "code_size": 216, "language": "C", "problem_id": "p02753", "submission_id": "s153008240" }
[ { "content": "You are a helpful coding 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\nSnuke Cats numbered\n1, 2, \\ldots, N\n, where\nN\nis\ne...
{ "code_size": 699, "language": "C++", "problem_id": "p02631", "submission_id": "s760013068" }
[ { "content": "You are a helpful 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:\n!\nYou are one of ICPC participants and in charge of developing a library for...
{ "code_size": 1050, "language": "C++", "problem_id": "p01209", "submission_id": "s788506951" }
[ { "content": "You are a helpful 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:\nMarked Ancestor\nYou are given a tree\nT\nthat consists of\nN\nnodes. Each no...
{ "code_size": 996, "language": "C", "problem_id": "p01288", "submission_id": "s423162745" }
[ { "content": "You are a helpful coding 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 integers\nL\nand\nR\n. Find the number, modulo\n10^9 + 7\n, ...
{ "code_size": 2333, "language": "C++", "problem_id": "p02938", "submission_id": "s759310214" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Multi-column List\nEver since Mr. Ikra became the chief manager of his office,\nhe has ha...
{ "code_size": 1470, "language": "C++", "problem_id": "p00696", "submission_id": "s981311508" }
[ { "content": "You are a 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": 682, "language": "C", "problem_id": "p02354", "submission_id": "s459511308" }
[ { "content": "You are a helpful coding 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 five variables\nx_1, x_2, x_3, x_4,\nand\nx_5\n.\nThe variable...
{ "code_size": 221, "language": "C", "problem_id": "p02639", "submission_id": "s370882593" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Spreadsheet\nYour task is to perform a simple table calculation.\nWrite a program which r...
{ "code_size": 652, "language": "C++", "problem_id": "p02413", "submission_id": "s918650600" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Area\nFor a given polygon\ng\n, computes the area of the polygon.\ng\nis represented by a...
{ "code_size": 581, "language": "C", "problem_id": "p02297", "submission_id": "s711134078" }
[ { "content": "You are a helpful coding 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 farm whose length and width are\nA\nyard and\nB\nyard, res...
{ "code_size": 129, "language": "C", "problem_id": "p03280", "submission_id": "s626059876" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Prime-Factor Prime\nA positive integer is called a \"prime-factor prime\" when the number...
{ "code_size": 1779, "language": "C", "problem_id": "p01958", "submission_id": "s082957100" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Depth First Search\nDepth-first search (DFS) follows the strategy to search ”deeper” in t...
{ "code_size": 856, "language": "C", "problem_id": "p02238", "submission_id": "s868646672" }
[ { "content": "You are a helpful coding 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.\nSnuke has a favorite positive integer,\n...
{ "code_size": 1696, "language": "C", "problem_id": "p03663", "submission_id": "s360150870" }
[ { "content": "You are a helpful coding 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\nmonsters, numbered\n1, 2, ..., N\n.\nInitially, the heal...
{ "code_size": 503, "language": "C", "problem_id": "p03127", "submission_id": "s558152302" }
[ { "content": "You are a helpful coding 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 integers\nA\n,\nB\n, and\nN\n.\nFind the maximum possible va...
{ "code_size": 513, "language": "C++", "problem_id": "p02696", "submission_id": "s819021553" }
[ { "content": "You are a helpful 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:\nUnit Fraction Partition\nA fraction whose numerator is 1\nand whose denominat...
{ "code_size": 879, "language": "C++", "problem_id": "p00712", "submission_id": "s459687275" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Small, Large, or Equal\nWrite a program which prints small/large/equal relation of given ...
{ "code_size": 202, "language": "C", "problem_id": "p02391", "submission_id": "s645722198" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nE869120 found a chest which is likely to contain treasure.\nHowever, t...
{ "code_size": 770, "language": "C", "problem_id": "p03565", "submission_id": "s280717990" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Optimal Binary Search Tree\nOptimal Binary Search Tree is a binary search tree constructe...
{ "code_size": 1161, "language": "C++", "problem_id": "p02236", "submission_id": "s721295456" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Cross Points of a Circe and a Line\nFor given a circle $c$ and a line $l$, print the coor...
{ "code_size": 1392, "language": "C", "problem_id": "p02308", "submission_id": "s295985231" }
[ { "content": "You are a helpful coding 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 on the\nx\n-axis.\nLet the coordinate of...
{ "code_size": 1360, "language": "C++", "problem_id": "p03452", "submission_id": "s605181829" }
[ { "content": "You are a helpful coding 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's town has a subway system, consisting of\nN\nstations and\nM\nr...
{ "code_size": 5476, "language": "C", "problem_id": "p04003", "submission_id": "s839174721" }
[ { "content": "You are a helpful 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:\nConnect Line Segments\nYour dear son Arnie is addicted to a puzzle named\nCon...
{ "code_size": 1713, "language": "C", "problem_id": "p01239", "submission_id": "s680122022" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Knapsack Problem\nYou have\nN\nkinds of items that you want to put them into a knapsack. ...
{ "code_size": 709, "language": "C++", "problem_id": "p02316", "submission_id": "s987214953" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Digit Number\nWrite a program which computes the digit number of sum of two integers\na\n...
{ "code_size": 234, "language": "C", "problem_id": "p00002", "submission_id": "s292561630" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Extraordinary Girl (I)\nShe is an extraordinary girl. She works for a library. Since she ...
{ "code_size": 550, "language": "C", "problem_id": "p00588", "submission_id": "s853715087" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Pair of Primes\nWe arrange the numbers between 1 and N (1 <= N <= 10000) in increasing\no...
{ "code_size": 460, "language": "C", "problem_id": "p00590", "submission_id": "s710910437" }
[ { "content": "You are a helpful coding 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": 828, "language": "C++", "problem_id": "p03425", "submission_id": "s461150981" }
[ { "content": "You are a helpful coding 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": 753, "language": "C++", "problem_id": "p03287", "submission_id": "s149598662" }
[ { "content": "You are a helpful coding 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 elementary school student Takahashi has come to a variety store.\nH...
{ "code_size": 166, "language": "C", "problem_id": "p03407", "submission_id": "s174222881" }
[ { "content": "You are a helpful coding 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 made\nN\nproblems for competitive programming.\nThe problems...
{ "code_size": 460, "language": "C", "problem_id": "p02989", "submission_id": "s353563795" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Stable Sort\nLet's arrange a deck of cards. There are totally 36 cards of 4 suits(S, H, C...
{ "code_size": 1441, "language": "C++", "problem_id": "p02261", "submission_id": "s932124366" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are\nN\ntowns numbered\n1\nto\nN\nand\nM\nroads. The\ni\n-th roa...
{ "code_size": 1056, "language": "C", "problem_id": "p02889", "submission_id": "s318714047" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Projection\nFor given three points\np1, p2, p\n, find the projection point\nx\nof\np\nont...
{ "code_size": 768, "language": "C", "problem_id": "p02290", "submission_id": "s290037154" }
[ { "content": "You are a helpful coding 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 some day in January\n2018\n, Takaki is writing a document. The docu...
{ "code_size": 133, "language": "C", "problem_id": "p03469", "submission_id": "s943749660" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere are\nN\ntowns in a coordinate plane. Town\ni\nis located at coor...
{ "code_size": 586, "language": "C", "problem_id": "p02861", "submission_id": "s559766703" }
[ { "content": "You are a helpful coding 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\nbracket sequence\nis a string that is one of the following:\nAn emp...
{ "code_size": 2235, "language": "C", "problem_id": "p02686", "submission_id": "s553192382" }
[ { "content": "You are a helpful coding 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 will turn on the air conditioner if, and only if, the temperature ...
{ "code_size": 146, "language": "C", "problem_id": "p02594", "submission_id": "s347375147" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou have\nN\nitems and a bag of strength\nW\n.\nThe\ni\n-th item has a...
{ "code_size": 1380, "language": "C++", "problem_id": "p03734", "submission_id": "s137342571" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou are given a string\nS\nof length\n2\nor\n3\nconsisting of lowercas...
{ "code_size": 229, "language": "C", "problem_id": "p03227", "submission_id": "s697572194" }
[ { "content": "You are a 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": 720, "language": "C", "problem_id": "p02317", "submission_id": "s488827064" }
[ { "content": "You are a helpful coding 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": 1609, "language": "C", "problem_id": "p03678", "submission_id": "s580542785" }
[ { "content": "You are a 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 Closest Circle\nYou are given\nN\nnon-overlapping circles in xy-plane. The radius of ...
{ "code_size": 1617, "language": "C++", "problem_id": "p01180", "submission_id": "s269420754" }
[ { "content": "You are a helpful 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:\nLife Line\nLet's play a new board game ``Life Line''.\nThe number of the play...
{ "code_size": 1988, "language": "C++", "problem_id": "p00814", "submission_id": "s955081062" }
[ { "content": "You are a 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 Profit\nYou can obtain profits from foreign exchange margin transactions. For exa...
{ "code_size": 393, "language": "C++", "problem_id": "p02258", "submission_id": "s436837237" }
[ { "content": "You are a helpful coding 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 bar of chocolate with a height of\nH\nblocks and a width of...
{ "code_size": 1183, "language": "C++", "problem_id": "p03715", "submission_id": "s800774097" }
[ { "content": "You are a helpful coding 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 billiard table.\nThe playing area of the table is rectangul...
{ "code_size": 3992, "language": "C++", "problem_id": "p01649", "submission_id": "s236549627" }
[ { "content": "You are a helpful 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:\nCliff Climbing\nAt 17:00, special agent Jack starts to escape from the enemy ...
{ "code_size": 2284, "language": "C", "problem_id": "p00731", "submission_id": "s506435797" }
[ { "content": "You are a 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": 406, "language": "C++", "problem_id": "p02424", "submission_id": "s200844074" }
[ { "content": "You are a helpful coding 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 AtCoder City, there are three stations numbered\n1\n,\n2\n, and\n3\...
{ "code_size": 323, "language": "C++", "problem_id": "p02753", "submission_id": "s836137828" }
[ { "content": "You are a helpful coding 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 found two positive integers,\na\nand\nb\n.\nDete...
{ "code_size": 336, "language": "C", "problem_id": "p03456", "submission_id": "s636141557" }
[ { "content": "You are a helpful coding 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 participating in a quiz with\nN + M\nquestions and Yes/No answ...
{ "code_size": 1054, "language": "C++", "problem_id": "p03622", "submission_id": "s772812080" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Checkered Pattern\nYou have a cross-section paper with W x H squares, and each of them is...
{ "code_size": 1220, "language": "C++", "problem_id": "p00368", "submission_id": "s508286667" }
[ { "content": "You are a helpful coding 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 two permutations\nP\nand\nQ\nof size\nN\n(that is,\nP\nand\nQ\...
{ "code_size": 816, "language": "C", "problem_id": "p02813", "submission_id": "s006767955" }
[ { "content": "You are a helpful coding 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 tree with\n...
{ "code_size": 5738, "language": "C", "problem_id": "p02977", "submission_id": "s652947707" }
[ { "content": "You are a helpful coding 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\nislands floating in Ringo Sea, and\nM\ntravel agents ope...
{ "code_size": 1637, "language": "C++", "problem_id": "p03513", "submission_id": "s930294121" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Circle\nWrite a program which calculates the area and circumference of a circle for given...
{ "code_size": 163, "language": "C", "problem_id": "p02400", "submission_id": "s113155671" }
[ { "content": "You are a helpful coding 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, my grandmas left $N$ cookies.\nMy elder sister and I were goi...
{ "code_size": 973, "language": "C", "problem_id": "p01707", "submission_id": "s987126911" }
[ { "content": "You are a helpful coding 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 directed graph\nG\nwith\nN\nvertices and\nM\nedges.\nThe ve...
{ "code_size": 2040, "language": "C++", "problem_id": "p02902", "submission_id": "s404450138" }
[ { "content": "You are a helpful coding 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 biscuit making machine produces\nB\nbiscuits at the following moment...
{ "code_size": 152, "language": "C", "problem_id": "p03059", "submission_id": "s626868390" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Transformation\nWrite a program which performs a sequence of commands to a given string $...
{ "code_size": 712, "language": "C++", "problem_id": "p02422", "submission_id": "s544099296" }
[ { "content": "You are a helpful 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:\nDice Puzzle\nLet’s try a dice puzzle. The rules of this puzzle are as follows...
{ "code_size": 2010, "language": "C", "problem_id": "p00832", "submission_id": "s698287859" }