AReaL-boba-2
Collection
AReaL-boba-2
•
6 items
•
Updated
•
4
question
stringlengths 449
3.95k
| input_output
stringlengths 147
161M
| task
stringclasses 1
value | language
stringclasses 1
value |
---|---|---|---|
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
The first line contains a single integer $t$ ($1 \leq t \leq 6$) — the number of test cases.
The only line of each test case contains a single string consisting of each of the three characters $\texttt{a}$, $\texttt{b}$, and $\texttt{c}$ exactly once, representing the cards.
Output
For each test case, output "YES" if you can make the row $\texttt{abc}$ with at most one operation, or "NO" otherwise.
You can output the answer in any case (for example, the strings "yEs", "yes", "Yes" and "YES" will be recognized as a positive answer).Sample Input 1:
6
abc
acb
bac
bca
cab
cba
Sample Output 1:
YES
YES
YES
NO
NO
YES
Note
In the first test case, we don't need to do any operations, since the row is already $\texttt{abc}$.
In the second test case, we can swap $\texttt{c}$ and $\texttt{b}$: $\texttt{acb} \to \texttt{abc}$.
In the third test case, we can swap $\texttt{b}$ and $\texttt{a}$: $\texttt{bac} \to \texttt{abc}$.
In the fourth test case, it is impossible to make $\texttt{abc}$ using at most one operation. | {"inputs": ["6\nabc\nacb\nbac\nbca\ncab\ncba\n", "1\nabc\n", "3\nabc\nabc\nabc\n", "5\ncab\nacb\ncba\nbac\nbca\n", "6\nabc\nabc\nabc\nabc\nabc\nabc\n"], "outputs": ["YES\nYES\nYES\nNO\nNO\nYES\n", "YES\n", "YES\nYES\nYES\n", "NO\nYES\nYES\nYES\nNO\n", "YES\nYES\nYES\nYES\nYES\nYES\n"], "remote": false} | code | PYTHON |
"Slavic is preparing a present for a friend's birthday. He has an array $a$ of $n$ digits and the pr(...TRUNCATED) | "{\"inputs\": [\"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\", \"1\\n2\\(...TRUNCATED) | code | PYTHON |
"You are given a strip of paper $s$ that is $n$ cells long. Each cell is either black or white. In a(...TRUNCATED) | "{\"inputs\": [\"8\\n6 3\\nWBWWWB\\n7 3\\nWWBWBWW\\n5 4\\nBWBWB\\n5 5\\nBBBBB\\n8 2\\nBWBWBBBB\\n10 (...TRUNCATED) | code | PYTHON |
"You are given an array of integers $a_1, a_2, \\ldots, a_n$ and a number $k$ ($2 \\leq k \\leq 5$).(...TRUNCATED) | "{\"inputs\": [\"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 (...TRUNCATED) | code | PYTHON |
"Vanya and Vova are playing a game. Players are given an integer $n$. On their turn, the player can (...TRUNCATED) | "{\"inputs\": [\"6\\n1\\n3\\n5\\n100\\n999\\n1000\\n\", \"1\\n2\\n\", \"1\\n994\\n\", \"1\\n12\\n\",(...TRUNCATED) | code | PYTHON |
"Alex is participating in the filming of another video of BrMeast, and BrMeast asked Alex to prepare(...TRUNCATED) | "{\"inputs\": [\"5\\n2\\n1 2\\n6\\n10 2 3 6 1 3\\n4\\n1000000000 1000000000 1000000000 1000000000\\n(...TRUNCATED) | code | PYTHON |
"A subarray is a continuous part of array.\n\nYarik recently found an array $a$ of $n$ elements and (...TRUNCATED) | "{\"inputs\": [\"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\\n(...TRUNCATED) | code | PYTHON |
"Yarik is a big fan of many kinds of music. But Yarik loves not only listening to music but also wri(...TRUNCATED) | "{\"inputs\": [\"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 1(...TRUNCATED) | code | PYTHON |
"You are given a 0-indexed array of strings details. Each element of details provides information ab(...TRUNCATED) | "{\"inputs\": [\"[\\\"7868190130M7522\\\", \\\"5303914400F9211\\\", \\\"9273338290F4010\\\"]\", \"[\(...TRUNCATED) | code | PYTHON |
"You are given a 0-indexed 2D integer array nums. Initially, your score is 0. Perform the following (...TRUNCATED) | "{\"inputs\": [\"[[7, 2, 1], [6, 4, 2], [6, 5, 3], [3, 2, 1]]\", \"[[1]]\", \"[[0], [10], [25], [2],(...TRUNCATED) | code | PYTHON |
This dataset contains the training and testing data used for reinforcement learning in the AReaL-boba-2 model on coding tasks.
train/
: Contains the training data for RL fine-tuning.code_benchmark/
: Contains the evaluation benchmark, organized into multiple subfolders, each corresponding to a specific coding benchmark suite, Codeforces
, Code Contests
and LiveCodeBench (v5)
are supported now.To train and evaluate models using this dataset with AReaL:
code_benchmark/
to the evaluation/data/
directory in the AReaL repository.Please refer to the LICENSE file associated with this dataset or contact the maintainers for more details.