Search is not available for this dataset
problem_id stringlengths 32 32 | name stringlengths 2 112 | problem stringlengths 200 14k | test_cases stringlengths 33 79.2M | difficulty stringclasses 33
values | language listlengths 1 1 | source stringclasses 14
values | num_solutions int64 2 1.9M | starter_code stringlengths 0 1.47k | subset stringclasses 3
values |
|---|---|---|---|---|---|---|---|---|---|
9caa1077b564df25035a6f1a1e7e12f6 | Unusual Sequences | Count the number of distinct sequences *a*1,<=*a*2,<=...,<=*a**n* (1<=≤<=*a**i*) consisting of positive integers such that *gcd*(*a*1,<=*a*2,<=...,<=*a**n*)<==<=*x* and . As this number could be large, print the answer modulo 109<=+<=7.
*gcd* here means the [greatest common divisor](https://en.wikipedia.org/wiki/Great... | {"inputs": ["3 9", "5 8", "2 12", "1 8", "1 9", "1000000000 1000000000", "1000000000 1", "1 1000000000", "1 223092870", "1 1", "1 994593600", "1 425613469", "495219 444706662", "9357 18255507", "741547455 471761895", "225 315096300", "183612440 509579899", "231096994 462193988", "34601 35742833", "417485019 230941257",... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 11 | codeforces | |
9cb90a82bd95197253a14ed7ad33b899 | Ants in Leaves | Tree is a connected graph without cycles. A leaf of a tree is any vertex connected with exactly one other vertex.
You are given a tree with *n* vertices and a root in the vertex 1. There is an ant in each leaf of the tree. In one second some ants can simultaneously go to the parent vertex from the vertex they were in.... | {"inputs": ["12\n1 2\n1 3\n1 4\n2 5\n2 6\n3 7\n3 8\n3 9\n8 10\n8 11\n8 12", "2\n2 1", "2\n2 1", "10\n4 10\n6 10\n10 5\n10 7\n8 10\n4 2\n9 10\n4 1\n3 10", "10\n2 8\n10 8\n8 3\n4 3\n6 3\n6 1\n10 7\n9 1\n5 10", "10\n1 3\n4 3\n10 4\n10 6\n6 2\n5 2\n7 5\n7 8\n7 9"], "outputs": ["6", "1", "1", "8", "6", "9"]} | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 5 | codeforces | |
9cc28ba52aba545c3780e3a9c0f832da | Cottage Village | A new cottage village called «Flatville» is being built in Flatland. By now they have already built in «Flatville» *n* square houses with the centres on the *Оx*-axis. The houses' sides are parallel to the coordinate axes. It's known that no two houses overlap, but they can touch each other.
The architect bureau, wher... | {"inputs": ["2 2\n0 4\n6 2", "2 2\n0 4\n5 2", "2 3\n0 4\n5 2", "1 1\n1 1", "1 2\n2 1", "2 1\n2 1\n1 1", "2 2\n0 4\n7 4", "4 1\n-12 1\n-14 1\n4 1\n-11 1", "6 15\n19 1\n2 3\n6 2\n-21 2\n-15 2\n23 1", "10 21\n-61 6\n55 2\n-97 1\n37 1\n-39 1\n26 2\n21 1\n64 3\n-68 1\n-28 6", "26 51\n783 54\n-850 6\n-997 59\n573 31\n-125 20... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 90 | codeforces | |
9d2b5ee65c0045e12fa9b3f524675659 | Valuable Resources | Many computer strategy games require building cities, recruiting army, conquering tribes, collecting resources. Sometimes it leads to interesting problems.
Let's suppose that your task is to build a square city. The world map uses the Cartesian coordinates. The sides of the city should be parallel to coordinate axes.... | {"inputs": ["2\n0 0\n2 2", "2\n0 0\n0 3", "2\n0 1\n1 0", "3\n2 2\n1 1\n3 3", "3\n3 1\n1 3\n2 2", "3\n0 1\n1 0\n2 2", "2\n-1000000000 -1000000000\n1000000000 1000000000", "2\n1000000000 -1000000000\n-1000000000 1000000000", "5\n-851545463 -208880322\n-154983867 -781305244\n293363100 785256340\n833468900 -593065920\n-920... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 76 | codeforces | |
9d391bfa29ae37e96e074688a9fb0afb | Script Generation | The Smart Beaver from ABBYY was offered a job of a screenwriter for the ongoing TV series. In particular, he needs to automate the hard decision: which main characters will get married by the end of the series.
There are *n* single men and *n* single women among the main characters. An opinion poll showed that viewers... | {"inputs": ["2 4 3\n1 1 1\n1 2 2\n2 1 3\n2 2 7", "2 4 7\n1 1 1\n1 2 2\n2 1 3\n2 2 7", "2 2 1\n1 2 8\n2 2 1", "5 25 140\n3 5 40\n3 3 42\n4 5 62\n2 4 7\n4 2 57\n1 5 69\n3 2 37\n2 5 43\n2 3 14\n1 3 67\n5 2 62\n3 1 13\n5 5 55\n1 2 71\n4 1 69\n1 4 32\n4 4 58\n5 3 2\n2 2 31\n5 1 20\n2 1 38\n1 1 69\n5 4 66\n3 4 27\n4 3 90", "... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 5 | codeforces | |
9d414439febda8a343619ca2a9563631 | none | Barney lives in NYC. NYC has infinite number of intersections numbered with positive integers starting from 1. There exists a bidirectional road between intersections *i* and 2*i* and another road between *i* and 2*i*<=+<=1 for every positive integer *i*. You can clearly see that there exists a unique shortest path bet... | {"inputs": ["7\n1 3 4 30\n1 4 1 2\n1 3 6 8\n2 4 3\n1 6 1 40\n2 3 7\n2 2 4", "1\n2 666077344481199252 881371880336470888", "10\n1 1 63669439577744021 396980128\n1 2582240553355225 63669439577744021 997926286\n1 2582240553355225 1 619026011\n1 1 4 231881718\n2 63669439577744021 3886074192977\n2 4 63669439577744021\n2 124... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 30 | codeforces | |
9d7fb75b456821e75179d7ea0fdffc1a | Annoying Present | Alice got an array of length $n$ as a birthday present once again! This is the third year in a row!
And what is more disappointing, it is overwhelmengly boring, filled entirely with zeros. Bob decided to apply some changes to the array to cheer up Alice.
Bob has chosen $m$ changes of the following form. For some int... | {"inputs": ["2 3\n-1 3\n0 0\n-1 -4", "3 2\n0 2\n5 0", "8 8\n-21 -60\n-96 -10\n-4 -19\n-27 -4\n57 -15\n-95 62\n-42 1\n-17 64", "1 1\n0 0", "100000 1\n1000 1000", "11 1\n0 -10", "3 1\n1 -1", "1 2\n-1 -1\n-2 -2", "1 2\n0 -1\n0 1", "1 1\n1 -2", "3 1\n2 -1", "3 1\n0 -1", "1 1\n-1000 -1000", "1 1\n0 -5", "15 3\n2 0\n2 -5\n-2... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 55 | codeforces | |
9da4d4dfbe964aedc131144ac538ce92 | Spider Man | Peter Parker wants to play a game with Dr. Octopus. The game is about cycles. Cycle is a sequence of vertices, such that first one is connected with the second, second is connected with third and so on, while the last one is connected with the first one again. Cycle may consist of a single isolated vertex.
Initially t... | {"inputs": ["3\n1 2 3", "5\n1 1 5 1 1", "1\n167959139", "10\n802030518 598196518 640274071 983359971 71550121 96204862 799843967 446173607 796619138 402690754", "1\n1", "1\n1000000000", "2\n2 4", "2\n1 1", "2\n1 2", "2\n2 1", "3\n1 3 1", "3\n1 2 1", "3\n2 1 1", "3\n1 1 2", "10\n9 8 5 4 1 1 2 1 1 1", "1\n2", "2\n3 3", "... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 10 | codeforces | |
9dc1d6525ae85b737334964d276c540c | The New Year: Meeting Friends | There are three friend living on the straight line *Ox* in Lineland. The first friend lives at the point *x*1, the second friend lives at the point *x*2, and the third friend lives at the point *x*3. They plan to celebrate the New Year together, so they need to meet at one point. What is the minimum total distance they... | {"inputs": ["7 1 4", "30 20 10", "1 4 100", "100 1 91", "1 45 100", "1 2 3", "71 85 88", "30 38 99", "23 82 95", "22 41 47", "9 94 77", "1 53 51", "25 97 93", "42 53 51", "81 96 94", "21 5 93", "50 13 75", "41 28 98", "69 46 82", "87 28 89", "44 45 40", "86 97 68", "43 92 30", "16 70 1", "40 46 19", "71 38 56", "82 21 ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 910 | codeforces | |
9e0515a4068120048830565280e77d56 | Platforms | In one one-dimensional world there are *n* platforms. Platform with index *k* (platforms are numbered from 1) is a segment with coordinates [(*k*<=-<=1)*m*,<=(*k*<=-<=1)*m*<=+<=*l*], and *l*<=<<=*m*. Grasshopper Bob starts to jump along the platforms from point 0, with each jump he moves exactly *d* units right. Fin... | {"inputs": ["2 2 5 3", "5 4 11 8", "228385 744978 699604 157872", "773663 427904 329049 243542", "835293 627183 442142 361649", "896922 310109 71587 16487", "958552 993036 701031 109903", "20182 192314 814124 268107", "81812 875240 443569 287155", "3 6 6 3", "3 16 6 3", "3 4 6 3", "680892 333996 619800 374820", "658990... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 24 | codeforces | |
9e093a55326a192a38e930a03fc3663c | Xor-tree | Iahub is very proud of his recent discovery, propagating trees. Right now, he invented a new tree, called xor-tree. After this new revolutionary discovery, he invented a game for kids which uses xor-trees.
The game is played on a tree having *n* nodes, numbered from 1 to *n*. Each node *i* has an initial value *init**... | {"inputs": ["10\n2 1\n3 1\n4 2\n5 1\n6 2\n7 5\n8 6\n9 8\n10 5\n1 0 1 1 0 1 0 1 0 1\n1 0 1 0 0 1 1 1 0 1", "15\n2 1\n3 2\n4 3\n5 4\n6 5\n7 6\n8 7\n9 8\n10 9\n11 10\n12 11\n13 12\n14 13\n15 14\n0 1 0 0 1 1 1 1 1 1 0 0 0 1 1\n1 1 1 1 0 0 1 1 0 1 0 0 1 1 0", "20\n2 1\n3 2\n4 3\n5 4\n6 4\n7 1\n8 2\n9 4\n10 2\n11 6\n12 9\n13... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 33 | codeforces | |
9e189aa263447d6e19b170980fdd35e7 | Dima and Continuous Line | Dima and Seryozha live in an ordinary dormitory room for two. One day Dima had a date with his girl and he asked Seryozha to leave the room. As a compensation, Seryozha made Dima do his homework.
The teacher gave Seryozha the coordinates of *n* distinct points on the abscissa axis and asked to consecutively connect th... | {"inputs": ["4\n0 10 5 15", "4\n0 15 5 10", "5\n0 1000 2000 3000 1500", "5\n-724093 710736 -383722 -359011 439613", "50\n384672 661179 -775591 -989608 611120 442691 601796 502406 384323 -315945 -934146 873993 -156910 -94123 -930137 208544 816236 466922 473696 463604 794454 -872433 -149791 -858684 -467655 -555239 623978... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 81 | codeforces | |
9e460867392575dbf57fd072b5ef2aeb | Young Photographer | Among other things, Bob is keen on photography. Especially he likes to take pictures of sportsmen. That was the reason why he placed himself in position *x*0 of a long straight racetrack and got ready to take pictures. But the problem was that not all the runners passed him. The total amount of sportsmen, training at t... | {"inputs": ["3 3\n0 7\n14 2\n4 6", "1 1\n0 10", "2 2\n1 2\n3 2", "3 2\n1 2\n2 3\n3 4", "2 4\n10 4\n1 5", "1 10\n1 9", "1 10\n123 12", "1 17\n10 17", "1 22\n22 33", "1 3\n1 2", "2 5\n0 3\n2 1", "3 3\n7 3\n6 4\n3 7", "4 9\n8 6\n11 5\n5 11\n8 3", "2 4\n1 4\n4 0", "3 7\n5 8\n7 5\n4 7", "4 7\n8 2\n5 7\n8 2\n5 8", "2 3\n4 1\... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 78 | codeforces | |
9e56f05801d7e9e4ec419f918a1d927d | PolandBall and Polygon | PolandBall has such a convex polygon with *n* veritces that no three of its diagonals intersect at the same point. PolandBall decided to improve it and draw some red segments.
He chose a number *k* such that *gcd*(*n*,<=*k*)<==<=1. Vertices of the polygon are numbered from 1 to *n* in a clockwise way. PolandBall repe... | {"inputs": ["5 2", "10 3", "17 5", "1337 550", "1000000 7", "1000000 500001", "5 3", "7 5", "7 4", "7 3", "7 2", "618440 133219", "266629 262028", "420886 45693", "535643 450037", "972950 214491", "843926 7389", "844773 28178", "199183 149366", "506387 238193", "158845 28784", "874231 6382", "473808 229477", "217694 14... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 3 | codeforces | |
9e8832e0902da7ae0ddaace7b52d5623 | Ohana Cleans Up | Ohana Matsumae is trying to clean a room, which is divided up into an *n* by *n* grid of squares. Each square is initially either clean or dirty. Ohana can sweep her broom over columns of the grid. Her broom is very strange: if she sweeps over a clean square, it will become dirty, and if she sweeps over a dirty square,... | {"inputs": ["4\n0101\n1000\n1111\n0101", "3\n111\n111\n111", "10\n0100000000\n0000000000\n0000000000\n0000000000\n0000000000\n0000000000\n0000000000\n0000000000\n0000000000\n0000000000", "1\n1", "10\n0111010011\n0111010011\n1010010001\n0111010011\n0000110000\n0111010011\n0111010011\n0000110000\n1010010001\n0111010011",... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 207 | codeforces | |
9e8f4a947ab75ccf3ad52081178c90b5 | Power Tower | Priests of the Quetzalcoatl cult want to build a tower to represent a power of their god. Tower is usually made of power-charged rocks. It is built with the help of rare magic by levitating the current top of tower and adding rocks at its bottom. If top, which is built from *k*<=-<=1 rocks, possesses power *p* and we w... | {"inputs": ["6 1000000000\n1 2 2 3 3 3\n8\n1 1\n1 6\n2 2\n2 3\n2 4\n4 4\n4 5\n4 6", "10 20\n792708224 4633945 600798790 384332600 283309209 762285205 750900274 160512987 390669628 205259431\n10\n5 9\n10 10\n8 10\n7 10\n7 10\n10 10\n4 4\n10 10\n7 7\n4 8", "10 18634\n157997476 953632869 382859292 108314887 739258690 1109... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
9e99af0e09bb8926962d66a3c7d018d6 | Tree Destruction | You are given an unweighted tree with *n* vertices. Then *n*<=-<=1 following operations are applied to the tree. A single operation consists of the following steps:
1. choose two leaves; 1. add the length of the simple path between them to the answer; 1. remove one of the chosen leaves from the tree.
Initial answ... | {"inputs": ["3\n1 2\n1 3", "5\n1 2\n1 3\n2 4\n2 5", "2\n1 2", "4\n1 3\n1 4\n1 2", "4\n2 1\n1 3\n3 4", "4\n4 3\n3 2\n2 1", "5\n2 1\n2 3\n2 4\n2 5", "5\n4 5\n4 1\n1 2\n2 3", "5\n1 4\n4 3\n3 2\n2 5", "6\n4 5\n4 1\n4 6\n4 2\n4 3", "6\n6 5\n6 2\n2 3\n5 4\n4 1", "6\n1 5\n5 4\n4 2\n2 6\n6 3", "7\n7 5\n7 3\n7 6\n7 4\n7 1\n7 2"... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 5 | codeforces | |
9eadfa811e6ba59ec0faa7b5383d0ce2 | Feed the Golorp | Golorps are mysterious creatures who feed on variables. Golorp's name is a program in some programming language. Some scientists believe that this language is Befunge; golorps are tantalizingly silent.
Variables consumed by golorps can take values from 0 to 9, inclusive. For each golorp its daily diet is defined by it... | {"inputs": ["?(_-_/___*__):-___>__.", "?(__-_+_/_____):-__>__,_____<__.", "?(______________________/____+_______*__-_____*______-___):-__<___,___<____,____<_____,_____<______,______<_______.", "?(__+___+__-___):-___>__.", "?(__*___+_-____):-___>__,____<__.", "?(__):-__>__.", "?(__):-__>__,__<__.", "?(__-__):-__>__,__<_... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
9eb52fbc8417291b3e440dec6bcd1e39 | Petr and a calendar | Petr wants to make a calendar for current month. For this purpose he draws a table in which columns correspond to weeks (a week is seven consequent days from Monday to Sunday), rows correspond to weekdays, and cells contain dates. For example, a calendar for January 2017 should look like on the picture:
Petr wants to ... | {"inputs": ["1 7", "1 1", "11 6", "2 7", "2 1", "8 6", "1 1", "1 2", "1 3", "1 4", "1 5", "1 6", "1 7", "2 1", "2 2", "2 3", "2 4", "2 5", "2 6", "2 7", "3 1", "3 2", "3 3", "3 4", "3 5", "3 6", "3 7", "4 1", "4 2", "4 3", "4 4", "4 5", "4 6", "4 7", "5 1", "5 2", "5 3", "5 4", "5 5", "5 6", "5 7", "6 1", "6 2", "6 3",... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 287 | codeforces | |
9ec778249556b0c2c683fb80bec98610 | One-dimensional Japanese Crossword | Recently Adaltik discovered japanese crosswords. Japanese crossword is a picture, represented as a table sized *a*<=×<=*b* squares, and each square is colored white or black. There are integers to the left of the rows and to the top of the columns, encrypting the corresponding row or column. The number of integers repr... | {"inputs": ["3\nBBW", "5\nBWBWB", "4\nWWWW", "4\nBBBB", "13\nWBBBBWWBWBBBW", "1\nB", "2\nBB", "100\nWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWB", "1\nW", "2\nWW", "2\nWB", "2\nBW", "3\nBBB", "3\nBWB", "3\nWBB", "3\nWWB", "3\nWBW", "3\nBWW", "3\nWWW", "100\nBBBWWW... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 437 | codeforces | |
9efd5c1d8a760f68e844a063591a0956 | Escape | The princess is going to escape the dragon's cave, and she needs to plan it carefully.
The princess runs at *v**p* miles per hour, and the dragon flies at *v**d* miles per hour. The dragon will discover the escape after *t* hours and will chase the princess immediately. Looks like there's no chance to success, but the... | {"inputs": ["1\n2\n1\n1\n10", "1\n2\n1\n1\n8", "5\n8\n1\n2\n100", "2\n100\n10\n10\n739", "17\n99\n2\n3\n293", "5\n5\n1\n1\n1000", "100\n99\n1\n1\n1000", "1\n100\n1\n1\n1", "1\n100\n1\n1\n1000", "10\n1\n10\n1\n11", "98\n94\n4\n3\n437", "58\n4\n1\n10\n392", "74\n11\n8\n7\n835", "86\n21\n7\n2\n982", "2\n27\n4\n9\n937", "6... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 11 | codeforces | |
9f25abcea6070b5ef9b0617d81e00481 | Lecture Sleep | Your friend Mishka and you attend a calculus lecture. Lecture lasts *n* minutes. Lecturer tells *a**i* theorems during the *i*-th minute.
Mishka is really interested in calculus, though it is so hard to stay awake for all the time of lecture. You are given an array *t* of Mishka's behavior. If Mishka is asleep during ... | {"inputs": ["6 3\n1 3 5 2 5 4\n1 1 0 1 0 0", "5 3\n1 9999 10000 10000 10000\n0 0 0 0 0", "3 3\n10 10 10\n1 1 0", "1 1\n423\n0", "6 6\n1 3 5 2 5 4\n1 1 0 1 0 0", "5 2\n1 2 3 4 20\n0 0 0 1 0", "3 1\n1 2 3\n0 0 1", "4 2\n4 5 6 8\n1 0 1 0", "6 3\n1 3 5 2 1 15\n1 1 0 1 0 0", "5 5\n1 2 3 4 5\n1 1 1 0 1", "3 3\n3 3 3\n1 0 1",... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 236 | codeforces | |
9f34e733a30cd820bf6cbd1d33cf1718 | The Wall (medium) | Heidi the Cow is aghast: cracks in the northern Wall? Zombies gathering outside, forming groups, preparing their assault? This must not happen! Quickly, she fetches her HC2 (Handbook of Crazy Constructions) and looks for the right chapter:
How to build a wall:
1. Take a set of bricks. 1. Select one of the possible ... | {"inputs": ["5 1", "2 2", "3 2", "11 5", "37 63", "1 1", "350000 140000", "350000 160000", "350000 180000", "350000 200000", "400000 140000", "400000 160000", "400000 180000", "400000 200000", "450000 140000", "450000 160000", "450000 180000", "450000 200000", "500000 140000", "500000 160000", "500000 180000", "500000 ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 11 | codeforces | |
9f7603889a9cf170e1f548f34f87a9ba | Ksenia and Pan Scales | Ksenia has ordinary pan scales and several weights of an equal mass. Ksenia has already put some weights on the scales, while other weights are untouched. Ksenia is now wondering whether it is possible to put all the remaining weights on the scales so that the scales were in equilibrium.
The scales is in equilibrium ... | {"inputs": ["AC|T\nL", "|ABC\nXYZ", "W|T\nF", "ABC|\nD", "A|BC\nDEF", "|\nABC", "|\nZXCVBANMIO", "|C\nA", "|\nAB", "A|XYZ\nUIOPL", "K|B\nY", "EQJWDOHKZRBISPLXUYVCMNFGT|\nA", "|MACKERIGZPVHNDYXJBUFLWSO\nQT", "ERACGIZOVPT|WXUYMDLJNQS\nKB", "CKQHRUZMISGE|FBVWPXDLTJYN\nOA", "V|CMOEUTAXBFWSK\nDLRZJGIYNQHP", "QWHNMALDGKTJ|\n... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 199 | codeforces | |
9f7943f6737302222342f001b3b1a0f8 | Sequence of points | You are given the following points with integer coordinates on the plane: *M*0,<=*A*0,<=*A*1,<=...,<=*A**n*<=-<=1, where *n* is odd number. Now we define the following infinite sequence of points *M**i*: *M**i* is symmetric to *M**i*<=-<=1 according (for every natural number *i*). Here point *B* is symmetric to *A* ac... | {"inputs": ["3 4\n0 0\n1 1\n2 3\n-5 3", "3 1\n5 5\n1000 1000\n-1000 1000\n3 100", "1 1\n-1000 -1000\n1000 1000", "1 1000000000000000000\n-1000 1000\n1000 -1000", "1 900000000000000001\n-1000 -1000\n-1000 -1000"], "outputs": ["14 0", "1995 1995", "3000 3000", "-1000 1000", "-1000 -1000"]} | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 16 | codeforces | |
9f7d6c7725c1eb0f004d79047462bd51 | Good Substrings | Smart Beaver recently got interested in a new word game. The point is as follows: count the number of distinct good substrings of some string *s*. To determine if a string is good or not the game uses rules. Overall there are *n* rules. Each rule is described by a group of three (*p*,<=*l*,<=*r*), where *p* is a string... | {"inputs": ["aaab\n2\naa 0 0\naab 1 1", "ltntlnen\n3\nn 0 0\nttlneenl 1 4\nlelllt 1 1", "a\n0", "nysnvneyavzcebsbsvrsbcvzsrcr\n5\nycaa 1 3\nzsayyyvseccsbcbvzrr 5 16\nznz 1 3\nbvnzrccvcb 4 7\nseznebzeevvrncccaabsbny 17 21", "oaoaa\n1\noaooaoooooaaaaaaaoooaao 2 18", "aaajiajqjvehgzqjssaebbqzhggehreiihhrjeehzeaeiiigavjsqb... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
9f80d9cecb41a12ee7ea87030333e61e | Inversions After Shuffle | You are given a permutation of integers from 1 to *n*. Exactly once you apply the following operation to this permutation: pick a random segment and shuffle its elements. Formally:
1. Pick a random segment (continuous subsequence) from *l* to *r*. All segments are equiprobable. 1. Let *k*<==<=*r*<=-<=*l*<=+<=1, i.e... | {"inputs": ["3\n2 3 1", "1\n1", "2\n1 2", "2\n2 1", "3\n1 2 3", "3\n2 1 3", "3\n3 1 2", "3\n1 3 2", "3\n3 2 1", "4\n1 4 2 3", "4\n4 2 3 1", "10\n1 2 3 4 5 6 7 8 9 10", "10\n10 1 9 2 8 3 7 4 6 5", "10\n1 6 2 7 3 8 4 9 5 10", "12\n2 12 9 3 6 11 8 1 4 10 7 5", "33\n16 17 8 15 3 29 1 18 21 14 4 31 30 20 13 7 19 22 23 25 5 ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 2 | codeforces | |
9f83cfcc77683f219e759a7a27ce5653 | Geometric Progression | Polycarp loves geometric progressions very much. Since he was only three years old, he loves only the progressions of length three. He also has a favorite integer *k* and a sequence *a*, consisting of *n* integers.
He wants to know how many subsequences of length three can be selected from *a*, so that they form a geo... | {"inputs": ["5 2\n1 1 2 2 4", "3 1\n1 1 1", "10 3\n1 2 6 2 3 6 9 18 3 9", "20 2\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20", "5 3\n5 15 15 15 45", "7 1\n1 2 1 2 1 2 1", "10 10\n1 10 100 1000 10000 100000 1000000 10000000 100000000 1000000000", "30 4096\n1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 50 | codeforces | |
9f9161d773c0ece159dec48afcbd2162 | Flea | It is known that fleas in Berland can jump only vertically and horizontally, and the length of the jump is always equal to *s* centimeters. A flea has found herself at the center of some cell of the checked board of the size *n*<=×<=*m* centimeters (each cell is 1<=×<=1 centimeters). She can jump as she wishes for an a... | {"inputs": ["2 3 1000000", "3 3 2", "1 2 3", "4 5 6", "9 8 7", "1000 1000 1000", "1 1 1", "1 1 2", "1 1 1000000", "1000000 1000000 1", "1000000 1000000 2", "1000000 1000000 999999", "1000000 1000000 12345", "1000000 1000000 123456", "43496 179847 327622", "105126 379125 460772", "999463 261665 981183", "836832 336228 5... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 21 | codeforces | |
9f959cc5d146ca6fee98e80d3195ef19 | Digital Counter | Malek lives in an apartment block with 100 floors numbered from 0 to 99. The apartment has an elevator with a digital counter showing the floor that the elevator is currently on. The elevator shows each digit of a number with 7 light sticks by turning them on or off. The picture below shows how the elevator shows each ... | {"inputs": ["89", "00", "73", "08", "26", "49", "88", "04", "60", "11", "22", "33", "44", "55", "66", "77", "88", "99", "80", "78", "67", "89", "46", "90", "92", "35", "05", "57", "20"], "outputs": ["2", "4", "15", "2", "4", "6", "1", "6", "4", "49", "4", "9", "9", "16", "4", "25", "1", "4", "2", "5", "10", "2", "6", "... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 135 | codeforces | |
9f9e2591905f746f25618370c11f164b | Set of Strings | You are given a string *q*. A sequence of *k* strings *s*1,<=*s*2,<=...,<=*s**k* is called beautiful, if the concatenation of these strings is string *q* (formally, *s*1<=+<=*s*2<=+<=...<=+<=*s**k*<==<=*q*) and the first characters of these strings are distinct.
Find any beautiful sequence of strings or determine that... | {"inputs": ["1\nabca", "2\naaacas", "4\nabc", "3\nnddkhkhkdndknndkhrnhddkrdhrnrrnkkdnnndndrdhnknknhnrnnkrrdhrkhkrkhnkhkhhrhdnrndnknrrhdrdrkhdrkkhkrnkk", "26\nbiibfmmfifmffbmmfmbmbmiimbmiffmffibibfbiffibibiiimbffbbfbifmiibffbmbbbfmfibmibfffibfbffmfmimbmmmfmfm", "3\nkydoybxlfeugtrbvqnrjtzshorrsrwsxkvlwyolbaadtzpmyyfllxuc... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 123 | codeforces | |
9fa187d8d77720cd2aa86a448d5bcfeb | none | Arkady needs your help again! This time he decided to build his own high-speed Internet exchange point. It should consist of *n* nodes connected with minimum possible number of wires into one network (a wire directly connects two nodes). Exactly *k* of the nodes should be exit-nodes, that means that each of them should... | {"inputs": ["3 2", "5 3", "4 2", "4 3", "5 2", "5 4", "6 2", "6 3", "6 4", "6 5", "1000 245", "1000 999", "1024 23", "200000 1014", "100003 16", "7 2", "7 3", "7 4", "7 5", "7 6", "100 2", "100 5", "100 59", "100 98", "100 99", "1000 2", "1000 5", "1000 670", "1000 998", "100000 2", "100000 4", "100000 101", "100000 30... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 22 | codeforces | |
9fada31fd7a37734fcc595bd6276b94d | Andryusha and Socks | Andryusha is an orderly boy and likes to keep things in their place.
Today he faced a problem to put his socks in the wardrobe. He has *n* distinct pairs of socks which are initially in a bag. The pairs are numbered from 1 to *n*. Andryusha wants to put paired socks together and put them in the wardrobe. He takes the ... | {"inputs": ["1\n1 1", "3\n2 1 1 3 2 3", "5\n5 1 3 2 4 3 1 2 4 5", "10\n4 2 6 3 4 8 7 1 1 5 2 10 6 8 3 5 10 9 9 7", "50\n30 47 31 38 37 50 36 43 9 23 2 2 15 31 14 49 9 16 6 44 27 14 5 6 3 47 25 26 1 35 3 15 24 19 8 46 49 41 4 26 40 28 42 11 34 35 46 18 7 28 18 40 19 42 4 41 38 48 50 12 29 39 33 17 25 22 22 21 36 45 27 3... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 304 | codeforces | |
9fc36afd3f0764dc0e13c308b99a8db0 | K-Dominant Character | You are given a string *s* consisting of lowercase Latin letters. Character *c* is called *k*-dominant iff each substring of *s* with length at least *k* contains this character *c*.
You have to find minimum *k* such that there exists at least one *k*-dominant character.
The first line contains string *s* consisting o... | {"inputs": ["abacaba", "zzzzz", "abcde", "bcaccacaaabaacaabaaabcbbcbcaacacbcbaaaacccacbbcbaabcbacaacbabacacacaccbbccbcbacbbbbccccabcabaaab", "daabcdabbabbacacbaacabacbcaabaacac", "abghim", "gfliflgfhhdkceacdljgkegmdlhcgkcmlelmbbbmdddgdeeljjhgbbffmemmmkhebgkhadkdajabcjkcgbkgbaeacdedlkklfech", "a", "aaabbb", "ab", "abbb"... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 78 | codeforces | |
9fcfc46ec0659d2aff21b232f7a0c3a5 | none | Vasya is sitting on an extremely boring math class. To have fun, he took a piece of paper and wrote out *n* numbers on a single line. After that, Vasya began to write out different ways to put pluses ("+") in the line between certain digits in the line so that the result was a correct arithmetic expression; formally, n... | {"inputs": ["3 1\n108", "3 2\n108", "1 0\n5", "5 2\n39923", "6 3\n967181", "7 1\n2178766", "10 0\n3448688665", "14 6\n00000000000001", "16 15\n8086179429588546", "18 15\n703140050361297985", "20 9\n34540451546587567970", "20 8\n99999999999999999999", "20 19\n33137197659033083606", "57 13\n177946005798852216692528643323... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
9fdff882c3896340c273423c008cbc04 | Wet Shark and Blocks | There are *b* blocks of digits. Each one consisting of the same *n* digits, which are given to you in the input. Wet Shark must choose exactly one digit from each block and concatenate all of those digits together to form one large integer. For example, if he chooses digit 1 from the first block and digit 2 from the se... | {"inputs": ["12 1 5 10\n3 5 6 7 8 9 5 1 1 1 1 5", "3 2 1 2\n6 2 2", "3 2 1 2\n3 1 2", "3 2 1 2\n6 3 2", "3 2 1 2\n3 6 3", "3 2 0 2\n3 3 9", "3 2 0 2\n4 5 1", "3 2 0 2\n1 3 2", "3 2 1 2\n5 9 3", "3 2 1 2\n7 2 4", "6 5 2 12\n2 8 9 6 6 1", "6 5 9 11\n8 1 2 1 8 2", "6 5 7 10\n9 6 9 8 8 8", "6 5 12 23\n5 8 2 6 5 5", "6 5 6 ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 3 | codeforces | |
9fe711684cd22fb3743be53a24124c64 | Coins and Queries | Polycarp has $n$ coins, the value of the $i$-th coin is $a_i$. It is guaranteed that all the values are integer powers of $2$ (i.e. $a_i = 2^d$ for some non-negative integer number $d$).
Polycarp wants to know answers on $q$ queries. The $j$-th query is described as integer number $b_j$. The answer to the query is the... | {"inputs": ["5 4\n2 4 8 2 4\n8\n5\n14\n10", "3 3\n1 1 1\n1\n2\n3", "4 1\n2 4 16 32\n14", "1 10\n8\n1\n2\n3\n4\n5\n6\n7\n8\n9\n16", "1 10\n4\n1\n2\n3\n4\n5\n6\n7\n8\n9\n16", "1 10\n2\n1\n2\n3\n4\n5\n6\n7\n8\n9\n16", "1 10\n1\n1\n2\n3\n4\n5\n6\n7\n8\n9\n16"], "outputs": ["1\n-1\n3\n2", "1\n2\n3", "-1", "-1\n-1\n-1\n-1\n-... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 21 | codeforces | |
a0032e48830b2c7f6c1b6af40e791f87 | Donkey and Stars | In the evenings Donkey would join Shrek to look at the stars. They would sit on a log, sipping tea and they would watch the starry sky. The sky hung above the roof, right behind the chimney. Shrek's stars were to the right of the chimney and the Donkey's stars were to the left. Most days the Donkey would just count the... | {"inputs": ["15\n1/3 2/1\n3 1\n6 2\n4 2\n2 5\n4 5\n6 6\n3 4\n1 6\n2 1\n7 4\n9 3\n5 3\n1 3\n15 5\n12 4", "15\n2/1 2/0\n3 1\n6 2\n9 3\n12 4\n15 5\n2 1\n4 2\n5 3\n7 4\n1 3\n3 4\n2 5\n4 5\n1 6\n6 6", "15\n2/1 2/0\n3 1\n6 2\n9 3\n12 4\n15 5\n2 1\n4 2\n5 3\n7 4\n1 3\n3 4\n2 6\n4 5\n1 6\n6 6", "15\n1/4 2/1\n3 1\n6 2\n9 3\n12 ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 2 | codeforces | |
a008bdd5686b8fc5b8c6cfae3cabd328 | none | There are *n* workers in a company, each of them has a unique id from 1 to *n*. Exaclty one of them is a chief, his id is *s*. Each worker except the chief has exactly one immediate superior.
There was a request to each of the workers to tell how how many superiors (not only immediate). Worker's superiors are his imme... | {"inputs": ["3 2\n2 0 2", "5 3\n1 0 0 4 1", "1 1\n0", "2 1\n0 0", "2 1\n0 1", "2 1\n1 0", "2 1\n1 1", "2 2\n0 0", "2 2\n0 1", "9 1\n0 1 1 1 1 1 6 7 8", "9 1\n0 1 1 1 1 5 6 7 8", "6 1\n0 1 2 2 0 0", "2 2\n1 1", "2 2\n1 0", "3 1\n0 1 2", "3 1\n2 1 1", "3 1\n0 0 2", "3 2\n2 0 1", "3 2\n2 2 1", "3 2\n2 1 1", "3 3\n1 1 0", ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 6 | codeforces | |
a008cf6fdf1b6bd445525007b1378423 | Tanks | Petya sometimes has to water his field. To water the field, Petya needs a tank with exactly *V* ml of water.
Petya has got *N* tanks, *i*-th of them initially containing *a**i* ml of water. The tanks are really large, any of them can contain any amount of water (no matter how large this amount is).
Also Petya has got... | {"inputs": ["2 3 5\n2 3", "2 3 4\n2 3", "5 2 0\n1 3 5 7 9", "5 10 3\n3 4 5 6 7", "6 4 8\n5 5 5 5 5 5", "5 4 24\n5 5 5 5 5", "5 4 28\n5 5 5 5 5", "8 4 20\n3 3 3 3 3 3 3 3", "2 6 1\n100 200", "10 2 49\n3 5 7 9 11 3 5 7 9 11", "10 10 99\n10 10 10 10 10 10 10 10 10 10", "8 6 32\n3 6 4 4 4 4 4 4", "6 11 3\n6 6 6 6 6 6", "3 ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
a01286c3f081e62629e366514b46b4ba | Mike and Fun | Mike and some bears are playing a game just for fun. Mike is the judge. All bears except Mike are standing in an *n*<=×<=*m* grid, there's exactly one bear in each cell. We denote the bear standing in column number *j* of row number *i* by (*i*,<=*j*). Mike's hands are on his ears (since he's the judge) and each bear s... | {"inputs": ["5 4 5\n0 1 1 0\n1 0 0 1\n0 1 1 0\n1 0 0 1\n0 0 0 0\n1 1\n1 4\n1 1\n4 2\n4 3", "2 2 10\n1 1\n0 1\n1 1\n2 1\n1 1\n2 2\n1 1\n2 1\n2 2\n2 2\n1 1\n1 1", "2 2 10\n1 1\n0 1\n2 2\n2 2\n1 1\n2 1\n2 1\n1 1\n1 1\n2 1\n1 1\n2 1", "5 5 30\n0 1 1 1 0\n1 1 0 1 1\n0 1 1 1 1\n0 0 1 1 0\n0 0 0 0 0\n3 2\n2 2\n2 2\n4 3\n1 4\n... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 101 | codeforces | |
a032c4a8b32b448ebc4ce4002bf0e4c8 | Tesla | Allen dreams of one day owning a enormous fleet of electric cars, the car of the future! He knows that this will give him a big status boost. As Allen is planning out all of the different types of cars he will own and how he will arrange them, he realizes that he has a problem.
Allen's future parking lot can be repre... | {"inputs": ["4 5\n1 2 0 4\n1 2 0 4\n5 0 0 3\n0 5 0 3", "1 2\n1\n2\n1\n2", "1 2\n1\n1\n2\n2", "2 2\n1 0\n0 2\n0 1\n0 2", "7 14\n2 11 1 14 9 8 5\n12 6 7 1 10 2 3\n14 13 9 8 5 4 11\n13 6 4 3 12 7 10", "10 20\n18 7 3 16 5 8 19 2 20 12\n15 16 7 11 14 3 12 4 8 10\n19 18 20 1 17 9 5 2 6 13\n11 15 13 17 6 9 14 1 10 4", "2 1\n0... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 4 | codeforces | |
a036df390b5b447b6a25c0f5c963b490 | Alternative Thinking | Kevin has just recevied his disappointing results on the USA Identification of Cows Olympiad (USAICO) in the form of a binary string of length *n*. Each character of Kevin's string represents Kevin's score on one of the *n* questions of the olympiad—'1' for a correctly identified cow and '0' otherwise.
However, all is... | {"inputs": ["8\n10000011", "2\n01", "5\n10101", "75\n010101010101010101010101010101010101010101010101010101010101010101010101010", "11\n00000000000", "56\n10101011010101010101010101010101010101011010101010101010", "50\n01011010110101010101010101010101010101010101010100", "7\n0110100", "8\n11011111", "6\n000000", "5\n01... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 95 | codeforces | |
a03f5ee5d473aff0cb3f1cda8eeaf40d | Battleship | Arkady is playing Battleship. The rules of this game aren't really important.
There is a field of $n \times n$ cells. There should be exactly one $k$-decker on the field, i. e. a ship that is $k$ cells long oriented either horizontally or vertically. However, Arkady doesn't know where it is located. For each cell Arka... | {"inputs": ["4 3\n#..#\n#.#.\n....\n.###", "10 4\n#....##...\n.#...#....\n..#..#..#.\n...#.#....\n.#..##.#..\n.....#...#\n...#.##...\n.#...#.#..\n.....#..#.\n...#.#...#", "19 6\n##..............###\n#......#####.....##\n.....#########.....\n....###########....\n...#############...\n..###############..\n.###############... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 50 | codeforces | |
a04b3fdee172180b95ce7b678f535eed | Cycling City | You are organizing a cycling race on the streets of the city. The city contains *n* junctions, some pairs of them are connected by roads; on each road you can move in any direction. No two roads connect the same pair of intersections, and no road connects the intersection with itself.
You want the race to be open to b... | {"inputs": ["4 4\n1 2\n2 3\n3 4\n4 1", "5 6\n1 2\n1 3\n1 4\n2 5\n3 5\n4 5", "10 10\n7 6\n2 1\n9 3\n6 1\n6 10\n4 1\n7 5\n5 1\n4 10\n5 6", "2 1\n2 1", "10 20\n5 1\n10 5\n2 10\n6 4\n10 6\n9 6\n1 7\n3 10\n3 2\n6 2\n5 4\n7 10\n3 9\n9 1\n5 3\n7 9\n8 4\n4 7\n6 3\n10 8", "10 5\n6 2\n2 1\n2 7\n10 7\n4 6", "4 5\n4 3\n1 4\n3 1\n2... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
a04b6aeaf59b1ddeae4d733245b7a6b2 | Makes And The Product | After returning from the army Makes received a gift — an array *a* consisting of *n* positive integer numbers. He hadn't been solving problems for a long time, so he became interested to answer a particular question: how many triples of indices (*i*,<= *j*,<= *k*) (*i*<=<<=*j*<=<<=*k*), such that *a**i*·*a**j*·*a... | {"inputs": ["4\n1 1 1 1", "5\n1 3 2 3 4", "6\n1 3 3 1 3 2", "3\n1000000000 1000000000 1000000000", "4\n1 1 2 2", "3\n1 3 1", "11\n1 2 2 2 2 2 2 2 2 2 2", "5\n1 2 2 2 2", "6\n1 2 2 3 3 4", "8\n1 1 2 2 2 3 3 3", "6\n1 2 2 2 2 3", "3\n1 2 2", "6\n1 2 2 2 3 3", "6\n1 2 2 2 2 2", "4\n1 2 2 2", "5\n1 2 3 2 3", "6\n2 2 3 3 3 ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 96 | codeforces | |
a04f6389f6f82fd17ccc154a7b9067b2 | Multicolored Cars | Alice and Bob got very bored during a long car trip so they decided to play a game. From the window they can see cars of different colors running past them. Cars are going one after another.
The game rules are like this. Firstly Alice chooses some color *A*, then Bob chooses some color *B* (*A*<=≠<=*B*). After each ca... | {"inputs": ["4 1\n2 1 4 2", "5 2\n2 2 4 5 3", "3 10\n1 2 3", "1 1\n2", "1 2\n2", "10 6\n8 5 1 6 6 5 10 6 9 8", "7 2\n1 2 2 1 1 1 1", "8 2\n1 1 3 2 3 2 3 2", "10 9\n6 4 7 1 8 9 5 9 4 5", "6 1\n2 3 3 1 1 2", "4 1\n2 1 1 2", "5 1\n3 2 1 2 1", "5 3\n1 2 3 2 3", "1 1000000\n1", "6 3\n1 2 3 2 3 2", "3 2\n1 2 3", "6 2\n5 3 2 ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 15 | codeforces | |
a081ed56bfa2a4a5d961d35106353398 | Dreamoon and Strings | Dreamoon has a string *s* and a pattern string *p*. He first removes exactly *x* characters from *s* obtaining string *s*' as a result. Then he calculates that is defined as the maximal number of non-overlapping substrings equal to *p* that can be found in *s*'. He wants to make this number as big as possible.
More f... | {"inputs": ["aaaaa\naa", "axbaxxb\nab", "aabb\nab", "aaaaaaaaaaaaaaa\na", "aaaaaaaaaaa\nb", "ababababababababa\naba", "axxbaxxbaxxb\nab", "axaxxbaxabxbaxxbxb\nab", "ababcc\nabc", "a\na", "a\nb", "a\naa", "a\nab", "a\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
a08ef6bbf2852d03fa0d272506b80b9d | Bachgold Problem | Bachgold problem is very easy to formulate. Given a positive integer *n* represent it as a sum of maximum possible number of prime numbers. One can prove that such representation exists for any integer greater than 1.
Recall that integer *k* is called prime if it is greater than 1 and has exactly two positive integer ... | {"inputs": ["5", "6", "2", "3", "99999", "100000", "7", "4", "8", "9", "99995", "99996", "10", "11", "99997", "99998", "12", "13", "99993", "99994", "14", "15", "53", "57", "61", "774", "202", "530", "7166", "9294", "2422", "15326", "11454", "14878", "90672", "99544", "90472", "23", "93", "19", "11110"], "outputs": ["2... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 655 | codeforces | |
a0b24240d253c4e6833ed30a4c86bb2d | none | Bearland has *n* cities, numbered 1 through *n*. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities.
Bear Limak was once in a city *a* and he wanted to go to a city *b*. There was no direct connection so he decided to take a long walk, vis... | {"inputs": ["7 11\n2 4 7 3", "1000 999\n10 20 30 40", "4 4\n1 2 3 4", "5 6\n5 2 4 1", "57 88\n54 30 5 43", "700 699\n687 69 529 616", "1000 1001\n217 636 713 516", "4 5\n1 3 4 2", "4 6\n1 3 2 4", "5 4\n2 3 5 4", "5 5\n1 4 2 5", "5 7\n4 3 2 1", "5 8\n2 3 5 1", "6 5\n3 2 5 4", "6 6\n1 3 4 5", "6 7\n3 1 2 4", "6 10\n5 3 4... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 16 | codeforces | |
a0e51419a417d080cc1ede27bf06586b | George and Interesting Graph | George loves graphs. Most of all, he loves interesting graphs. We will assume that a directed graph is interesting, if it meets the following criteria:
- The graph doesn't contain any multiple arcs; - There is vertex *v* (we'll call her the center), such that for any vertex of graph *u*, the graph contains arcs (*u... | {"inputs": ["3 7\n1 1\n2 2\n3 1\n1 3\n3 2\n2 3\n3 3", "3 6\n1 1\n2 2\n3 1\n3 2\n2 3\n3 3", "3 1\n2 2", "5 25\n4 2\n1 4\n5 2\n2 2\n3 1\n4 5\n2 1\n2 5\n2 4\n1 2\n4 1\n4 4\n1 1\n1 5\n4 3\n5 1\n3 3\n1 3\n5 5\n2 3\n5 3\n3 5\n3 2\n5 4\n3 4", "2 4\n2 1\n1 2\n2 2\n1 1", "3 9\n2 2\n2 1\n3 2\n1 3\n3 1\n1 2\n3 3\n1 1\n2 3", "6 22... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
a0e804218f0f0c290f8fe2252951c16c | Tritonic Iridescence | Overlooking the captivating blend of myriads of vernal hues, Arkady the painter lays out a long, long canvas.
Arkady has a sufficiently large amount of paint of three colours: cyan, magenta, and yellow. On the one-dimensional canvas split into *n* consecutive segments, each segment needs to be painted in one of the co... | {"inputs": ["5\nCY??Y", "5\nC?C?Y", "5\n?CYC?", "5\nC??MM", "3\nMMY", "15\n??YYYYYY??YYYY?", "100\nYCY?CMCMCYMYMYC?YMYMYMY?CMC?MCMYCMYMYCM?CMCM?CMYMYCYCMCMCMCMCMYM?CYCYCMCM?CY?MYCYCMYM?CYCYCYMY?CYCYC", "1\nC", "1\n?", "2\nMY", "2\n?M", "2\nY?", "2\n??", "3\n??C", "3\nM??", "3\nYCM", "3\n?C?", "3\nMC?", "4\nCYCM", "4\nM... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 102 | codeforces | |
a0f198fd8de377c0c9140dddc182575d | Multi-core Processor | The research center Q has developed a new multi-core processor. The processor consists of *n* cores and has *k* cells of cache memory. Consider the work of this processor.
At each cycle each core of the processor gets one instruction: either do nothing, or the number of the memory cell (the core will write an informat... | {"inputs": ["4 3 5\n1 0 0\n1 0 2\n2 3 1\n3 2 0", "3 2 2\n1 2\n1 2\n2 2", "1 1 1\n0", "1 1 1\n1", "2 1 1\n1\n1", "2 1 1\n1\n0", "2 1 1\n0\n1", "2 1 1\n0\n0", "2 1 2\n1\n2", "2 1 1\n1\n1", "2 2 2\n2 1\n0 2", "1 100 100\n32 97 28 73 22 27 27 21 25 26 21 95 45 60 47 64 44 88 24 10 82 55 84 69 86 70 99 99 34 59 71 83 53 90 ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 16 | codeforces | |
a11b895434d38046521547a0eab8a544 | Mahmoud and a xor trip | Mahmoud and Ehab live in a country with *n* cities numbered from 1 to *n* and connected by *n*<=-<=1 undirected roads. It's guaranteed that you can reach any city from any other using these roads. Each city has a number *a**i* attached to it.
We define the distance from city *x* to city *y* as the xor of numbers attac... | {"inputs": ["3\n1 2 3\n1 2\n2 3", "5\n1 2 3 4 5\n1 2\n2 3\n3 4\n3 5", "5\n10 9 8 7 6\n1 2\n2 3\n3 4\n3 5", "1\n1", "2\n1 2\n1 2"], "outputs": ["10", "52", "131", "1", "6"]} | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
a150fbee38015b807470d2c6b00af384 | A Trivial Problem | Mr. Santa asks all the great programmers of the world to solve a trivial problem. He gives them an integer *m* and asks for the number of positive integers *n*, such that the factorial of *n* ends with exactly *m* zeroes. Are you among those great programmers who can solve this problem?
The only line of input contains ... | {"inputs": ["1", "5", "2", "3", "7", "12", "15", "18", "38", "47", "58", "66", "70", "89", "417", "815", "394", "798", "507", "406", "570", "185", "765", "967", "112", "729", "4604", "8783", "1059", "6641", "9353", "1811", "2528", "8158", "3014", "7657", "4934", "9282", "2610", "2083", "26151", "64656", "46668", "95554... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 106 | codeforces | |
a153a90833c2b44aa015cebcc75e0dd5 | Famil Door and Brackets | As Famil Door’s birthday is coming, some of his friends (like Gabi) decided to buy a present for him. His friends are going to buy a string consisted of round brackets since Famil Door loves string of brackets of length *n* more than any other strings!
The sequence of round brackets is called valid if and only if:
1... | {"inputs": ["4 1\n(", "4 4\n(())", "4 3\n(((", "875 50\n)))((())()))((()(())))))())))((((((()))))))()(((((", "1980 464\n))(()()))(((((((((()))))))(()(((()((()))()()())()))()))(()))))))(())((())))()())()((())())()())))(())()(()))(()())()((((()))())()(())))))(()()(()(((((()(()()))(((()))(())))))()())(())))))())()()((()))... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 5 | codeforces | |
a1584e867041dbd9d509f47ce749da7b | Up the hill | Hiking club "Up the hill" just returned from a walk. Now they are trying to remember which hills they've just walked through.
It is known that there were *N* stops, all on different integer heights between 1 and *N* kilometers (inclusive) above the sea level. On the first day they've traveled from the first stop to th... | {"inputs": ["0\n1", "2\n1", "0\n3", "1\n1", "3\n7", "700\n300", "37\n29", "177\n191", "50000\n3", "99999\n0", "0\n99999", "24999\n74997", "17\n61111", "50021\n40009", "49999\n49997", "6777\n57897", "49999\n49999", "1\n0", "0\n1", "0\n0", "2\n0", "5\n0", "90000\n1", "100\n4"], "outputs": ["2 1 ", "2 3 4 1 ", "4 3 2 1 ",... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 67 | codeforces | |
a15e3076b733ae6ce136f3bc1076d466 | One-Dimensional Battle Ships | Alice and Bob love playing one-dimensional battle ships. They play on the field in the form of a line consisting of *n* square cells (that is, on a 1<=×<=*n* table).
At the beginning of the game Alice puts *k* ships on the field without telling their positions to Bob. Each ship looks as a 1<=×<=*a* rectangle (that is,... | {"inputs": ["11 3 3\n5\n4 8 6 1 11", "5 1 3\n2\n1 5", "5 1 3\n1\n3", "1 1 1\n1\n1", "5000 1660 2\n20\n1 100 18 102 300 81 19 25 44 88 1337 4999 1054 1203 91 16 164 914 1419 1487", "5000 1000 2\n3\n1000 2000 3000", "10 2 4\n2\n5 6", "10 2 4\n3\n5 6 1", "4 2 1\n2\n1 2", "4 2 1\n2\n1 3", "50 7 3\n20\n24 18 34 32 44 2 5 40... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 5 | codeforces | |
a17f96a169f764bf7549a12a7601b7f6 | Common Divisors | Vasya has recently learned at school what a number's divisor is and decided to determine a string's divisor. Here is what he came up with.
String *a* is the divisor of string *b* if and only if there exists a positive integer *x* such that if we write out string *a* consecutively *x* times, we get string *b*. For exam... | {"inputs": ["abcdabcd\nabcdabcdabcdabcd", "aaa\naa", "aaaaaaaaaaaaaaaaaaaaaaaaa\naaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaa\naaaaaaaaaaaaaa", "a\nb", "a\na", "ab\nac", "asdkjjaskldjklasjdhasjdasdas\nasdjahsgdjslkdaygsudhasdkasnjdbayusvduasdklmaklsd", "aaa\naaaaab", "ab\naa", "aa\naac", "aba\nabaaba", "aa\nbb", "ababab... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 81 | codeforces | |
a1e038341460b4b5f2afab6987a32488 | Vanya and Field | Vanya decided to walk in the field of size *n*<=×<=*n* cells. The field contains *m* apple trees, the *i*-th apple tree is at the cell with coordinates (*x**i*,<=*y**i*). Vanya moves towards vector (*dx*,<=*dy*). That means that if Vanya is now at the cell (*x*,<=*y*), then in a second he will be at cell . The followin... | {"inputs": ["5 5 2 3\n0 0\n1 2\n1 3\n2 4\n3 1", "2 3 1 1\n0 0\n0 1\n1 1", "5 5 2 4\n0 0\n1 2\n1 3\n2 4\n3 1", "6 6 5 5\n0 0\n0 1\n0 2\n0 3\n0 4\n0 5", "6 6 1 1\n0 0\n1 1\n2 1\n0 1\n1 2\n3 4", "1 1 1 1\n0 0", "10 10 7 3\n9 0\n0 0\n7 6\n6 5\n4 8\n0 3\n2 1\n9 2\n7 1\n8 6", "10 10 3 9\n0 0\n3 9\n6 8\n0 1\n3 0\n6 9\n0 2\n3 ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
a1ebebccb9e61deeff2e3692425bfd99 | Knight Tournament | Hooray! Berl II, the king of Berland is making a knight tournament. The king has already sent the message to all knights in the kingdom and they in turn agreed to participate in this grand event.
As for you, you're just a simple peasant. There's no surprise that you slept in this morning and were late for the tourname... | {"inputs": ["4 3\n1 2 1\n1 3 3\n1 4 4", "8 4\n3 5 4\n3 7 6\n2 8 8\n1 8 1", "2 1\n1 2 1", "2 1\n1 2 2", "3 1\n1 3 1", "3 1\n1 3 2", "3 1\n1 3 3", "3 2\n1 2 1\n1 3 3", "3 2\n1 2 2\n1 3 2", "3 2\n2 3 3\n1 3 3", "11 6\n1 2 2\n7 8 7\n3 4 4\n6 9 6\n5 10 10\n2 11 11", "10 6\n9 10 10\n6 7 7\n2 4 2\n2 5 5\n1 7 5\n4 10 8", "11 8... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 47 | codeforces | |
a1f94be921c53f947516dc5cd455429f | A Tide of Riverscape | "Time," Mino thinks aloud.
"What?"
"Time and tide wait for no man," explains Mino. "My name, taken from the river, always reminds me of this."
"And what are you recording?"
"You see it, tide. Everything has its own period, and I think I've figured out this one," says Mino with confidence.
Doubtfully, Kanno peeks a... | {"inputs": ["10 7\n1.0.1.0.1.", "10 6\n1.0.1.1000", "10 9\n1........1", "1 1\n.", "5 1\n0...1", "17 10\n..1.100..1..0.100", "2 1\n0.", "2 1\n..", "3 1\n.0.", "3 1\n00.", "3 2\n0..", "3 2\n0.0", "3 2\n1..", "3 2\n.1.", "3 2\n1.0", "3 3\n1..", "3 3\n.00", "5 3\n0.000", "10 6\n10010.1001", "75 38\n00.0.1.0.0110.1.00010..1... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 91 | codeforces | |
a1ff4a4dc6978ae2658829c5d4153e9d | Turing Tape | INTERCAL is the oldest of esoteric programming languages. One of its many weird features is the method of character-based output, known as Turing Tape method. It converts an array of unsigned 8-bit integers into a sequence of characters to print, using the following method.
The integers of the array are processed one ... | {"inputs": ["Hello, World!", "N", "!{|aPUBKs[k\"HE;>O&(Nf}N4,*#g*<3sQXFJ'?Z/H9L[xx Rc5\"8~v}84+wv]w[oO0e':MaNy&6*]jRkYomz[o?=13Y?!fzA3eC\\", "!{|aPUBKs[k\"HE;>O&(Nf}N4,*#g*<3sQXFJ'?Z/H9L[xx Rc5\"8~v}84+wv]w", ":J&UY'O]>@Lc\"4ow&?8#yq{s=gH%'`3Yd[CP#", "Py0L_[Ymh&.", "fH9Bh0f|3gn\"7r|*8p[,<]|4Z%2]&E4$/_@\\wI8v4{]/`4uU']f... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 20 | codeforces | |
a231e72241af8e71a16175ca67d36528 | New Year Ratings Change | One very well-known internet resource site (let's call it X) has come up with a New Year adventure. Specifically, they decided to give ratings to all visitors.
There are *n* users on the site, for each user we know the rating value he wants to get as a New Year Present. We know that user *i* wants to get at least *a**... | {"inputs": ["3\n5 1 1", "1\n1000000000", "10\n1 1 1 1 1 1 1 1 1 1", "10\n1 10 1 10 1 1 7 8 6 7", "10\n20 19 12 1 12 15 2 12 6 10", "10\n4 5 10 5 2 14 15 6 10 6"], "outputs": ["5 1 2", "1000000000", "1 2 3 4 5 6 7 8 9 10", "1 10 2 11 3 4 7 9 6 8", "20 19 12 1 13 15 2 14 6 10", "4 5 10 6 2 14 15 7 11 8"]} | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 3 | codeforces | |
a232dc00ac7aae6da037f10933bb44de | Om Nom and Spiders | Om Nom really likes candies and doesn't like spiders as they frequently steal candies. One day Om Nom fancied a walk in a park. Unfortunately, the park has some spiders and Om Nom doesn't want to see them at all.
The park can be represented as a rectangular *n*<=×<=*m* field. The park has *k* spiders, each spider at t... | {"inputs": ["3 3 4\n...\nR.L\nR.U", "2 2 2\n..\nRL", "2 2 2\n..\nLR", "3 4 8\n....\nRRLL\nUUUU", "2 2 2\n..\nUU", "2 2 0\n..\n..", "5 5 10\n.....\nRU.D.\n..DLL\n.D...\nRL..L", "5 6 20\n......\n.UURD.\nLUD.RR\nU.LDDD\nDDLDDU", "4 5 15\n.....\nDRRLR\nULDLD\nDLRRL", "3 7 14\n.......\nLDUDLLD\nDLRDDLD", "5 7 19\n.......\nR... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 12 | codeforces | |
a23e1706c092a7922e104b6681260126 | Lights Out | Lenny is playing a game on a 3<=×<=3 grid of lights. In the beginning of the game all lights are switched on. Pressing any of the lights will toggle it and all side-adjacent lights. The goal of the game is to switch all the lights off. We consider the toggling as follows: if the light was switched on then it will be sw... | {"inputs": ["1 0 0\n0 0 0\n0 0 1", "1 0 1\n8 8 8\n2 0 3", "13 85 77\n25 50 45\n65 79 9", "96 95 5\n8 84 74\n67 31 61", "24 54 37\n60 63 6\n1 84 26", "23 10 40\n15 6 40\n92 80 77", "62 74 80\n95 74 93\n2 47 95", "80 83 48\n26 0 66\n47 76 37", "32 15 65\n7 54 36\n5 51 3", "22 97 12\n71 8 24\n100 21 64", "46 37 13\n87 0 5... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 522 | codeforces | |
a25b99927c1fe9a25064f4c8913d5efe | Logging | The main server of Gomble company received a log of one top-secret process, the name of which can't be revealed. The log was written in the following format: «[date:time]: message», where for each «[date:time]» value existed not more than 10 lines. All the files were encoded in a very complicated manner, and only one p... | {"inputs": ["5\n[05:00 a.m.]: Server is started\n[05:00 a.m.]: Rescan initialized\n[01:13 p.m.]: Request processed\n[01:10 p.m.]: Request processed\n[11:40 p.m.]: Rescan completed", "3\n[09:00 a.m.]: User logged in\n[08:00 a.m.]: User logged in\n[07:00 a.m.]: User logged in", "1\n[10:41 a.m.]: apppmama", "2\n[06:00 p.m... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 7 | codeforces | |
a26a8e7336bd96f1651e41965adafc97 | Harry Potter and the Golden Snitch | Brothers Fred and George Weasley once got into the sporting goods store and opened a box of Quidditch balls. After long and painful experiments they found out that the Golden Snitch is not enchanted at all. It is simply a programmed device. It always moves along the same trajectory, which is a polyline with vertices at... | {"inputs": ["4\n0 0 0\n0 10 0\n10 10 0\n10 0 0\n0 0 0\n1 1\n5 5 25", "4\n0 0 0\n0 10 0\n10 10 0\n10 0 0\n0 0 0\n1 1\n5 5 50", "1\n1 2 3\n4 5 6\n20 10\n1 2 3", "4\n0 0 0\n0 1 0\n1 1 0\n1 0 0\n0 0 0\n10 5\n0 0 8", "4\n1 0 0\n0 1 0\n-1 0 0\n0 -1 0\n1 0 0\n10 5\n9 0 -8", "5\n32 -5 -42\n-25 -38 -6\n-13 41 25\n21 -25 -32\n43... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
a27015427e5cc08931f5d8475ff1b770 | Borze | Ternary numeric notation is quite popular in Berland. To telegraph the ternary number the Borze alphabet is used. Digit 0 is transmitted as «.», 1 as «-.» and 2 as «--». You are to decode the Borze code, i.e. to find out the ternary number given its representation in Borze alphabet.
The first line contains a number in ... | {"inputs": [".-.--", "--.", "-..-.--", "---..", "..--.---..", "-.....----.", ".", "-.", "--", "..", "--.", ".--.", ".-.-..", "----.-.", "-..--.-.", "..--..--.", "-.-.---.--..-..-.-.-..-..-.--.", "---.-.-.------..-..-..-..-.-..-.--.-.-..-.-.-----..-.-.", "-.-..--.-.-.-.-.-..-.-.-.---------.--.---..--...--.-----.-.-.-...... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1,391 | codeforces | |
a286165c7516c35e6956e6d47b0b42dd | A and B and Team Training | A and B are preparing themselves for programming contests.
An important part of preparing for a competition is sharing programming knowledge from the experienced members to those who are just beginning to deal with the contests. Therefore, during the next team training A decided to make teams so that newbies are solvi... | {"inputs": ["2 6", "4 5", "1 1", "3 3", "500000 500000", "70 100", "5 12525", "10 5", "5 10", "0 0", "0 1", "1 0", "0 21233", "12523 0", "1231 1253", "500000 0", "1 500000", "250000 500000", "500000 250000", "33333 77777", "30900 174529", "89979 57154", "231646 398487", "332019 281112", "473686 122443", "481245 86879",... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 84 | codeforces | |
a2b399b76ffe355dbbff668c36b53694 | Restoring Painting | Vasya works as a watchman in the gallery. Unfortunately, one of the most expensive paintings was stolen while he was on duty. He doesn't want to be fired, so he has to quickly restore the painting. He remembers some facts about it.
- The painting is a square 3<=×<=3, each cell contains a single integer from 1 to *n*,... | {"inputs": ["2 1 1 1 2", "3 3 1 2 3", "1 1 1 1 1", "1000 522 575 426 445", "99000 52853 14347 64237 88869", "100000 2 2 2 2", "2 1 1 2 2", "10 9 10 8 10", "100 19 16 35 83", "1000 102 583 606 929", "10000 1816 3333 6908 7766", "100000 80015 84290 50777 30497", "100000 64022 49026 55956 88430", "100000 10263 46628 10268... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 80 | codeforces | |
a2ba0f879682d8449601222a60c2fade | Chip 'n Dale Rescue Rangers | A team of furry rescue rangers was sitting idle in their hollow tree when suddenly they received a signal of distress. In a few moments they were ready, and the dirigible of the rescue chipmunks hit the road.
We assume that the action takes place on a Cartesian plane. The headquarters of the rescuers is located at poi... | {"inputs": ["0 0 5 5\n3 2\n-1 -1\n-1 0", "0 0 0 1000\n100 1000\n-50 0\n50 0", "0 0 0 1000\n100 5\n0 -50\n0 50", "0 1000 0 0\n50 10\n-49 0\n49 0", "0 1000 0 0\n50 10\n0 -48\n0 -49", "0 0 0 -5000\n100 20\n-50 0\n50 0", "0 0 0 -350\n55 5\n0 -50\n0 50", "0 -1000 0 0\n11 10\n-10 0\n10 0", "0 -1000 0 0\n22 10\n0 -12\n0 -10",... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 8 | codeforces | |
a2bc2f7521976470d00bfaf50316f27e | none | Limak is a little bear who loves to play. Today he is playing by destroying block towers. He built *n* towers in a row. The *i*-th tower is made of *h**i* identical blocks. For clarification see picture for the first sample.
Limak will repeat the following operation till everything is destroyed.
Block is called inter... | {"inputs": ["6\n2 1 4 6 2 2", "7\n3 3 3 1 3 3 3", "7\n5128 5672 5805 5452 5882 5567 5032", "10\n1 2 2 3 5 5 5 4 2 1", "14\n20 20 20 20 20 20 3 20 20 20 20 20 20 20", "50\n3 2 4 3 5 3 4 5 3 2 3 3 3 4 5 4 2 2 3 3 4 4 3 2 3 3 2 3 4 4 5 2 5 2 3 5 4 4 2 2 3 5 2 5 2 2 5 4 5 4", "1\n1", "1\n1000000000", "2\n1 1", "2\n1049 109... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 35 | codeforces | |
a2bf2a16b17237429b68c7603aca7dd8 | Counting Arrays | You are given two positive integer numbers *x* and *y*. An array *F* is called an *y*-factorization of *x* iff the following conditions are met:
- There are *y* elements in *F*, and all of them are integer numbers; - .
You have to count the number of pairwise distinct arrays that are *y*-factorizations of *x*. Two ... | {"inputs": ["2\n6 3\n4 2", "1\n524288 1000000", "1\n65536 1000000", "1\n5612 11399"], "outputs": ["36\n6", "645043186", "928522471", "215664246"]} | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 3 | codeforces | |
a31657a96754322c131cf30c5d872c0f | Vika and Segments | Vika has an infinite sheet of squared paper. Initially all squares are white. She introduced a two-dimensional coordinate system on this sheet and drew *n* black horizontal and vertical segments parallel to the coordinate axes. All segments have width equal to 1 square, that means every segment occupy some set of neigh... | {"inputs": ["3\n0 1 2 1\n1 4 1 2\n0 3 2 3", "4\n-2 -1 2 -1\n2 1 -2 1\n-1 -2 -1 2\n1 2 1 -2", "1\n1 1 1 1", "10\n-357884841 -999999905 -357884841 999999943\n-130177221 999999983 -130177221 -999999974\n627454332 999999936 627454332 -999999900\n999999986 366591992 -999999919 366591992\n488824292 999999952 488824292 -99999... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
a3281c31c3b5224aa9892ad964cb7901 | Choosing Symbol Pairs | There is a given string *S* consisting of *N* symbols. Your task is to find the number of ordered pairs of integers *i* and *j* such that
1. 1<=≤<=*i*,<=*j*<=≤<=*N*
2. *S*[*i*]<==<=*S*[*j*], that is the *i*-th symbol of string *S* is equal to the *j*-th.
The single input line contains *S*, consisting of lowercase Lat... | {"inputs": ["great10", "aaaaaaaaaa", "great10", "aaaaaaaaaa", "aabb", "w", "129a", "233444", "abacaba", "abcdefghijklmnopqrstuvwxyz0987654321abcdefghijklmnopqrstuvwxyz0987654321abcdefghijklmnopqrstuvwxyz0987654321", "zazaeeeeeeeq34443333444tttttt", "00000000000000000000000", "999000888775646453342311"], "outputs": ["7"... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 93 | codeforces | |
a36e01a2e880a8e0b0d446d29f8160bf | Bertown roads | Bertown has *n* junctions and *m* bidirectional roads. We know that one can get from any junction to any other one by the existing roads.
As there were more and more cars in the city, traffic jams started to pose real problems. To deal with them the government decided to make the traffic one-directional on all the ro... | {"inputs": ["6 8\n1 2\n2 3\n1 3\n4 5\n4 6\n5 6\n2 4\n3 5", "6 7\n1 2\n2 3\n1 3\n4 5\n4 6\n5 6\n2 4", "10 19\n6 8\n5 8\n8 3\n1 9\n3 6\n4 8\n10 8\n8 7\n5 3\n10 1\n5 10\n4 10\n2 1\n3 2\n7 6\n8 2\n1 6\n10 7\n2 10", "5 9\n5 4\n2 1\n3 4\n4 1\n5 2\n2 3\n4 2\n3 1\n5 1", "6 9\n4 1\n3 4\n5 6\n3 1\n4 2\n1 5\n6 1\n6 4\n5 4", "5 10... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 2 | codeforces | |
a375bb8bb85b5bb04c9e51f73ff57e19 | Nearest vectors | You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.
Non-oriented angle is non-negative value, minimal between clockwise and counterclockwise direction angles. Non-oriented angle is always between 0 ... | {"inputs": ["4\n-1 0\n0 -1\n1 0\n1 1", "6\n-1 0\n0 -1\n1 0\n1 1\n-4 -5\n-4 -6", "10\n8 6\n-7 -3\n9 8\n7 10\n-3 -8\n3 7\n6 -8\n-9 8\n9 2\n6 7", "20\n-9 8\n-7 3\n0 10\n3 7\n6 -9\n6 8\n7 -6\n-6 10\n-10 3\n-8 -10\n10 -2\n1 -8\n-8 10\n10 10\n10 6\n-5 6\n5 -8\n5 -9\n-9 -1\n9 2", "2\n351 -4175\n-328 -657", "3\n620 -1189\n8101... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 6 | codeforces | |
a39d1af7355f30882262bbdc3bc1142b | Duff in Love | Duff is in love with lovely numbers! A positive integer *x* is called lovely if and only if there is no such positive integer *a*<=><=1 such that *a*2 is a divisor of *x*.
Malek has a number store! In his store, he has only divisors of positive integer *n* (and he has all of them). As a birthday present, Malek want... | {"inputs": ["10", "12", "1", "2", "4", "8", "3", "31", "97", "1000000000000", "15", "894", "271", "2457", "2829", "5000", "20", "68", "3096", "1024", "1048576", "413933789280", "817634153013", "56517269141", "30707328551", "279564127218", "491159577042", "734337660466", "808453785117", "55926835837", "294809951965", "5... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 149 | codeforces | |
a3a5585a3d9731038d11e4b6fdfc84f4 | Soroban | You know that Japan is the country with almost the largest 'electronic devices per person' ratio. So you might be quite surprised to find out that the primary school in Japan teaches to count using a Soroban — an abacus developed in Japan. This phenomenon has its reasons, of course, but we are not going to speak about ... | {"inputs": ["2", "13", "720", "0", "1", "3", "4", "5", "6", "637", "7", "8", "9", "10", "11", "100", "99", "245", "118", "429", "555", "660", "331", "987", "123456789", "234567890", "100000000", "111111111", "90909090", "987654321", "45165125", "445511006", "999999999", "984218523", "19", "10000000"], "outputs": ["O-|O... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 27 | codeforces | |
a3e71338c9156c7480a89573f5f6404e | Prison Transfer | The prison of your city has *n* prisoners. As the prison can't accommodate all of them, the city mayor has decided to transfer *c* of the prisoners to a prison located in another city.
For this reason, he made the *n* prisoners to stand in a line, with a number written on their chests. The number is the severity of th... | {"inputs": ["4 3 3\n2 3 1 1", "1 1 1\n2", "11 4 2\n2 2 0 7 3 2 2 4 9 1 4", "57 2 10\n7 5 2 7 4 1 0 5 2 9 2 9 8 6 6 5 9 6 8 1 0 1 0 3 2 6 5 2 8 8 8 8 0 9 4 3 6 6 2 4 5 1 2 0 1 7 1 1 5 4 5 0 7 5 1 9 6", "2 228885628 1\n90897004 258427916", "3 1 1\n1 2 1", "3 3 3\n3 2 3", "4 2 2\n1 3 3 2", "1 228 1\n1"], "outputs": ["2", ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 33 | codeforces | |
a3f1a98e1d913a9a756aac7c1010239d | Matching Names | Teachers of one programming summer school decided to make a surprise for the students by giving them names in the style of the "Hobbit" movie. Each student must get a pseudonym maximally similar to his own name. The pseudonym must be a name of some character of the popular saga and now the teachers are busy matching ps... | {"inputs": ["5\ngennady\ngalya\nboris\nbill\ntoshik\nbilbo\ntorin\ngendalf\nsmaug\ngaladriel", "1\na\na", "2\na\na\na\na", "2\na\nb\na\na", "2\nb\nb\na\na", "2\na\nb\na\nb", "10\nbaa\na\nba\naabab\naa\nbaab\nbb\nabbbb\na\na\na\nba\nba\nbaabbb\nba\na\naabb\nbaa\nab\nb", "10\nabaabbaaa\nacccccaacabc\nacbaabaaabbca\naaccc... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
a3f7d08d933ed661efd4b6e37e7599db | Minimum Difficulty | Mike is trying rock climbing but he is awful at it.
There are *n* holds on the wall, *i*-th hold is at height *a**i* off the ground. Besides, let the sequence *a**i* increase, that is, *a**i*<=<<=*a**i*<=+<=1 for all *i* from 1 to *n*<=-<=1; we will call such sequence a track. Mike thinks that the track *a*1, ...,... | {"inputs": ["3\n1 4 6", "5\n1 2 3 4 5", "5\n1 2 3 7 8", "3\n1 500 1000", "10\n1 2 3 4 5 6 7 8 9 10", "10\n1 4 9 16 25 36 49 64 81 100", "10\n300 315 325 338 350 365 379 391 404 416", "15\n87 89 91 92 93 95 97 99 101 103 105 107 109 111 112", "60\n3 5 7 8 15 16 18 21 24 26 40 41 43 47 48 49 50 51 52 54 55 60 62 71 74 84... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 416 | codeforces | |
a402223ac225543c57f2056a5c75f84a | After Training | After a team finished their training session on Euro football championship, Valeric was commissioned to gather the balls and sort them into baskets. Overall the stadium has *n* balls and *m* baskets. The baskets are positioned in a row from left to right and they are numbered with numbers from 1 to *m*, correspondingly... | {"inputs": ["4 3", "3 1", "10 3", "6 5", "2 6", "5 2", "85702 100000", "9 2", "45 88", "61 51", "21 57", "677 787", "37 849", "453 855", "165 374", "328 3", "8 80", "90 544", "85 60", "392 5", "8 87", "6 358", "501 70", "3834 1", "1 8828", "69230 89906", "27646 59913", "37006 54783", "1 100000", "100000 1", "100000 100... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 67 | codeforces | |
a4657b14d49366265fcbca7ce5474e37 | Roman and Numbers | Roman is a young mathematician, very famous in Uzhland. Unfortunately, Sereja doesn't think so. To make Sereja change his mind, Roman is ready to solve any mathematical problem. After some thought, Sereja asked Roma to find, how many numbers are close to number *n*, modulo *m*.
Number *x* is considered close to number... | {"inputs": ["104 2", "223 4", "7067678 8", "202 10", "1306432 9", "9653092 9", "600038 6", "4064044 4", "5899025 7", "2496234323687 2", "1 1", "123456789123456789 2", "123 1", "6328128 6", "8966261 5", "8900064 4", "576021249 86", "682459775 6", "458498549 4", "511736928 87", "275126649 81", "576279776452 33", "4504977... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
a475ab27993339a77c13dc5ef2a69e3c | Diverse Team | There are $n$ students in a school class, the rating of the $i$-th student on Codehorses is $a_i$. You have to form a team consisting of $k$ students ($1 \le k \le n$) such that the ratings of all team members are distinct.
If it is impossible to form a suitable team, print "NO" (without quotes). Otherwise print "YES"... | {"inputs": ["5 3\n15 13 15 15 12", "5 4\n15 13 15 15 12", "4 4\n20 10 40 30", "1 1\n1", "100 53\n16 17 1 2 27 5 9 9 53 24 17 33 35 24 20 48 56 73 12 14 39 55 58 13 59 73 29 26 40 33 22 29 34 22 55 38 63 66 36 13 60 42 10 15 21 9 11 5 23 37 79 47 26 3 79 53 44 8 71 75 42 11 34 39 79 33 10 26 23 23 17 14 54 41 60 31 83 5... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 184 | codeforces | |
a499959a0803fa0a29622b615c527e5b | Time to Raid Cowavans | As you know, the most intelligent beings on the Earth are, of course, cows. This conclusion was reached long ago by the Martian aliens, as well as a number of other intelligent civilizations from outer space.
Sometimes cows gather into cowavans. This seems to be seasonal. But at this time the cows become passive and ... | {"inputs": ["3\n1 2 3\n2\n1 1\n1 2", "4\n2 3 5 7\n3\n1 3\n2 3\n2 2", "5\n3 2 4 5 6\n8\n4 2\n3 1\n3 5\n3 4\n3 5\n5 5\n4 4\n5 3", "10\n10 10 7 10 2 8 9 6 4 9\n10\n10 9\n3 5\n4 3\n6 5\n3 10\n6 1\n6 3\n5 8\n2 6\n2 6", "15\n63 32 13 12 2 97 24 25 74 2 6 35 79 87 62\n15\n4 5\n4 4\n5 3\n4 3\n3 4\n4 5\n4 3\n5 4\n5 3\n5 5\n5 5\... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
a4b4af73658934c4778c19bf9970322b | Lecture | You have a new professor of graph theory and he speaks very quickly. You come up with the following plan to keep up with his lecture and make notes.
You know two languages, and the professor is giving the lecture in the first one. The words in both languages consist of lowercase English characters, each language consi... | {"inputs": ["4 3\ncodeforces codesecrof\ncontest round\nletter message\ncodeforces contest letter contest", "5 3\njoll wuqrd\neuzf un\nhbnyiyc rsoqqveh\nhbnyiyc joll joll euzf joll", "5 5\nqueyqj f\nb vn\ntabzvk qpfzoqx\nytnyonoc hnxsd\njpggvr lchinjmt\nqueyqj jpggvr b ytnyonoc b", "10 22\nazbrll oen\ngh vdyayei\njphve... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 842 | codeforces | |
a4bd2375265606dcb3fc9755ddcf11e7 | Wonder Room | The start of the new academic year brought about the problem of accommodation students into dormitories. One of such dormitories has a *a*<=×<=*b* square meter wonder room. The caretaker wants to accommodate exactly *n* students there. But the law says that there must be at least 6 square meters per student in a room (... | {"inputs": ["3 3 5", "2 4 4", "1 1 1", "1 1000000000 1000000000", "8 7 5", "1000000000 1 1", "1000000000 1000000000 1000000000", "800000003 7 7", "11 7 7", "1000000000 1 1", "100000 100 1000", "1000000000 6000 1000000", "1 1000000000 1000000000", "980000000 2 100000", "13 7 6", "16 19 5", "258180623 16000 16000", "9999... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 3 | codeforces | |
a4c73b1bebe0b753f5fd0adb2bd62c52 | Jeff and Permutation | Jeff's friends know full well that the boy likes to get sequences and arrays for his birthday. Thus, Jeff got sequence *p*1,<=*p*2,<=...,<=*p**n* for his birthday.
Jeff hates inversions in sequences. An inversion in sequence *a*1,<=*a*2,<=...,<=*a**n* is a pair of indexes *i*,<=*j* (1<=≤<=*i*<=<<=*j*<=≤<=*n*), such... | {"inputs": ["2\n2 1", "9\n-2 0 -1 0 -1 2 1 0 -1", "9\n0 0 1 1 0 0 1 0 1", "8\n0 1 2 -1 -2 1 -2 2", "24\n-1 -1 2 2 0 -2 2 -1 0 0 2 -2 3 0 2 -3 0 -3 -1 1 0 0 -1 -2", "1\n0", "31\n-2 2 -2 -1 0 0 1 2 1 1 -1 -2 1 -1 -2 2 0 1 -1 -2 -1 -2 -1 2 2 2 2 1 1 0 1", "9\n1 -1 -1 0 -1 0 1 1 1", "5\n1 0 1 -2 1", "31\n-5 -5 5 3 -1 3 1 -... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 1 | codeforces | |
a4cc49fca72a78529802e27c6dbba97f | Bracket Sequences Concatenation Problem | A bracket sequence is a string containing only characters "(" and ")".
A regular bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" between the original characters of the sequence. For example, bracket sequences "()()", "(())" are reg... | {"inputs": ["3\n)\n()\n(", "2\n()\n()", "7\n()(\n)\n)(\n())\n(((\n()()()\n()", "6\n(\n((\n(((\n))))\n)))))\n))))))", "9\n(()\n((())\n(\n)\n(()()(()())))\n)\n)(()(\n)())(\n)()(", "2\n(((((((((()\n)))))))))", "1\n)(", "1\n()", "2\n(((\n)))", "10\n()()(\n)((\n)()(((()(\n(((()(\n)(()((\n))\n()()()()\n))()))((\n)\n))())(", ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 44 | codeforces | |
a4d1149733c96e064b611faa2a965482 | Useful Decomposition | Ramesses knows a lot about problems involving trees (undirected connected graphs without cycles)!
He created a new useful tree decomposition, but he does not know how to construct it, so he asked you for help!
The decomposition is the splitting the edges of the tree in some simple paths in such a way that each two pa... | {"inputs": ["4\n1 2\n2 3\n3 4", "6\n1 2\n2 3\n3 4\n2 5\n3 6", "5\n1 2\n1 3\n1 4\n1 5", "2\n1 2", "8\n1 2\n1 3\n1 4\n1 8\n7 8\n6 8\n5 8", "9\n1 2\n1 3\n1 4\n1 5\n1 6\n6 7\n7 8\n7 9", "3\n2 3\n1 2"], "outputs": ["Yes\n1\n1 4", "No", "Yes\n4\n1 2\n1 3\n1 4\n1 5", "Yes\n1\n1 2", "No", "No", "Yes\n1\n1 3"]} | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 21 | codeforces | |
a4f83e70290499e2174902d149702f3e | Keyboard | Vasya learns to type. He has an unusual keyboard at his disposal: it is rectangular and it has *n* rows of keys containing *m* keys in each row. Besides, the keys are of two types. Some of the keys have lowercase Latin letters on them and some of the keys work like the "Shift" key on standard keyboards, that is, they m... | {"inputs": ["2 2 1\nab\ncd\n1\nA", "2 2 1\nab\ncd\n1\ne", "2 2 1\nab\ncS\n5\nabcBA", "3 9 4\nqwertyuio\nasdfghjkl\nSzxcvbnmS\n35\nTheQuIcKbRoWnFOXjummsovertHeLazYDOG", "10 9 3\noboxlgpey\nyxcuwkkmp\njuqeflhwq\nsfnxqtjqS\nkkudcnyjl\nhgjlcrkjq\njnofqksxn\nqbhsnuguv\nlvahnifao\nebwnnlrwe\n35\nCodeforcesBetaRoundproblemAte... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 32 | codeforces | |
a51153791f483833a64b7568e351adfb | Mishka and Contest | Mishka started participating in a programming contest. There are $n$ problems in the contest. Mishka's problem-solving skill is equal to $k$.
Mishka arranges all problems from the contest into a list. Because of his weird principles, Mishka only solves problems from one of the ends of the list. Every time, he chooses ... | {"inputs": ["8 4\n4 2 3 1 5 1 6 4", "5 2\n3 1 2 1 3", "5 100\n12 34 55 43 21", "100 100\n44 47 36 83 76 94 86 69 31 2 22 77 37 51 10 19 25 78 53 25 1 29 48 95 35 53 22 72 49 86 60 38 13 91 89 18 54 19 71 2 25 33 65 49 53 5 95 90 100 68 25 5 87 48 45 72 34 14 100 44 94 75 80 26 25 7 57 82 49 73 55 43 42 60 34 8 51 11 71... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 265 | codeforces | |
a54faeb0d9470c4cfd362bc7fddfe085 | Coloring Brackets | Once Petya read a problem about a bracket sequence. He gave it much thought but didn't find a solution. Today you will face it.
You are given string *s*. It represents a correct bracket sequence. A correct bracket sequence is the sequence of opening ("(") and closing (")") brackets, such that it is possible to obtain ... | {"inputs": ["(())", "(()())", "()", "((()))", "()(())", "()()()", "(())(())", "()()()()()()()()()()()(())", "()(())()((()))", "()()(())()(())", "()()()()()()()()()()()()()()()()", "(()()())", "()(()())()", "(())()(())()", "()()(()())(())()()()", "()()()((((())))())()()()()()((()))()()(())()(((())))()(()())((())())((()(... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 5 | codeforces | |
a59b13d5653d4598ad0c3212f76b67ab | Mashmokh and ACM | Mashmokh's boss, Bimokh, didn't like Mashmokh. So he fired him. Mashmokh decided to go to university and participate in ACM instead of finding a new job. He wants to become a member of Bamokh's team. In order to join he was given some programming tasks and one week to solve them. Mashmokh is not a very experienced prog... | {"inputs": ["3 2", "6 4", "2 1", "1478 194", "1415 562", "1266 844", "680 1091", "1229 1315", "1766 1038", "1000 1", "2000 100", "1 1", "2000 1000", "1928 1504", "2000 2000", "29 99", "56 48", "209 370", "83 37", "49 110", "217 3", "162 161", "273 871", "43 1640", "1472 854", "1639 1056", "359 896", "1544 648", "436 13... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 79 | codeforces | |
a5a3bb978243d6aaa482cd809f293382 | Ilya and Sticks | In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of *n* sticks and an instrument. Each stick is characterized by its length *l**i*.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way tha... | {"inputs": ["4\n2 4 4 2", "4\n2 2 3 5", "4\n100003 100004 100005 100006", "8\n5 3 3 3 3 4 4 4", "10\n123 124 123 124 2 2 2 2 9 9", "8\n10 10 10 10 11 10 11 10", "1\n1000000", "10\n10519 10519 10520 10520 10520 10521 10521 10521 10522 10523", "100\n4116 4116 4117 4117 4117 4117 4118 4119 4119 4119 4119 4120 4120 4120 41... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 53 | codeforces | |
a5bae04f5bb19ba1e9501f2a8499e803 | Number of Ways | You've got array *a*[1],<=*a*[2],<=...,<=*a*[*n*], consisting of *n* integers. Count the number of ways to split all the elements of the array into three contiguous parts so that the sum of elements in each part is the same.
More formally, you need to find the number of such pairs of indices *i*,<=*j* (2<=≤<=*i*<=≤<=... | {"inputs": ["5\n1 2 3 0 3", "4\n0 1 -1 0", "2\n4 1", "9\n0 0 0 0 0 0 0 0 0", "10\n2 5 -2 2 -3 -2 3 5 -5 -2", "1\n1", "3\n1 2 3", "100\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 103 | codeforces | |
a5e4fdeedafed69e2a72d16220c9c4f7 | Inna and Pink Pony | Dima and Inna are doing so great! At the moment, Inna is sitting on the magic lawn playing with a pink pony. Dima wanted to play too. He brought an *n*<=×<=*m* chessboard, a very tasty candy and two numbers *a* and *b*.
Dima put the chessboard in front of Inna and placed the candy in position (*i*,<=*j*) on the board.... | {"inputs": ["5 7 1 3 2 2", "5 5 2 3 1 1", "1 1 1 1 1 1", "23000 15500 100 333 9 1", "33999 99333 33000 99000 3 9", "5 7 1 3 1 2", "1 100 1 50 1 50", "1000 1 1 1 1 500", "304 400 12 20 4 4", "1000000 1000000 1000000 1000000 1000000 1000000", "1000000 99999 12345 23456 23 54", "50000 100000 500 1000 500 1000", "50000 100... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 8 | codeforces | |
a605b693f3432e792d6baf61b184cb2d | Fish | *n* fish, numbered from 1 to *n*, live in a lake. Every day right one pair of fish meet, and the probability of each other pair meeting is the same. If two fish with indexes i and j meet, the first will eat up the second with the probability *a**ij*, and the second will eat up the first with the probability *a**ji*<==<... | {"inputs": ["2\n0 0.5\n0.5 0", "4\n0 0.5 0.5 0.5\n0.5 0 0.5 0.5\n0.5 0.5 0 0.5\n0.5 0.5 0.5 0", "5\n0 1 1 1 1\n0 0 0.5 0.5 0.5\n0 0.5 0 0.5 0.5\n0 0.5 0.5 0 0.5\n0 0.5 0.5 0.5 0", "1\n0.000", "2\n0.000 0.551\n0.449 0.000", "3\n0.000 0.817 0.584\n0.183 0.000 0.665\n0.416 0.335 0.000", "4\n0.000 0.083 0.548 0.503\n0.917 ... | UNKNOWN | [
"PYTHON3"
] | CODEFORCES | 9 | codeforces |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.