Dataset Viewer
example_id
int64 0
4
| prompt
listlengths 1
1
| completion
listlengths 1
1
| task
stringclasses 1
value | reward
float64 1
1
| generation_ms
float64 28.1k
90.2k
| scoring_ms
float64 0.17
1.52
| total_ms
float64 28.1k
90.2k
| info
dict | has_error
float64 0
0
| passed
float64 1
1
| num_test_cases
float64 5
13
| pass_rate
float64 1
1
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
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\nimport sys\n\ndef can_make_abc(s: str) -> bool:\n target = \"abc\"\n diff = sum(1 for i in range(3) if s[i] != target[i])\n return diff in (0, 2)\n\ndef solve():\n data = sys.stdin.read().strip().split()\n if not data:\n return\n t = int(data[0])\n res = []\n for i in range(1, t + 1):\n s = data[i].strip()\n res.append(\"YES\" if can_make_abc(s) else \"NO\")\n print(\"\\n\".join(res))\n\nif __name__ == \"__main__\":\n solve()\n```",
"role": "assistant"
}
] |
deepcoder
| 1
| 30,414.436817
| 0.174284
| 30,414.611101
|
{
"fn_name": "",
"source": "lcbv5",
"subset": "i3-code",
"subset_idx": 0,
"tests": {
"fn_name": null,
"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\""
]
}
}
| 0
| 1
| 5
| 1
|
1
| [{"content":"Solve the programming task below in a Python markdown code block.\n\nSlavic is preparin(...TRUNCATED)
| [{"content":"```python\nimport sys\n\ndef main():\n data = list(map(int, sys.stdin.buffer.read().(...TRUNCATED)
|
deepcoder
| 1
| 31,203.841925
| 0.189304
| 31,204.031229
| {"fn_name":"","source":"lcbv5","subset":"i3-code","subset_idx":1,"tests":{"fn_name":null,"inputs":["(...TRUNCATED)
| 0
| 1
| 13
| 1
|
2
| [{"content":"Solve the programming task below in a Python markdown code block.\n\nYou are given a st(...TRUNCATED)
| [{"content":"```python\nimport sys\n\ndef solve():\n data = sys.stdin.buffer.read().split()\n (...TRUNCATED)
|
deepcoder
| 1
| 51,501.776457
| 0.217438
| 51,501.993895
| {"fn_name":"","source":"lcbv5","subset":"i3-code","subset_idx":2,"tests":{"fn_name":null,"inputs":["(...TRUNCATED)
| 0
| 1
| 13
| 1
|
3
| [{"content":"Solve the programming task below in a Python markdown code block.\n\nYou are given an a(...TRUNCATED)
| [{"content":"```python\nimport sys\n\ndef main():\n data = list(map(int, sys.stdin.buffer.read().(...TRUNCATED)
|
deepcoder
| 1
| 90,193.026066
| 0.212908
| 90,193.238974
| {"fn_name":"","source":"lcbv5","subset":"i3-code","subset_idx":3,"tests":{"fn_name":null,"inputs":["(...TRUNCATED)
| 0
| 1
| 13
| 1
|
4
| [{"content":"Solve the programming task below in a Python markdown code block.\n\nVanya and Vova are(...TRUNCATED)
| [{"content":"```python\nimport sys\nfrom functools import lru_cache\n\ndef main():\n data = list((...TRUNCATED)
|
deepcoder
| 1
| 48,751.470566
| 0.216484
| 48,751.68705
| {"fn_name":"","source":"lcbv5","subset":"i3-code","subset_idx":4,"tests":{"fn_name":null,"inputs":["(...TRUNCATED)
| 0
| 1
| 13
| 1
|
0
| [{"content":"Solve the programming task below in a Python markdown code block.\n\nThere are three ca(...TRUNCATED)
| [{"content":"```python\nimport sys\n\ndef main():\n data = sys.stdin.read().split()\n if not d(...TRUNCATED)
|
deepcoder
| 1
| 28,055.389166
| 0.268221
| 28,055.657387
| {"fn_name":"","source":"lcbv5","subset":"i3-code","subset_idx":0,"tests":{"fn_name":null,"inputs":["(...TRUNCATED)
| 0
| 1
| 5
| 1
|
1
| [{"content":"Solve the programming task below in a Python markdown code block.\n\nSlavic is preparin(...TRUNCATED)
| [{"content":"```python\nimport sys\n\ndef main():\n data = list(map(int, sys.stdin.buffer.read().(...TRUNCATED)
|
deepcoder
| 1
| 30,246.80829
| 0.206709
| 30,247.014999
| {"fn_name":"","source":"lcbv5","subset":"i3-code","subset_idx":1,"tests":{"fn_name":null,"inputs":["(...TRUNCATED)
| 0
| 1
| 13
| 1
|
2
| [{"content":"Solve the programming task below in a Python markdown code block.\n\nYou are given a st(...TRUNCATED)
| [{"content":"```python\nimport sys\n\ndef min_operations(n, k, s):\n # Collect positions of black(...TRUNCATED)
|
deepcoder
| 1
| 35,402.818918
| 1.518011
| 35,404.336929
| {"fn_name":"","source":"lcbv5","subset":"i3-code","subset_idx":2,"tests":{"fn_name":null,"inputs":["(...TRUNCATED)
| 0
| 1
| 13
| 1
|
3
| [{"content":"Solve the programming task below in a Python markdown code block.\n\nYou are given an a(...TRUNCATED)
| [{"content":"```python\nimport sys\n\ndef vp(x: int, p: int) -> int:\n cnt = 0\n while x % p =(...TRUNCATED)
|
deepcoder
| 1
| 86,894.086838
| 0.208616
| 86,894.295454
| {"fn_name":"","source":"lcbv5","subset":"i3-code","subset_idx":3,"tests":{"fn_name":null,"inputs":["(...TRUNCATED)
| 0
| 1
| 13
| 1
|
4
| [{"content":"Solve the programming task below in a Python markdown code block.\n\nVanya and Vova are(...TRUNCATED)
| [{"content":"```python\nimport sys\n\ndef main():\n data = sys.stdin.read().strip().split()\n (...TRUNCATED)
|
deepcoder
| 1
| 45,539.776325
| 0.217915
| 45,539.99424
| {"fn_name":"","source":"lcbv5","subset":"i3-code","subset_idx":4,"tests":{"fn_name":null,"inputs":["(...TRUNCATED)
| 0
| 1
| 13
| 1
|
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 8