id stringlengths 3 8 | aliases sequencelengths 1 19 ⌀ | contest_id stringlengths 1 4 | contest_name stringlengths 10 125 | contest_type stringclasses 3
values | contest_start int64 1.27B 1.72B | contest_start_year int64 2.01k 2.02k | index stringclasses 58
values | time_limit float64 0.4 60 ⌀ | memory_limit float64 4 1.02k ⌀ | title stringlengths 2 64 | instruction_seed stringlengths 1 9.88k | input_format stringlengths 1 2.72k ⌀ | output_format stringlengths 1 2.22k ⌀ | interaction_format stringclasses 118
values | note stringlengths 13 5.36k ⌀ | examples listlengths 0 7 ⌀ | editorial stringlengths 11 22.2k ⌀ | embedding sequencelengths 3.07k 3.07k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
852/A | null | 852 | Bubble Cup X - Finals [Online Mirror] | ICPC | 1,504,432,800 | 2,017 | A | 1 | 256 | Digits | John gave Jack a very hard problem. He wrote a very big positive integer A0 on a piece of paper. The number is less than 10200000 . In each step, Jack is allowed to put ' + ' signs in between some of the digits (maybe none) of the current number and calculate the sum of the expression. He can perform the same procedure... | First line contains a positive integer N (1 ≤ N ≤ 200000), representing the number of digits of A0.
Second line contains a string of length N representing positive integer number A0. Each character is digit. There will be no leading zeros. | Output exactly three lines, the steps Jack needs to perform to solve the problem. You can output any sequence of steps which results in a single digit number (and is logically consistent).
Every step consists of digits and ' + ' signs. Steps should not contain several ' + ' signs in a row, whitespaces, or ' + ' signs ... | null | In the first sample, Jack can't put ' + ' signs anywhere, so he just writes 1 in each line and solves the problem. Here, solution is unique.
In the second sample, Jack first puts ' + ' between every two consecutive digits, thus getting the result 5 + 8 + 0 + 6 = 19. He does the same on the second step, getting 1 + 9 =... | [
{
"input": "1\n1",
"output": "1\n1\n1"
},
{
"input": "4\n5806",
"output": "5+8+0+6\n1+9\n1+0"
}
] | null | [
0.019304318353533745,
-0.02321775071322918,
0.0014574979431927204,
0.028021926060318947,
-0.0034352049697190523,
0.013237038627266884,
0.04585140570998192,
0.04144149646162987,
-0.00673168757930398,
0.04900551587343216,
-0.016559075564146042,
-0.007892575114965439,
-0.004095961805433035,
0... |
852/C | null | 852 | Bubble Cup X - Finals [Online Mirror] | ICPC | 1,504,432,800 | 2,017 | C | 0.5 | 256 | Property | Bill is a famous mathematician in BubbleLand. Thanks to his revolutionary math discoveries he was able to make enough money to build a beautiful house. Unfortunately, for not paying property tax on time, court decided to punish Bill by making him lose a part of his property.
Bill’s property can be observed as a convex... | The first line contains one integer number n (2 ≤ n ≤ 50000), representing number of edges of 2n-sided polygon.
The second line contains n distinct integer numbers B2k (0 ≤ B2k ≤ n - 1, k = 0... n - 1) separated by a single space, representing points the court chose. If B2k = i, the court chose point Pi on side A2k A... | Output contains n distinct integers separated by a single space representing points B1, B3, ..., B2n - 1 Bill should choose in order to maximize the property area. If there are multiple solutions that maximize the area, return any of them. | null | To maximize area Bill should choose points: B1 = P0, B3 = P2, B5 = P1 | [
{
"input": "3\n0 1 2",
"output": "0 2 1"
}
] | null | [
0.050666991621255875,
-0.04538431763648987,
0.00039948412450030446,
-0.029244428500533104,
0.03683280199766159,
0.006417283788323402,
0.0015806073788553476,
0.021101517602801323,
-0.008128316141664982,
0.03458547592163086,
-0.014797329902648926,
0.03406012803316116,
0.00682224053889513,
-0... |
852/D | null | 852 | Bubble Cup X - Finals [Online Mirror] | ICPC | 1,504,432,800 | 2,017 | D | 2 | 256 | Exploration plan | "The competitors of Bubble Cup X gathered after the competition and discussed what is the best way t(...TRUNCATED) | "The first line contains four integers: V, E, N and K (1 ≤ V ≤ 600, 1 ≤ E ≤ 20000, (...TRUNCATED) | "Output a single integer that represents the minimal time the teams can move for, such that they end(...TRUNCATED) | null | "Three teams start from city 5, and two teams start from city 2. If they agree to move for 3 minutes(...TRUNCATED) | [
{
"input": "6 7 5 4\n5 5 2 2 5\n1 3 3\n1 5 2\n1 6 5\n2 5 4\n2 6 7\n3 4 11\n3 5 3",
"output": "3"
}
] | null | [0.013454585336148739,-0.04587220400571823,-0.013374541886150837,-0.022848783060908318,0.00136619713(...TRUNCATED) |
852/E | null | 852 | Bubble Cup X - Finals [Online Mirror] | ICPC | 1,504,432,800 | 2,017 | E | 1 | 256 | Casinos and travel | "John has just bought a new car and is planning a journey around the country. Country has N cities, (...TRUNCATED) | "In the first line, a positive integer N (1 ≤ N ≤ 100000), the number of cities.\n\nIn the next (...TRUNCATED) | Output one number, the answer to the problem modulo 109 + 7. | null | "Example 1: If Jack selects city 1 as John's starting city, he can either build 0 casinos, so John w(...TRUNCATED) | [
{
"input": "2\n1 2",
"output": "4"
},
{
"input": "3\n1 2\n2 3",
"output": "10"
}
] | null | [0.020806338638067245,-0.039569322019815445,-0.009498845785856247,0.0007623755955137312,0.0104652978(...TRUNCATED) |
852/F | null | 852 | Bubble Cup X - Finals [Online Mirror] | ICPC | 1,504,432,800 | 2,017 | F | 3 | 256 | Product transformation | "Consider an array A with N elements, all being the same integer a.\n\nDefine the product transforma(...TRUNCATED) | "The first and only line of input contains four integers N, M, a, Q (7 ≤ Q ≤ 109 + 123, 2 ≤ a (...TRUNCATED) | You should output the array A from left to right. | null | "The multiplicative order of a number a modulo Q $$\\phi(a,Q)$$, is the smallest natural number x su(...TRUNCATED) | [
{
"input": "2 2 2 7",
"output": "1 2"
}
] | null | [-0.029524866491556168,0.003765002591535449,-0.0008369368151761591,0.03221600130200386,0.00131645717(...TRUNCATED) |
852/G | null | 852 | Bubble Cup X - Finals [Online Mirror] | ICPC | 1,504,432,800 | 2,017 | G | 2 | 256 | Bathroom terminal | "Smith wakes up at the side of a dirty, disused bathroom, his ankle chained to pipes. Next to him is(...TRUNCATED) | "The first line of input contains two integers N and M (1 ≤ N ≤ 100 000, 1 ≤ M ≤ 5000), re(...TRUNCATED) | "Output contains M lines and each line consists of one integer, representing the number of words tha(...TRUNCATED) | null | "If we switch '?' with 'b', 'e' and with empty character, we get 'abc', 'aec' and 'ac' respectively.(...TRUNCATED) | [
{
"input": "3 1\nabc\naec\nac\na?c",
"output": "3"
}
] | null | [0.022001683712005615,-0.0005931438645347953,-0.0014650654047727585,0.006880469154566526,0.000039172(...TRUNCATED) |
852/H | null | 852 | Bubble Cup X - Finals [Online Mirror] | ICPC | 1,504,432,800 | 2,017 | H | 2 | 256 | Bob and stages | "The citizens of BubbleLand are celebrating their 10th anniversary so they decided to organize a big(...TRUNCATED) | "The first line of input contains two integers N (3 ≤ N ≤ 200) and K (3 ≤ K ≤ min(N, 50)), s(...TRUNCATED) | "Output contains only one line with one number, rounded to exactly two decimal places: the maximal f(...TRUNCATED) | null | "Example explanation: From all possible convex polygon with 4 vertices and no other vertex inside, t(...TRUNCATED) | [
{
"input": "5 4\n0 0\n3 0\n2 1\n4 4\n1 5",
"output": "10.00"
}
] | null | [0.051988545805215836,-0.03641929477453232,-0.009491778910160065,-0.020000264048576355,0.04998548328(...TRUNCATED) |
852/I | null | 852 | Bubble Cup X - Finals [Online Mirror] | ICPC | 1,504,432,800 | 2,017 | I | 2 | 64 | Dating | "This story is happening in a town named BubbleLand. There are n houses in BubbleLand. In each of th(...TRUNCATED) | "The first line contains an integer n (1 ≤ n ≤ 105), the number of houses in the town.\n\nThe se(...TRUNCATED) | For each of the q questions output a single number, the answer to the citizens question. | null | "In the first question from house 1 to house 3, the potential couples are (1, 3) and (6, 3).\n\nIn t(...TRUNCATED) | [{"input":"7\n1 0 0 1 0 1 0\n9 2 9 2 2 9 9\n2 6\n1 2\n4 2\n6 5\n3 6\n7 4\n2\n1 3\n7 5","output":"2\n(...TRUNCATED) | null | [-0.007138661574572325,-0.02205323800444603,-0.006977558601647615,0.009164981544017792,-0.0034547685(...TRUNCATED) |
1268/E | null | 1268 | Codeforces Round 609 (Div. 1) | CF | 1,576,926,300 | 2,019 | E | 3 | 256 | Happy Cactus | "You are given a cactus graph, in this graph each edge lies on at most one simple cycle.\n\nIt is gi(...TRUNCATED) | "The first line of input contains two integers $$$n,m$$$ ($$$1 \\leq n, m \\leq 500\\,000$$$): the n(...TRUNCATED) | Print $$$n$$$ integers, required values for vertices $$$1,2,\ldots,n$$$. | null | null | [{"input":"3 3\n1 2\n2 3\n3 1","output":"2 2 2"},{"input":"5 4\n1 2\n2 3\n3 4\n4 5","output":"4 4 3 (...TRUNCATED) | "At first, let's solve for the tree. Let $$$dp_v$$$ be the number of answer for vertex $$$v$$$.\nLet(...TRUNCATED) | [-0.006448009982705116,-0.011169636622071266,-0.008735619485378265,0.014164880849421024,0.0144088929(...TRUNCATED) |
819/A | [
"820/C"
] | 819 | Codeforces Round 421 (Div. 1) | CF | 1,498,574,100 | 2,017 | A | 2 | 256 | Mister B and Boring Game | "Sometimes Mister B has free evenings when he doesn't know what to do. Fortunately, Mister B found a(...TRUNCATED) | "First and only line contains four space-separated integers: a, b, l and r (1 ≤ a, b ≤ 12, 1 ≤(...TRUNCATED) | "Print one integer — the minimum possible number of different letters in the segment from position(...TRUNCATED) | null | "In the first sample test one of optimal strategies generate string s = \"abababab...\", that's why (...TRUNCATED) | [
{
"input": "1 1 1 8",
"output": "2"
},
{
"input": "4 2 2 6",
"output": "3"
},
{
"input": "3 7 4 6",
"output": "1"
}
] | null | [0.04164566472172737,-0.026021892204880714,-0.007220177445560694,0.008077822625637054,0.029066866263(...TRUNCATED) |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 3