Dataset Viewer
Auto-converted to Parquet Duplicate
data_source
stringclasses
1 value
prompt
listlengths
1
1
ability
stringclasses
1 value
reward_model
dict
extra_info
dict
idx
int64
0
383
train
[ { "content": "Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\na,b,i;main(s){scanf(\"%d%d\",&a,&b);for(i=a;i<=b;++i){if(i<0)++s;else if(i==0)break;}a=!puts((i<=b)?\"Zero\":((s&1)?\"Positive\":\"Negative\"));}\n```\n\nUnop...
code
{ "ground_truth": "\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"Negative\"\n.LC1:\n\t.string\t\"Zero\"\n.LC2:\n\t.string\t\"Positive\"\n.LC3:\n\t.string\t\"%d%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nm...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"Negative\"\n.LC1:\n\t.string\t\"Zero\"\n.LC2:\n\t.string\t\"Positive\"\n.LC3:\n\t.string\t\"%d%d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @func...
0
train
[ { "content": "Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<stdlib.h>\n\nvoid run(void){\n char *s=(char *)malloc(sizeof(char)*(100000+1));\n scanf(\"%s\",s);\n int p=0;\n int cnt=0;\n ...
code
{ "ground_truth": "\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.text\n\t.p2align 4\n\t.globl\trun\n\t.type\trun, @function\nrun:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 3, -...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%s\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.text\n\t.p2align 4\n\t.globl\trun\n\t.type\trun, @function\nrun:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 16\n\t.cfi_offs...
1
train
[ { "content": "Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n// AOJ 2525: Change\n// 2017.10.6 bal4u@uu\n\n#include <stdio.h>\n\nint main()\n{\n\tint rd, rr;\n long long m, cd, cr, s, t;\n \n\tscanf(\"%lld%d%d%lld%ll...
code
{ "ground_truth": "\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld%d%d%lld%lld\"\n.LC1:\n\t.string\t\"-1\"\n.LC2:\n\t.string\t\"%lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_s...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld%d%d%lld%lld\"\n.LC1:\n\t.string\t\"-1\"\n.LC2:\n\t.string\t\"%lld\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\...
2
train
[ { "content": "Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n#include<math.h>\nint main()\n{\n\tint x,a,b,c,d;\n\tscanf(\"%d %d %d\",&x,&a,&b);\n\tc=abs(x-a);\n\td=abs(x-b);\n\tif(c<d)\n\t{\n\t\tprint...
code
{ "ground_truth": "\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$40, %rsp\n\t.cfi_def_cfa_offset 48\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$40, %rsp\n\t.cfi_def_cfa_off...
3
train
[ { "content": "Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\nint main(void)\n{\n\tint a,b,c,d;\n\tscanf(\"%d %d %d %d\",&a,&b,&c,&d);\n\tif(a==b&&c==d){\n\t\tprintf(\"yes\\n\");\n\t\t}\n\telse if(a==c...
code
{ "ground_truth": "\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d\"\n.LC1:\n\t.string\t\"yes\"\n.LC2:\n\t.string\t\"no\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d %d\"\n.LC1:\n\t.string\t\"yes\"\n.LC2:\n\t.string\t\"no\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_sta...
4
train
[ { "content": "Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\n\nint main()\n{\n int price, figure;\n int total_price = 0, total_figure = 0, figure_count = 0;\n\n while(scanf(\"%d,%d\", &price, &fig...
code
{ "ground_truth": "\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d,%d\"\n.LC1:\n\t.string\t\"%d\\n%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r15...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d,%d\"\n.LC1:\n\t.string\t\"%d\\n%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tpush...
5
train
[ { "content": "Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(){\n int A, B;\n\n scanf(\"%d %d\", &A, &B);\n\n if((A*B)%2 == 0){\n printf(\"No\");\n }else{\n printf...
code
{ "ground_truth": "\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"No\"\n.LC2:\n\t.string\t\"Yes\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tend...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d\"\n.LC1:\n\t.string\t\"No\"\n.LC2:\n\t.string\t\"Yes\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc...
6
train
[ { "content": "Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include<stdio.h>\n\nint main(){\n\tlong long n;\n\tscanf(\"%lld\",&n);\n\tint M=1,m=0;\n\tfor(long long i=2;i*i<=n;i++)if(n%i==0){\n\t\tint cnt=0;\n\t\twhile...
code
{ "ground_truth": "\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld\"\n.LC1:\n\t.string\t\"%d %d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rs...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%lld\"\n.LC1:\n\t.string\t\"%d %d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$...
7
train
[ { "content": "Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n/*\n\tsubmission # - User: herp_sy\n\thttps://atcoder.jp/contests/\n\n\tcoding: utf-8\n\tlang: C (GCC 5.4.1)\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#...
code
{ "ground_truth": "\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\" %s\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB53:\n\t.cfi_startproc\n\tend...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\" %s\"\n.LC2:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB53:\n\t.cfi_startproc...
8
train
[ { "content": "Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(void){\n // Your code here!\n int N,X,T;\n int i,times;\n \n scanf(\"%d %d %d\",&N,&X,&T);\n \n for(i=0;;i++...
code
{ "ground_truth": "\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$40, %r...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d %d %d\"\n.LC1:\n\t.string\t\"%d\\n\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t...
9
train
[ { "content": "Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#define gc() getchar()\nint in()\n{\n\tint n = 0, c = gc();\n\tdo n = 10 * n + (c & 0xf), c = gc(); while (c >= '0');\n\treturn n;\n}\n\nint a[12];\n\nint mai...
code
{ "ground_truth": "\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tin\n\t.type\tin, @function\nin:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 3, -16\n\txorl\t%eax, %eax\n\txorl\t%ebx, %ebx\n\tcall\tgetchar@PLT\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tandl\t$15, ...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tin\n\t.type\tin, @function\nin:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 3, -16\n\txorl\t%eax, %eax\n\txorl\t%ebx, %ebx\n\tcall\tgetchar@PLT\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tandl...
10
train
[ { "content": "Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n// AOJ 2874 Pigeonhole principle\n// 2018.3.29 bal4u\n\n#include <stdio.h>\n#include <stdlib.h>\n\nint a[1002];\n\nint cmp(int *a, int *b) { return *a - *b; }...
code
{ "ground_truth": "\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcmp\n\t.type\tcmp, @function\ncmp:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE39:\n\t.size\tcmp, .-cmp\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tcmp\n\t.type\tcmp, @function\ncmp:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n.LFE39:\n\t.size\tcmp, .-cmp\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\...
11
train
[ { "content": "Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.\nC Code:\n\n```c\n#include <stdio.h>\nint main(void){\n // Your code here!\n int n,i;\n scanf(\"%d\",&n);\n int a[n],big=0,sum=0;\n for(i=0;i<n;i++){\n sc...
code
{ "ground_truth": "\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"No\"\n.LC2:\n\t.string\t\"Yes\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\tendbr6...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1\n.LC0:\n\t.string\t\"%d\"\n.LC1:\n\t.string\t\"No\"\n.LC2:\n\t.string\t\"Yes\"\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB23:\n\t.cfi_startproc\n\...
12
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
5