name stringlengths 2 112 | description stringlengths 29 13k | private_tests sequence | public_tests sequence | generated_tests sequence |
|---|---|---|---|---|
brcktsrm | Problem description.
Vipul is a hardworking super-hero who maintains the bracket ratio of all the strings in the world. Recently he indulged himself in saving the string population so much that he lost his ability for checking brackets (luckily, not permanently ).Being his super-hero friend help him in his time of hard... | {
"input": [],
"output": []
} | {
"input": [
"3\n((()))\n(())()\n()(()"
],
"output": [
"YES\nYES\nNO"
]
} | {
"input": [
"3\n((()))\n(())()\n()())",
"3\n((()()\n(())()\n()(()",
"3\n((()))\n(())))\n()())",
"3\n)))(((\n(())))\n()())",
"3\n((()))\n(())()\n))(((",
"3\n((()()\n(())()\n()(((",
"3\n((()))\n(())()\n()()(",
"3\n((()()\n'())()\n()(((",
"3\n)))(((\n(())))\n()(*)",
"3\n)(()()\n'... |
comm3 | The Chef likes to stay in touch with his staff. So, the Chef, the head server, and the sous-chef all carry two-way transceivers so they can stay in constant contact. Of course, these transceivers have a limited range so if two are too far apart, they cannot communicate directly.
The Chef invested in top-of-the-line t... | {
"input": [],
"output": []
} | {
"input": [
"3\n1\n0 1\n0 0\n1 0\n2\n0 1\n0 0\n1 0\n2\n0 0\n0 2\n2 1"
],
"output": [
"yes\nyes\nno\n"
]
} | {
"input": [
"3\n1\n0 1\n0 -1\n1 0\n2\n0 1\n0 0\n1 0\n2\n0 0\n0 2\n2 1",
"3\n2\n0 1\n0 -1\n1 0\n2\n0 1\n0 0\n1 0\n2\n0 0\n0 2\n2 1",
"3\n2\n0 -1\n0 -1\n1 0\n2\n0 0\n0 0\n1 0\n2\n1 0\n1 2\n2 1",
"3\n2\n0 -1\n-1 -1\n2 0\n2\n1 0\n0 -1\n1 -1\n2\n1 0\n1 2\n1 1",
"3\n2\n0 -1\n0 -1\n2 0\n2\n2 0\n0 -1\n1 ... |
gcd2 | Frank explained its friend Felman the algorithm of Euclides to calculate the GCD
of two numbers. Then Felman implements it algorithm
int gcd(int a, int b)
{
if (b==0)
return a;
else
return gcd(b,a%b);
}
and it proposes to Frank that makes it
but with a little integer and another integer that has up to 250 d... | {
"input": [],
"output": []
} | {
"input": [
"2\n2 6\n10 11"
],
"output": [
"2\n1\n"
]
} | {
"input": [
"2\n3 6\n10 11",
"2\n1 3\n10 11",
"2\n0 6\n10 11",
"2\n0 6\n0 11",
"2\n3 6\n8 22",
"2\n3 6\n8 4",
"2\n5 2\n10 2",
"2\n4 10\n8 6",
"2\n7 14\n8 6",
"2\n7 14\n8 4",
"2\n2 6\n5 2",
"2\n0 14\n16 2",
"2\n0 11\n10 1",
"2\n0 14\n16 1",
"2\n1 3\n10 5",
... |
luckybal | A Little Elephant from the Zoo of Lviv likes lucky strings, i.e., the strings that consist only of the lucky digits 4 and 7.
The Little Elephant calls some string T of the length M balanced if there exists at least one integer X (1 ≤ X ≤ M) such that the number of digits 4 in the substring T[1, X - 1] is equal to the n... | {
"input": [],
"output": []
} | {
"input": [
"4\n47\n74\n477\n4747477"
],
"output": [
"2\n2\n3\n23\n"
]
} | {
"input": [
"4\n47\n47\n477\n4747477",
"4\n7\n47\n477\n4747477",
"4\n4\n47\n477\n4747477",
"4\n7\n7\n477\n4747477",
"4\n7\n44\n477\n4747477",
"4\n44\n74\n477\n4747477",
"4\n7\n44\n7\n4747477",
"4\n47\n44\n477\n4747477",
"4\n47\n4\n477\n4747477",
"4\n7\n7\n447\n4747477",
"4... |
prpaln | Given a string s. Can you make it a palindrome by deleting exactly one character? Note that size of the string after deletion would be one less than it was before.
Input
First line of the input contains a single integer T denoting number of test cases.
For each test case, you are given a single line containing string... | {
"input": [],
"output": []
} | {
"input": [
"4\naaa\nabc\nabdbca\nabba"
],
"output": [
"YES\nNO\nYES\nYES\n"
]
} | {
"input": [
"4\naaa\nabc\nabdbca\nabca",
"4\naaa\nabc\nabdbc`\naaca",
"4\naab\nacc\n`bd`cb\naaad",
"4\nbaa\nabc\n`bd`bb\naabd",
"4\nbab\nabb\nbb`db`\naabd",
"4\nbaa\n`aa\nbb`c`b\ndba`",
"4\nba`\n`aa\nbb`c_c\ndba`",
"4\n`a_\naa`\ndda`^c\nca^a",
"4\n_c`\n]`_\ncdad^`\n`c_^",
"4\n... |
tf01 | An established group of scientists are working on finding solution to NP hard problems. They claim Subset Sum as an NP-hard problem. The problem is to determine whether there exists a subset of a given set S whose sum is a given number K.
You are a computer engineer and you claim to solve this problem given that all... | {
"input": [],
"output": []
} | {
"input": [
"2\n5 10\n3 4 6 1 9\n3 2\n1 3 4"
],
"output": [
"1\n0"
]
} | {
"input": [],
"output": []
} |
1170_E. Sliding Doors | Imagine that you are the CEO of a big old-fashioned company. Unlike any modern and progressive company (such as JetBrains), your company has a dress code. That's why you have already allocated a spacious room for your employees where they can change their clothes. Moreover, you've already purchased an m-compartment war... | {
"input": [],
"output": []
} | {
"input": [
"3 10\n2 3 2\n6\n1 5\n2 1 10\n2 2 9\n2 5 6\n3 1 7 8\n4 1 2 3 4\n"
],
"output": [
"\nYES\nYES\nNO\nNO\nYES\nNO\n"
]
} | {
"input": [],
"output": []
} |
1250_B. The Feast and the Bus | Employees of JebTrains are on their way to celebrate the 256-th day of the year! There are n employees and k teams in JebTrains. Each employee is a member of some (exactly one) team. All teams are numbered from 1 to k. You are given an array of numbers t_1, t_2, ..., t_n where t_i is the i-th employee's team number.
J... | {
"input": [],
"output": []
} | {
"input": [
"6 3\n3 1 2 3 2 3\n",
"10 1\n1 1 1 1 1 1 1 1 1 1\n",
"12 4\n1 2 3 1 2 3 4 1 2 1 2 1\n"
],
"output": [
"\n6\n",
"\n10\n",
"\n12\n"
]
} | {
"input": [],
"output": []
} |
1311_F. Moving Points | There are n points on a coordinate axis OX. The i-th point is located at the integer point x_i and has a speed v_i. It is guaranteed that no two points occupy the same coordinate. All n points move with the constant speed, the coordinate of the i-th point at the moment t (t can be non-integer) is calculated as x_i + t ... | {
"input": [],
"output": []
} | {
"input": [
"3\n1 3 2\n-100 2 3\n",
"2\n2 1\n-3 0\n",
"5\n2 1 4 3 5\n2 2 2 3 4\n"
],
"output": [
"3\n",
"0\n",
"19\n"
]
} | {
"input": [
"3\n1 3 2\n-100 2 6\n",
"2\n2 1\n-4 0\n",
"2\n0 1\n-4 0\n",
"2\n0 2\n-4 0\n",
"3\n1 5 2\n-167 2 6\n",
"3\n1 3 2\n-75 1 0\n",
"3\n1 7 2\n-255 0 6\n",
"3\n1 3 8\n-75 1 0\n",
"3\n1 3 8\n-75 1 1\n",
"3\n0 4 8\n-75 1 1\n",
"3\n0 4 8\n-75 1 0\n",
"5\n2 1 4 3 5\n0... |
1490_G. Old Floppy Drive | Polycarp was dismantling his attic and found an old floppy drive on it. A round disc was inserted into the drive with n integers written on it.
Polycarp wrote the numbers from the disk into the a array. It turned out that the drive works according to the following algorithm:
* the drive takes one positive number x... | {
"input": [],
"output": []
} | {
"input": [
"3\n3 3\n1 -3 4\n1 5 2\n2 2\n-2 0\n1 2\n2 2\n0 1\n1 2\n"
],
"output": [
"\n0 6 2 \n-1 -1 \n1 3 \n"
]
} | {
"input": [
"3\n3 3\n1 -3 4\n1 5 2\n2 2\n-4 0\n1 2\n2 2\n0 1\n1 2\n",
"3\n3 3\n1 -3 4\n1 5 2\n2 2\n-2 0\n1 2\n2 2\n0 2\n1 2\n",
"3\n3 3\n2 -3 4\n1 5 2\n2 2\n-4 0\n1 2\n2 2\n0 1\n1 2\n",
"3\n3 3\n0 -3 4\n1 5 2\n2 2\n-4 0\n1 1\n2 2\n0 1\n1 2\n",
"3\n3 3\n1 -3 4\n1 5 4\n2 2\n-2 0\n1 2\n2 2\n0 2\n1 2... |
470_F. Pairwise Sums | You are given an array of n integers. For each element output the sum of itself and the previous element. For the first element, output the sum of the first and the last elements of the array.
Input
The input consists of a single line of space-separated integers. The first number is n (2 ≤ n ≤ 50) — the size of the a... | {
"input": [],
"output": []
} | {
"input": [
"4 1 2 3 4\n",
"5 5 46 372 81 9\n"
],
"output": [
"5 3 5 7 ",
"14 51 418 453 90 "
]
} | {
"input": [],
"output": []
} |
roys-life-cycle | Roy is going through the dark times of his life. Recently his girl friend broke up with him and to overcome the pain of acute misery he decided to restrict himself to Eat-Sleep-Code life cycle. For N days he did nothing but eat, sleep and code.
A close friend of Roy kept an eye on him for last N days. For every sing... | {
"input": [],
"output": []
} | {
"input": [
"4\nSSSSEEEECCCCEECCCC\nCCCCCSSSSEEECCCCSS\nSSSSSEEESSCCCCCCCS\nEESSSSCCCCCCSSEEEESAMPLE"
],
"output": [
"7 9\n"
]
} | {
"input": [
"4\nSSSSEEEECCCCEECCCC\nCCCCCSSSSEEECCCCSS\nSCCCCCCCSSEEESSSSS\nEESSSSCCCCCCSSEEEESAMPLE",
"4\nCCCCEECBCCEEEESSSS\nCCCCCSSSSEEECCCCSS\nSSSSSEEESSCCCCCCCS\nEESSSSCCCCCCSSEEEESAMPLE",
"4\nSSSSEEEECCCCEECCCC\nCCCCSSSSSEEECCCCSC\nSCCCCCCCSSEEESSSSS\nEESSSSCCCCCCSSEEEESAMPLE",
"4\nSESSEEEECCBD... |
vowel | Rakesh have learn about vowel in school and is given an assignment by his teacher in which he has to list all vowel together from the word's given to him,but he is busy in watching cricket match and want your help to solve the assignment.
5 vowel (a,e,i,o,u) and you should also take care of uppercase vowel (A,E,I,O,U)... | {
"input": [],
"output": []
} | {
"input": [
"3\nSdfgAe\nOut\nGet\n\nSAMPLE"
],
"output": [
"Ae\nOu\ne\n"
]
} | {
"input": [
"3\nfdSgAe\nOut\nGet\n\nSAMPLE",
"3\nfdSgAe\ntuO\nFet\n\nSAMPLE",
"3\nBdSgfe\ntuO\nFet\n\nSAMPLD",
"3\nefgSdB\nOut\nteF\n\nDLPMAS",
"3\nefgSdB\nOut\ntfF\n\nDLPMAS",
"3\nBfgSde\nuOt\ntFg\n\nDLPMAS",
"3\nBcgSge\ntPu\nteF\n\nDMONAR",
"3\nBcgSge\ntPu\nteE\n\nDMONAR",
"3\nB... |
p02613 AtCoder Beginner Contest 173 - Judge Status Summary | Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.
The problem has N test cases.
For each test case i (1\leq i \leq N), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is `AC`,... | {
"input": [],
"output": []
} | {
"input": [
"6\nAC\nTLE\nAC\nAC\nWA\nTLE",
"10\nAC\nAC\nAC\nAC\nAC\nAC\nAC\nAC\nAC\nAC"
],
"output": [
"AC x 3\nWA x 1\nTLE x 2\nRE x 0",
"AC x 10\nWA x 0\nTLE x 0\nRE x 0"
]
} | {
"input": [],
"output": []
} |
p02744 Panasonic Programming Contest 2020 - String Equivalence | In this problem, we only consider strings consisting of lowercase English letters.
Strings s and t are said to be isomorphic when the following conditions are satisfied:
* |s| = |t| holds.
* For every pair i, j, one of the following holds:
* s_i = s_j and t_i = t_j.
* s_i \neq s_j and t_i \neq t_j.
For example, `a... | {
"input": [],
"output": []
} | {
"input": [
"1",
"2"
],
"output": [
"a",
"aa\nab"
]
} | {
"input": [
"4",
"6",
"3",
"7",
"5",
"8",
"4",
"3",
"5",
"6",
"8",
"7"
],
"output": [
"aaaa\naaab\naaba\naabb\naabc\nabaa\nabab\nabac\nabba\nabbb\nabbc\nabca\nabcb\nabcc\nabcd\n",
"aaaaaa\naaaaab\naaaaba\naaaabb\naaaabc\naaabaa\naaabab\naaabac\naaabba\naaab... |
p02879 AtCoder Beginner Contest 144 - 9x9 | Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.
Given are two integers A and B.
If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.
Constraints
* 1 \leq A \leq 20
* 1 \leq B ... | {
"input": [],
"output": []
} | {
"input": [
"2 5",
"9 9",
"5 10"
],
"output": [
"10",
"81",
"-1"
]
} | {
"input": [
"2 8",
"9 5",
"7 10",
"3 8",
"9 8",
"7 7",
"6 8",
"7 9",
"7 8",
"7 3",
"7 2",
"9 2",
"9 4",
"9 6",
"5 6",
"2 6",
"2 2",
"8 5",
"5 1",
"4 8",
"3 9",
"2 3",
"2 4",
"2 1",
"5 3",
"1 3",
"4 5",
"1 ... |
p03013 AtCoder Beginner Contest 129 - Typical Stairs | There is a staircase with N steps. Takahashi is now standing at the foot of the stairs, that is, on the 0-th step. He can climb up one or two steps at a time.
However, the treads of the a_1-th, a_2-th, a_3-th, \ldots, a_M-th steps are broken, so it is dangerous to set foot on those steps.
How many are there to climb ... | {
"input": [],
"output": []
} | {
"input": [
"100 5\n1\n23\n45\n67\n89",
"10 2\n4\n5",
"6 1\n3"
],
"output": [
"608200469",
"0",
"4"
]
} | {
"input": [
"100 5\n1\n23\n45\n47\n89",
"10 2\n4\n1",
"4 1\n3",
"100 3\n1\n23\n45\n47\n89",
"100 0\n1\n23\n45\n47\n89",
"10 2\n3\n2",
"101 0\n0\n35\n44\n58\n89",
"101 5\n1\n23\n45\n67\n89",
"6 1\n1",
"100 5\n1\n23\n21\n47\n89",
"10 0\n4\n1",
"4 1\n2",
"100 3\n1\n23... |
p03153 KEYENCE Programming Contest 2019 - Connecting Cities | There are N cities in Republic of AtCoder. The size of the i-th city is A_{i}. Takahashi would like to build N-1 bidirectional roads connecting two cities so that any city can be reached from any other city by using these roads.
Assume that the cost of building a road connecting the i-th city and the j-th city is |i-j... | {
"input": [],
"output": []
} | {
"input": [
"3 1\n1 100 1",
"12 5\n43 94 27 3 69 99 56 25 8 15 46 8",
"3 1000\n1 100 1",
"6 14\n25 171 7 1 17 162"
],
"output": [
"106",
"658",
"2202",
"497"
]
} | {
"input": [
"3 1\n2 100 1",
"12 5\n43 94 27 3 69 99 56 25 15 15 46 8",
"3 1000\n1 101 1",
"6 24\n25 171 7 1 17 162",
"3 1\n0 100 1",
"12 5\n43 94 27 3 69 99 56 25 27 15 46 8",
"3 1001\n1 101 1",
"6 24\n46 171 7 1 17 162",
"12 5\n43 94 27 3 69 99 56 25 27 15 46 7",
"6 24\n46 17... |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 6