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\nYou are given a polynomial of degree\nN\nwith integer coefficients:\nf...
{ "code_size": 1858, "language": "C", "problem_id": "p03065", "submission_id": "s831228650" }
[ { "content": "You are a helpful coding 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\nN\nsticks.\nThe length of the\ni\n-th stick is\nl_i\n.\nSnu...
{ "code_size": 459, "language": "C", "problem_id": "p03658", "submission_id": "s862301825" }
[ { "content": "You are a helpful coding 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\nbarbecue restaurants along a street.\nThe restaurants ar...
{ "code_size": 4880, "language": "C", "problem_id": "p03833", "submission_id": "s183302438" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Closest Pair\nFor given\nn\npoints in metric space, find the distance of the closest poin...
{ "code_size": 2468, "language": "C++", "problem_id": "p02303", "submission_id": "s550284794" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Where's Your Robot?\nYou have full control over a robot that walks around in a rectangula...
{ "code_size": 950, "language": "C", "problem_id": "p00686", "submission_id": "s670406303" }
[ { "content": "You are a helpful 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:\nEquals are Equals\nMr. Simpson got up with a slight feeling of tiredness. It ...
{ "code_size": 4124, "language": "C++", "problem_id": "p00812", "submission_id": "s588349530" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem D:\nReaction\nYou are a hero of a role playing game, asked by the king to defeat ...
{ "code_size": 2711, "language": "C++", "problem_id": "p01263", "submission_id": "s495706224" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nTakahashi is distributing\nN\nballs to\nK\npersons.\nIf each person ha...
{ "code_size": 168, "language": "C", "problem_id": "p03005", "submission_id": "s288988451" }
[ { "content": "You are a helpful 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:\nIndian Puzzle\nIn the Indian Puzzle, one is intended to fill out blanks with ...
{ "code_size": 4231, "language": "C++", "problem_id": "p00608", "submission_id": "s945620098" }
[ { "content": "You are a helpful 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:\nInternational Party\nIsaac H. Ives is attending an international student part...
{ "code_size": 2177, "language": "C", "problem_id": "p01184", "submission_id": "s507959431" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nThere is an infinitely large pond, which we consider as a number line....
{ "code_size": 1147, "language": "C++", "problem_id": "p03034", "submission_id": "s280540455" }
[ { "content": "You are a 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 Two Floors Dungeon\nIt was the last day of the summer camp you strayed into the labyrin...
{ "code_size": 2180, "language": "C", "problem_id": "p01561", "submission_id": "s706861073" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Treasure Map\nMr. Kobou found a bundle of old paper when he was cleaning his family home....
{ "code_size": 753, "language": "C++", "problem_id": "p00391", "submission_id": "s736834377" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nDoes there exist an undirected graph with\nN\nvertices satisfying the ...
{ "code_size": 786, "language": "C", "problem_id": "p02997", "submission_id": "s790723133" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nSnuke has decided to use a robot to clean his room.\nThere are\nN\npie...
{ "code_size": 1030, "language": "C++", "problem_id": "p03255", "submission_id": "s021961599" }
[ { "content": "You are a helpful coding 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 A:\nBlackjack\nBrian Jones is an undergraduate student at Advanced College of Met...
{ "code_size": 718, "language": "C", "problem_id": "p01149", "submission_id": "s857095681" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nShik's job is very boring. At day\n0\n, his boss gives him a string\nS...
{ "code_size": 900, "language": "C++", "problem_id": "p03942", "submission_id": "s632221146" }
[ { "content": "You are a helpful coding 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 us consider a grid of squares with\nN\nrows and\nN\ncolumns. You w...
{ "code_size": 2489, "language": "C++", "problem_id": "p02825", "submission_id": "s587767121" }
[ { "content": "You are a helpful coding 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 create an artwork by painting black some squares in a white sq...
{ "code_size": 1416, "language": "C++", "problem_id": "p02864", "submission_id": "s124195792" }
[ { "content": "You are a helpful 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:\nEleven Lover\nEdward Leven loves multiples of eleven very much. When he sees ...
{ "code_size": 631, "language": "C", "problem_id": "p01300", "submission_id": "s550874293" }
[ { "content": "You are a helpful coding 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 integers between\n1\nand\nN\n...
{ "code_size": 716, "language": "C", "problem_id": "p03212", "submission_id": "s800653506" }
[ { "content": "You are a helpful 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:\nZigzag\nGiven several points on a plane, let’s try to solve a puzzle connecti...
{ "code_size": 5531, "language": "C++", "problem_id": "p00873", "submission_id": "s826970614" }
[ { "content": "You are a helpful coding 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 positions\n(X_i, Y_i)\nof\nN\nenemy rooks on an infinite...
{ "code_size": 3680, "language": "C++", "problem_id": "p02593", "submission_id": "s409524047" }
[ { "content": "You are a helpful coding 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. At first, all cells were...
{ "code_size": 1240, "language": "C++", "problem_id": "p04000", "submission_id": "s528285683" }
[ { "content": "You are a 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 Overlaps\nGiven a set of $N$ axis-aligned rectangular seals, find t...
{ "code_size": 1023, "language": "C++", "problem_id": "p02360", "submission_id": "s256619137" }
[ { "content": "You are a helpful coding 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 love calculating things, so they will play with num...
{ "code_size": 2108, "language": "C++", "problem_id": "p03336", "submission_id": "s437113768" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "(Please read problem A first. The maximum score you can get by solving this problem C is ...
{ "code_size": 1093, "language": "C", "problem_id": "p02620", "submission_id": "s211808661" }
[ { "content": "You are a helpful coding 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 largest integer that can be formed with exactly\nN\nmatchstic...
{ "code_size": 1195, "language": "C", "problem_id": "p03128", "submission_id": "s104673936" }
[ { "content": "You are a helpful coding 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 about to compete in the final round of a certain programmin...
{ "code_size": 2696, "language": "C++", "problem_id": "p03851", "submission_id": "s560587995" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nHow many integer sequences\nA_1,A_2,\\ldots,A_N\nof length\nN\nsatisfy...
{ "code_size": 927, "language": "C++", "problem_id": "p02554", "submission_id": "s512845031" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou are given two non-negative integers\nL\nand\nR\n.\nWe will choose ...
{ "code_size": 575, "language": "C++", "problem_id": "p02983", "submission_id": "s068696645" }
[ { "content": "You are a helpful coding 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. The vertices are numbered\n0\n...
{ "code_size": 6575, "language": "C", "problem_id": "p03442", "submission_id": "s217419533" }
[ { "content": "You are a helpful coding 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 lining up from west to east, connected by\nN-1\n...
{ "code_size": 784, "language": "C++", "problem_id": "p03295", "submission_id": "s001426749" }
[ { "content": "You are a helpful 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:\nShelter\nTaro lives in a town with N shelters. The shape of the town is a con...
{ "code_size": 5567, "language": "C++", "problem_id": "p01501", "submission_id": "s605835412" }
[ { "content": "You are a helpful coding 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 square grid with\nH\nrows and\nW\ncolumns.\nSnuke wants to w...
{ "code_size": 455, "language": "C", "problem_id": "p02903", "submission_id": "s491351162" }
[ { "content": "You are a helpful coding 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\n3\nrows and\nN\ncolumns.\nThe cell at the\ni\n-th...
{ "code_size": 480, "language": "C", "problem_id": "p03955", "submission_id": "s093202135" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nOur world is one-dimensional, and ruled by two empires called Empire A...
{ "code_size": 531, "language": "C", "problem_id": "p03251", "submission_id": "s878745496" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Search I\nYou are given a sequence of\nn\nintegers S and a sequence of different\nq\ninte...
{ "code_size": 432, "language": "C", "problem_id": "p02267", "submission_id": "s442370718" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Modern Announce Network\nToday, modern teenagers use SNS to communicate with each other.\...
{ "code_size": 2536, "language": "C++", "problem_id": "p01833", "submission_id": "s620396545" }
[ { "content": "You are a helpful coding 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\n3\nconsisting of\na\n,\nb\nand\n...
{ "code_size": 349, "language": "C++", "problem_id": "p03385", "submission_id": "s015019664" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nInspired by the tv series\nStranger Things\n, bear Limak is going for ...
{ "code_size": 2352, "language": "C++", "problem_id": "p02591", "submission_id": "s141729274" }
[ { "content": "You are a helpful coding 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 standing on a two-dimensional plane, facing north. Find t...
{ "code_size": 250, "language": "C", "problem_id": "p02633", "submission_id": "s172556918" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nIn the final of CODE FESTIVAL in some year, there are\nN\nparticipants...
{ "code_size": 3847, "language": "C", "problem_id": "p03536", "submission_id": "s503448535" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nSnuke loves flags.\nSnuke is placing\nN\nflags on a line.\nThe\ni\n-th...
{ "code_size": 2159, "language": "C", "problem_id": "p03802", "submission_id": "s584767413" }
[ { "content": "You are a helpful coding 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\npoints\n(x_i, y_i)\nin a two-dimensional plane.\nFind th...
{ "code_size": 1653, "language": "C", "problem_id": "p02805", "submission_id": "s608725668" }
[ { "content": "You are a helpful coding 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\nS(n)\ndenote the sum of the digits in the decimal notation of\nn\...
{ "code_size": 571, "language": "C", "problem_id": "p03318", "submission_id": "s701770535" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem E:\nThe Two Men of the Japanese Alps\nTwo experienced climbers are planning a fir...
{ "code_size": 2830, "language": "C++", "problem_id": "p00888", "submission_id": "s239671824" }
[ { "content": "You are a helpful coding 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 integers\nN, K\n, and an integer sequence\nA\nof length\...
{ "code_size": 2936, "language": "C++", "problem_id": "p03314", "submission_id": "s312572131" }
[ { "content": "You are a helpful coding 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 now participating in the Summer Training Camp for Programming ...
{ "code_size": 1846, "language": "C++", "problem_id": "p01679", "submission_id": "s271686008" }
[ { "content": "You are a helpful 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:\nRabbit Jumping\nThere are $K$ rabbits playing on rocks floating in a river. T...
{ "code_size": 7057, "language": "C++", "problem_id": "p01500", "submission_id": "s240952049" }
[ { "content": "You are a helpful coding 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 three boxes\nA\n,\nB\n, and\nC\n, each of which contains an in...
{ "code_size": 254, "language": "C++", "problem_id": "p02717", "submission_id": "s054025384" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Tree Separator\nYou are given a tree $T$ and an integer $K$. You can choose arbitrary dis...
{ "code_size": 1539, "language": "C++", "problem_id": "p01960", "submission_id": "s589122828" }
[ { "content": "You are a helpful 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:\nThe Morning after Halloween\nYou are working for an amusement park as an oper...
{ "code_size": 2960, "language": "C", "problem_id": "p00860", "submission_id": "s784075916" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nRingo has an undirected graph\nG\nwith\nN\nvertices numbered\n1,2,...,...
{ "code_size": 1725, "language": "C++", "problem_id": "p03517", "submission_id": "s303066973" }
[ { "content": "You are a 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 of Circles\nFor given two circles $c1$ and $c2$, print\n4\nif they do not cr...
{ "code_size": 2203, "language": "C++", "problem_id": "p02305", "submission_id": "s513487026" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Balance Scale\nYou, an experimental chemist, have a balance scale and a kit of\nweights f...
{ "code_size": 1695, "language": "C++", "problem_id": "p01119", "submission_id": "s440778997" }
[ { "content": "You are a helpful 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": "Problem Statement\nWe have a tree with\nN\nvertices and\nN-1\nedges, respectively numbere...
{ "code_size": 691, "language": "C", "problem_id": "p02617", "submission_id": "s278144391" }
[ { "content": "You are a helpful coding 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 an\nN×N\ncheckerboard.\nFrom the square at the upper left corn...
{ "code_size": 1186, "language": "C++", "problem_id": "p03897", "submission_id": "s205910405" }
[ { "content": "You are a helpful coding 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 number\n105\nis quite special - it is odd but still it has eight d...
{ "code_size": 311, "language": "C", "problem_id": "p03281", "submission_id": "s331133780" }
[ { "content": "You are a helpful 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:\nNim\nLet's play a traditional game Nim. You and I are seated across a table a...
{ "code_size": 530, "language": "C", "problem_id": "p00809", "submission_id": "s315392342" }
[ { "content": "You are a helpful coding 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 C:\nPollock's conjecture\nThe\nn\nth triangular number is\ndefined as\nthe sum of...
{ "code_size": 664, "language": "C", "problem_id": "p00748", "submission_id": "s810654891" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Print a Chessboard\nDraw a chessboard which has a height of\nH\ncm and a width of\nW\ncm....
{ "code_size": 441, "language": "C", "problem_id": "p02405", "submission_id": "s832142681" }
[ { "content": "You are a helpful 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:\nViva Confetti\nDo you know\nconfetti\n? They are small discs of colored paper...
{ "code_size": 2187, "language": "C", "problem_id": "p00818", "submission_id": "s818780493" }
[ { "content": "You are a helpful 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:\nSave your cats\nNicholas Y. Alford was a cat lover. He had a garden in a vill...
{ "code_size": 2913, "language": "C", "problem_id": "p01341", "submission_id": "s465662291" }
[ { "content": "You are a helpful coding 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\nH \\times W\ngrid (\nH\nvertical,\nW\nhorizontal), where ...
{ "code_size": 2163, "language": "C++", "problem_id": "p03383", "submission_id": "s406205403" }
[ { "content": "You are a helpful coding 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": 199, "language": "C", "problem_id": "p02659", "submission_id": "s764826721" }
[ { "content": "You are a 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 with Limitations\nYou have\nN\nitems that you want to put them into a kn...
{ "code_size": 815, "language": "C", "problem_id": "p02320", "submission_id": "s218894691" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou are given an array\na_0, a_1, ..., a_{N-1}\nof length\nN\n. Proces...
{ "code_size": 2391, "language": "C", "problem_id": "p02567", "submission_id": "s661690581" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Delete Files\nYou are using an operating system named \"Jaguntu\". Jaguntu provides \"Fil...
{ "code_size": 1665, "language": "C", "problem_id": "p01830", "submission_id": "s239343904" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Drawing Lots\nLet's play Amidakuji.\nIn the following example, there are five vertical li...
{ "code_size": 422, "language": "C++", "problem_id": "p00011", "submission_id": "s431945056" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nYou are given a string\nS\nconsisting of uppercase English letters. Fi...
{ "code_size": 456, "language": "C", "problem_id": "p03086", "submission_id": "s594934208" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nSnuke has decided to construct a string that starts with\nA\nand ends ...
{ "code_size": 332, "language": "C", "problem_id": "p03814", "submission_id": "s617974150" }
[ { "content": "You are a helpful 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:\nWhere's Wally\nDo you know the famous series of children's books named \"Wher...
{ "code_size": 2746, "language": "C++", "problem_id": "p00891", "submission_id": "s628080280" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Search II\nYou are given a sequence of\nn\nintegers S and a sequence of different\nq\nint...
{ "code_size": 663, "language": "C++", "problem_id": "p02268", "submission_id": "s997226190" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nTwo children are playing tag on a number line. (In the game of tag, th...
{ "code_size": 360, "language": "C", "problem_id": "p02646", "submission_id": "s956999634" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Entrance Examination\nThe International Competitive Programming College (ICPC) is famous\...
{ "code_size": 496, "language": "C", "problem_id": "p01085", "submission_id": "s336350966" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Bamboo Blossoms\nThe bamboos live for decades, and at the end of their lives,\nthey flowe...
{ "code_size": 431, "language": "C", "problem_id": "p01095", "submission_id": "s232247884" }
[ { "content": "You are a helpful coding 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've come to your favorite store Infinitesco to buy some ice tea.\nT...
{ "code_size": 552, "language": "C", "problem_id": "p03617", "submission_id": "s312324692" }
[ { "content": "You are a helpful 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:\nCircle and Points\nYou are given\nN\npoints in the\nxy\n-plane. You have a\nc...
{ "code_size": 749, "language": "C", "problem_id": "p00713", "submission_id": "s123816404" }
[ { "content": "You are a helpful coding 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, there is a east-west railroad and\nN\ncities alo...
{ "code_size": 780, "language": "C", "problem_id": "p03283", "submission_id": "s326573192" }
[ { "content": "You are a helpful 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:\nVerbal Arithmetic\nLet's think about\nverbal arithmetic.\nThe material of thi...
{ "code_size": 1779, "language": "C++", "problem_id": "p00742", "submission_id": "s916489925" }
[ { "content": "You are a helpful 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:\nInfected Computer\nAdam Ivan is working as a system administrator at Soy Grou...
{ "code_size": 834, "language": "C", "problem_id": "p01273", "submission_id": "s180856045" }
[ { "content": "You are a helpful 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 F:\nSlim Span\nGiven an undirected weighted graph\nG\n, you should find one of sp...
{ "code_size": 1712, "language": "C++", "problem_id": "p00859", "submission_id": "s483917003" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Swapping Characters\nYou are given a string and a number\nk\n. You are suggested to gener...
{ "code_size": 2158, "language": "C++", "problem_id": "p00360", "submission_id": "s815988613" }
[ { "content": "You are a helpful 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": "What is the Number in my Mind ?\nLet us enjoy a number guess game.\nA number containing L...
{ "code_size": 2284, "language": "C", "problem_id": "p00703", "submission_id": "s147866941" }
[ { "content": "You are a helpful coding 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. Vertex\n1\nis the root of the tree, ...
{ "code_size": 2876, "language": "C", "problem_id": "p03603", "submission_id": "s327436423" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Disjoint Set\nWrite a program which manipulates a disjoint set\nS = {S\n1\n, S\n2\n, . . ...
{ "code_size": 1089, "language": "C++", "problem_id": "p02343", "submission_id": "s345747217" }
[ { "content": "You are a helpful coding 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\npoints\n(x_i,y_i)\nlocated on a two-dimensional plan...
{ "code_size": 1315, "language": "C++", "problem_id": "p03615", "submission_id": "s284058160" }
[ { "content": "You are a helpful 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:\nA Piece of Cake\nIn the city, there are two pastry shops. One shop was very ...
{ "code_size": 278, "language": "C++", "problem_id": "p00613", "submission_id": "s111650939" }
[ { "content": "You are a helpful coding assistant. Carefully follow the user's instructions to generate fully functional and secure code which follows best security practices.", "role": "system" }, { "content": "Problem Statement\nConsider the following game:\nThe game is played using a row of\nN\nsq...
{ "code_size": 7529, "language": "C", "problem_id": "p03529", "submission_id": "s175138593" }
[ { "content": "You are a helpful coding 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\nN\n.\nFind the number of the pairs o...
{ "code_size": 1432, "language": "C", "problem_id": "p03847", "submission_id": "s145336606" }
[ { "content": "You are a 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 Balance of the World\nThe world should be finely balanced. Positive vs. negative,\nl...
{ "code_size": 879, "language": "C++", "problem_id": "p00754", "submission_id": "s606840253" }
[ { "content": "You are a helpful coding 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 integers\nN\nand\nK\n. Find the number of triples\n(a,b,...
{ "code_size": 361, "language": "C", "problem_id": "p03266", "submission_id": "s290185888" }
[ { "content": "You are a helpful coding 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 square-shaped grid with\nN\nvertical rows and\nN\nhorizonta...
{ "code_size": 1327, "language": "C++", "problem_id": "p03792", "submission_id": "s552912947" }
[ { "content": "You are a 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 IV\nWrite a program which reads $n$ dices constructed in the same way as\nDice I\n, ...
{ "code_size": 1832, "language": "C", "problem_id": "p02386", "submission_id": "s201659987" }