difficulty stringclasses 3
values | public_test_cases stringlengths 2 1.14k | prompt stringlengths 449 3.95k | test listlengths 3 100 | entry_point stringlengths 0 142 | task_id stringlengths 4 8 | is_stdin bool 2
classes |
|---|---|---|---|---|---|---|
easy | [{"input": "6\nabc\nacb\nbac\nbca\ncab\ncba\n", "output": "YES\nYES\nYES\nNO\nNO\nYES\n", "testtype": "stdin"}] | There are three cards with letters $\texttt{a}$, $\texttt{b}$, $\texttt{c}$ placed in a row in some order. You can do the following operation at most once:
- Pick two cards, and swap them. Is it possible that the row becomes $\texttt{abc}$ after the operation? Output "YES" if it is possible, and "NO" otherwise.
... | [
{
"input": "1\nabc\n",
"output": "YES\n",
"testtype": "stdin"
},
{
"input": "3\nabc\nabc\nabc\n",
"output": "YES\nYES\nYES\n",
"testtype": "stdin"
},
{
"input": "5\ncab\nacb\ncba\nbac\nbca\n",
"output": "NO\nYES\nYES\nYES\nNO\n",
"testtype": "stdin"
},
{
"input": ... | 1873_A | true | |
easy | "[{\"input\": \"4\\n4\\n2 2 1 2\\n3\\n0 1 2\\n5\\n4 3 2 3 4\\n9\\n9 9 9 9 9 9 9 9 9\\n\", \"output\"(...TRUNCATED) | "Slavic is preparing a present for a friend's birthday. He has an array $a$ of $n$ digits and the pr(...TRUNCATED) | [{"input":"1\n2\n6 1\n","output":"12","testtype":"stdin"},{"input":"1\n4\n2 2 1 2\n","output":"16\n"(...TRUNCATED) | 1873_B | true | |
easy | "[{\"input\": \"8\\n6 3\\nWBWWWB\\n7 3\\nWWBWBWW\\n5 4\\nBWBWB\\n5 5\\nBBBBB\\n8 2\\nBWBWBBBB\\n10 2(...TRUNCATED) | "You are given a strip of paper $s$ that is $n$ cells long. Each cell is either black or white. In a(...TRUNCATED) | [{"input":"2\n5 3\nBWBBW\n9 7\nBBWBWWBBB\n","output":"2\n2","testtype":"stdin"},{"input":"5\n9 1\nBW(...TRUNCATED) | 1873_D | true | |
medium | "[{\"input\": \"14\\n1 0\\na\\n2 0\\nab\\n2 1\\nba\\n3 1\\nabb\\n3 2\\nabc\\n6 2\\nbacacd\\n6 2\\nfa(...TRUNCATED) | "You are given a string $s$ of length $n$, consisting of lowercase Latin letters, and an integer $k$(...TRUNCATED) | [{"input":"5\n10 3\naaabbbcccd\n10 1\naaabbccddd\n10 0\naaabbccddd\n10 9\nabcdefghij\n10 2\naabbccdd(...TRUNCATED) | 1883_B | true | |
medium | "[{\"input\": \"15\\n2 5\\n7 3\\n3 3\\n7 4 1\\n5 2\\n9 7 7 3 9\\n5 5\\n5 4 1 2 3\\n7 4\\n9 5 1 5 9 5(...TRUNCATED) | "You are given an array of integers $a_1, a_2, \\ldots, a_n$ and a number $k$ ($2 \\leq k \\leq 5$).(...TRUNCATED) | [{"input":"1\n1 5\n3\n","output":"2","testtype":"stdin"},{"input":"1\n2 4\n7 4\n","output":"0","test(...TRUNCATED) | 1883_C | true | |
easy | "[{\"input\": \"6\\n1\\n3\\n5\\n100\\n999\\n1000\\n\", \"output\": \"First\\nSecond\\nFirst\\nFirst\(...TRUNCATED) | "Vanya and Vova are playing a game. Players are given an integer $n$. On their turn, the player can (...TRUNCATED) | [{"input":"1\n2\n","output":"First\n","testtype":"stdin"},{"input":"1\n994\n","output":"First\n","te(...TRUNCATED) | 1899_A | true | |
hard | "[{\"input\": \"5\\n2\\n1 2\\n6\\n10 2 3 6 1 3\\n4\\n1000000000 1000000000 1000000000 1000000000\\n1(...TRUNCATED) | "Alex is participating in the filming of another video of BrMeast, and BrMeast asked Alex to prepare(...TRUNCATED) | [{"input":"1\n2\n1 1\n","output":"0\n","testtype":"stdin"},{"input":"4\n2\n41627921 22566358\n6\n902(...TRUNCATED) | 1899_B | true | |
hard | "[{\"input\": \"7\\n5\\n1 2 3 4 5\\n4\\n9 9 8 8\\n6\\n-1 4 -1 0 5 -4\\n4\\n-1 2 4 -3\\n1\\n-1000\\n3(...TRUNCATED) | "A subarray is a continuous part of array.\n\nYarik recently found an array $a$ of $n$ elements and (...TRUNCATED) | [{"input":"1\n1\n414\n","output":"414","testtype":"stdin"},{"input":"1\n1\n350\n","output":"350","te(...TRUNCATED) | 1899_C | true | |
hard | "[{\"input\": \"5\\n1\\n2\\n4\\n3 1 3 2\\n2\\n1000 1000\\n3\\n1 1 1\\n19\\n2 4 1 6 2 8 5 4 2 10 5 10(...TRUNCATED) | "Yarik is a big fan of many kinds of music. But Yarik loves not only listening to music but also wri(...TRUNCATED) | [{"input":"2\n55\n367840009 965520411 947229431 773189327 773713957 978578631 662924875 522187146 91(...TRUNCATED) | 1899_D | true | |
easy | "[{\"input\": \"[\\\"7868190130M7522\\\", \\\"5303914400F9211\\\", \\\"9273338290F4010\\\"]\", \"out(...TRUNCATED) | "You are given a 0-indexed array of strings details. Each element of details provides information ab(...TRUNCATED) | [{"input":"[\"3988132605O4995\"]","output":"0","testtype":"functional"},{"input":"[\"0121327775O7247(...TRUNCATED) | class Solution:
def countSeniors(self, details: List[str]) -> int:
| 2727 | false |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 9