Dataset Viewer
Auto-converted to Parquet Duplicate
task_nl
stringclasses
5 values
difficulty
int64
7
13
turns
listlengths
1
7
success
bool
1 class
A string is called square if it is some string written twice in a row. For example, the strings "aa", "abcabc", "abab" and "baabaa" are square. But the strings "aaa", "abaaab" and "abcdabc" are not square. For a given string s determine if it is square. Input The first line of input data contains an integer t (1 ≀ t...
7
[ { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": "cat <<'EOF' > /tmp/solution.py\nt = int(input())\nfor i in range(t):\n s = input()\n if s[:len(s)//2] == s[len(s)//2:]:\n print('YES')\n else:\n print('NO')\nEOF\npython3 /tmp/solution.py", "output":...
true
The robot is located on a checkered rectangular board of size n Γ— m (n rows, m columns). The rows in the board are numbered from 1 to n from top to bottom, and the columns β€” from 1 to m from left to right. The robot is able to move from the current cell to one of the four cells adjacent by side. The sequence of comma...
11
[ { "cmd": "cat <<'EOF' > /tmp/solution.py\ndef main():\n T = int(input())\n for _ in range(T):\n n, m = map(int, input().split())\n s = input()\n max_steps = 0\n best_start = 0\n for i in range(n*m):\n x, y = divmod(i, m)\n steps = 0\n for...
true
Mr. Chanek has an array a of n integers. The prettiness value of a is denoted as: $$$βˆ‘_{i=1}^{n} {βˆ‘_{j=1}^{n} {\gcd(a_i, a_j) β‹… \gcd(i, j)}}$$$ where \gcd(x, y) denotes the greatest common divisor (GCD) of integers x and y. In other words, the prettiness value of an array a is the total sum of \gcd(a_i, a_j) β‹… \gcd(...
13
[ { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": "cat <<'EOF' > /tmp/solution.py\nimport sys\n\nMOD = 10**9+7\n\ndef gcd(a, b):\n while(b):\n a, b = b, a % b\n return a\n\nn = int(input())\na = list(map(int,input().split()))\n\nans = 0\nfor i in range(n):\n fo...
true
A string is called square if it is some string written twice in a row. For example, the strings "aa", "abcabc", "abab" and "baabaa" are square. But the strings "aaa", "abaaab" and "abcdabc" are not square. For a given string s determine if it is square. Input The first line of input data contains an integer t (1 ≀ t...
7
[ { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd":...
true
Monocarp is the coach of the Berland State University programming teams. He decided to compose a problemset for a training session for his teams. Monocarp has n problems that none of his students have seen yet. The i-th problem has a topic a_i (an integer from 1 to n) and a difficulty b_i (an integer from 1 to n). All...
10
[ { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": "command detected. Output your command inside <bash>...", "output": "ba...
true
Mr. Chanek has an array a of n integers. The prettiness value of a is denoted as: $$$βˆ‘_{i=1}^{n} {βˆ‘_{j=1}^{n} {\gcd(a_i, a_j) β‹… \gcd(i, j)}}$$$ where \gcd(x, y) denotes the greatest common divisor (GCD) of integers x and y. In other words, the prettiness value of an array a is the total sum of \gcd(a_i, a_j) β‹… \gcd(...
13
[ { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd":...
true
A string is called square if it is some string written twice in a row. For example, the strings "aa", "abcabc", "abab" and "baabaa" are square. But the strings "aaa", "abaaab" and "abcdabc" are not square. For a given string s determine if it is square. Input The first line of input data contains an integer t (1 ≀ t...
7
[ { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": "command detected. Output your command inside <bash>...", "output": "bash: line 1: bash: No such file or directory\nHarness: /tmp/solution.py belum ada. Tulis file solusi dulu (heredoc).", "match": false }, { "c...
true
You are given an array a of length n. Let's define the eversion operation. Let x = a_n. Then array a is partitioned into two parts: left and right. The left part contains the elements of a that are not greater than x (≀ x). The right part contains the elements of a that are strictly greater than x (> x). The order of ...
8
[ { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": "cat <<'EOF' > /tmp/solution.py\ndef main():\n for _ in range(int(input())):\n n = int(input())\n a = list(map(int, input().split()))\...
true
Mr. Chanek has an array a of n integers. The prettiness value of a is denoted as: $$$βˆ‘_{i=1}^{n} {βˆ‘_{j=1}^{n} {\gcd(a_i, a_j) β‹… \gcd(i, j)}}$$$ where \gcd(x, y) denotes the greatest common divisor (GCD) of integers x and y. In other words, the prettiness value of an array a is the total sum of \gcd(a_i, a_j) β‹… \gcd(...
13
[ { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": null, "output": "no <bash> tag", "match": false }, { "cmd": "cat <<'EOF' > /tmp/solution.py\nimport math\nMOD = int(1e9 + 7)\n\ndef gcd...
true
README.md exists but content is empty.
Downloads last month
45