problem_id
int64
4
2.66k
problem
stringlengths
398
5.35k
solution
stringlengths
32
4.72k
inputs_outputs
dict
1,432
"There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise orde(...TRUNCATED)
"n = int(input())\na = list(map(int, input().split()))\nans = a[0]\nl = []\n\nfor i in range(1, n, 2(...TRUNCATED)
{"inputs":["3\n2 2 4\n","5\n3 8 7 5 5\n","3\n1000000000 1000000000 0\n","57551\n980848641 876515918 (...TRUNCATED)
2,618
"You are an environmental activist at heart but the reality is harsh and you are just a cashier in a(...TRUNCATED)
"from math import gcd\n\n\ndef lcm(a, b): return a * b // gcd(a, b)\n\n\nfor _ in range(int(input())(...TRUNCATED)
{"inputs":["4\n1\n100\n50 1\n49 1\n100\n8\n100 200 100 200 100 200 100 100\n10 2\n15 3\n107\n3\n1000(...TRUNCATED)
562
"Polycarp is a great fan of television.\n\nHe wrote down all the TV programs he is interested in for(...TRUNCATED)
"n = int(input())\nshows = []\nfor i in range(n):\n l, r = map(int, input().split())\n shows.appen(...TRUNCATED)
{"inputs":["3\n1 2\n2 3\n4 5\n","4\n1 2\n2 3\n2 3\n1 2\n","4\n0 1\n1 2\n2 3\n3 4\n","3\n1 2\n2 3\n2 (...TRUNCATED)
46
"After finishing eating her bun, Alyona came up with two integers n and m. She decided to write down(...TRUNCATED)
"ct=0\na, b = list(map(int, input().split(' ')))\nx=[0]*5\nfor i in range(1, b+1):\n x[i%5]+=1\nf(...TRUNCATED)
{"inputs":["6 12\n","11 14\n","1 5\n","3 8\n","5 7\n","21 21\n","10 15\n","1 1\n","1 1000000\n","100(...TRUNCATED)
785
"The start of the new academic year brought about the problem of accommodation students into dormito(...TRUNCATED)
"\"\"\"\nCodeforces Contest 266 Div 2 Problem B\n\nAuthor : chaotic_iak\nLanguage: Python 3.3.4\n\"(...TRUNCATED)
{"inputs":["3 3 5\n","2 4 4\n","1 1 1\n","1 1000000000 1000000000\n","8 7 5\n","1000000000 1 1\n","1(...TRUNCATED)
68
"Vasya has got a robot which is situated on an infinite Cartesian plane, initially in the cell $(0, (...TRUNCATED)
"# \nimport collections, atexit, math, sys, bisect \n\nsys.setrecursionlimit(1000000)\ndef getI(...TRUNCATED)
{"inputs":["5\nRURUU\n-2 3\n","4\nRULR\n1 1\n","3\nUUU\n100 100\n","6\nUDUDUD\n0 1\n","100\nURDLDDLL(...TRUNCATED)
202
"Professor GukiZ makes a new robot. The robot are in the point with coordinates (x_1, y_1) and shoul(...TRUNCATED)
"a, b = map(int, input().split())\nd, c = map(int, input().split())\nprint(max(abs(a - d), abs(b - c(...TRUNCATED)
{"inputs":["0 0\n4 5\n","3 4\n6 1\n","0 0\n4 6\n","1 1\n-3 -5\n","-1 -1\n-10 100\n","1 -1\n100 -100\(...TRUNCATED)
67
"Nauuo is a girl who loves writing comments.\n\nOne day, she posted a comment on Codeforces, wonderi(...TRUNCATED)
"x, y, z = map(int, input().split())\nif z == 0:\n if x == y:\n print('0')\n elif x > y(...TRUNCATED)
{"inputs":["3 7 0\n","2 0 1\n","1 1 0\n","0 0 1\n","12 1 11\n","22 99 77\n","28 99 70\n","73 29 43\n(...TRUNCATED)
104
"Polycarp has created his own training plan to prepare for the programming contests. He will train f(...TRUNCATED)
"def main():\n n = int(input())\n a = list(int(x) for x in input().split())\n s = sum(a)\n (...TRUNCATED)
{"inputs":["4\n1 3 2 1\n","6\n2 2 2 2 2 2\n","1\n10000\n","3\n2 1 1\n","2\n1 3\n","4\n2 1 1 3\n","3\(...TRUNCATED)
1,620
"In the beginning of the new year Keivan decided to reverse his name. He doesn't like palindromes, s(...TRUNCATED)
n = int(input()) s = "aabb" * ((n+4)//4) s = s[:n] print(s)
{"inputs":["2\n","3\n","38\n","47\n","59\n","67\n","77\n","89\n","98\n","109\n","117\n","1\n","6\n",(...TRUNCATED)
README.md exists but content is empty.
Downloads last month
129