Dataset Viewer
Auto-converted to Parquet Duplicate
example_id
int64
prompt
list
completion
list
task
string
reward
float64
generation_ms
float64
scoring_ms
float64
total_ms
float64
info
dict
has_error
float64
passed
float64
num_test_cases
float64
pass_rate
float64
0
[ { "content": "Solve the programming task below in a Python markdown code block.\n\nThere 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: \n\n \n- 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.\n\nInput\n\nThe first line contains a single integer $t$ ($1 \\leq t \\leq 6$) — the number of test cases.\n\nThe 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.\n\nOutput\n\nFor each test case, output \"YES\" if you can make the row $\\texttt{abc}$ with at most one operation, or \"NO\" otherwise.\n\nYou 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:\n6\n\nabc\n\nacb\n\nbac\n\nbca\n\ncab\n\ncba\n\n\n\nSample Output 1:\n\nYES\nYES\nYES\nNO\nNO\nYES\n\n\nNote\n\nIn the first test case, we don't need to do any operations, since the row is already $\\texttt{abc}$.\n\nIn the second test case, we can swap $\\texttt{c}$ and $\\texttt{b}$: $\\texttt{acb} \\to \\texttt{abc}$.\n\nIn the third test case, we can swap $\\texttt{b}$ and $\\texttt{a}$: $\\texttt{bac} \\to \\texttt{abc}$.\n\nIn the fourth test case, it is impossible to make $\\texttt{abc}$ using at most one operation.\n\nRead the inputs from stdin solve the problem and write the answer to stdout (do not directly test on the sample inputs). Enclose your code within ```python delimiters.", "role": "user" } ]
[ { "content": "```python\nt = int(input())\ntarget = \"abc\"\n\nfor _ in range(t):\n s = input().strip()\n # If already \"abc\"\n if s == target:\n print(\"YES\")\n continue\n \n # Try swapping every pair once and check if it becomes \"abc\"\n can = False\n s_list = list(s)\n for i in range(3):\n for j in range(i+1, 3):\n s_list[i], s_list[j] = s_list[j], s_list[i]\n if \"\".join(s_list) == target:\n can = True\n s_list[i], s_list[j] = s_list[j], s_list[i]\n \n print(\"YES\" if can else \"NO\")\n```", "role": "assistant" } ]
deepcoder
1
20,039.159775
0.317574
20,039.477348
{ "num_test_cases": 5, "source": "lcbv5", "subset": "i3-code", "subset_idx": 0, "verification_info": { "fn_name": null, "test_case_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\"" ], "test_case_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\"" ], "timeout": 10 } }
0
1
5
1
README.md exists but content is empty.
Downloads last month
13