task_id stringlengths 11 15 | solution stringclasses 1
value | problem_statement stringlengths 433 3.95k | tests listlengths 2 52 |
|---|---|---|---|
1873/1873_A | 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.
... | [
{
"stdin": "6\nabc\nacb\nbac\nbca\ncab\ncba\n",
"stdout": "YES\nYES\nYES\nNO\nNO\nYES\n"
},
{
"stdin": "1\nabc\n",
"stdout": "YES\n"
},
{
"stdin": "3\nabc\nabc\nabc\n",
"stdout": "YES\nYES\nYES\n"
},
{
"stdin": "5\ncab\nacb\ncba\nbac\nbca\n",
"stdout": "NO\nYES\nYES\nYES\... | |
1873/1873_B | "Slavic is preparing a present for a friend's birthday. He has an array $a$ of $n$ digits and the pr(...TRUNCATED) | [{"stdin":"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","stdout":"16\n2\n432\n4304(...TRUNCATED) | |
1873/1873_D | "You are given a strip of paper $s$ that is $n$ cells long. Each cell is either black or white. In a(...TRUNCATED) | [{"stdin":"8\n6 3\nWBWWWB\n7 3\nWWBWBWW\n5 4\nBWBWB\n5 5\nBBBBB\n8 2\nBWBWBBBB\n10 2\nWBBWBBWBBW\n4 (...TRUNCATED) | |
1883/1883_B | "You are given a string $s$ of length $n$, consisting of lowercase Latin letters, and an integer $k$(...TRUNCATED) | [{"stdin":"14\n1 0\na\n2 0\nab\n2 1\nba\n3 1\nabb\n3 2\nabc\n6 2\nbacacd\n6 2\nfagbza\n6 2\nzwaafa\n(...TRUNCATED) | |
1883/1883_C | "You are given an array of integers $a_1, a_2, \\ldots, a_n$ and a number $k$ ($2 \\leq k \\leq 5$).(...TRUNCATED) | [{"stdin":"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 1\n3 4\n6 3 6\(...TRUNCATED) | |
1899/1899_A | "Vanya and Vova are playing a game. Players are given an integer $n$. On their turn, the player can (...TRUNCATED) | [{"stdin":"6\n1\n3\n5\n100\n999\n1000\n","stdout":"First\nSecond\nFirst\nFirst\nSecond\nFirst\n"},{"(...TRUNCATED) | |
1899/1899_C | "A subarray is a continuous part of array.\n\nYarik recently found an array $a$ of $n$ elements and (...TRUNCATED) | [{"stdin":"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\n101 -99 101\n2(...TRUNCATED) | |
abc301/abc301_a | "Takahashi and Aoki played N games.\r\nYou are given a string S of length N, representing the result(...TRUNCATED) | [{"stdin":"5\nTTAAT\n","stdout":"T\n"},{"stdin":"6\nATTATA\n","stdout":"T\n"},{"stdin":"1\nA\n","std(...TRUNCATED) | |
abc301/abc301_b | "We have a sequence of length N consisting of positive integers: A=(A_1,\\ldots,A_N). Any two adjace(...TRUNCATED) | [{"stdin":"4\n2 5 1 2\n","stdout":"2 3 4 5 4 3 2 1 2\n"},{"stdin":"6\n3 4 5 6 5 4\n","stdout":"3 4 5(...TRUNCATED) | |
abc301/abc301_c | "A single-player card game is popular in AtCoder Inc.\r\nEach card in the game has a lowercase Engli(...TRUNCATED) | [{"stdin":"ch@ku@ai\nchoku@@i\n","stdout":"Yes\n"},{"stdin":"ch@kud@i\nakidu@ho\n","stdout":"Yes\n"}(...TRUNCATED) |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 54