Dataset Viewer
Auto-converted to Parquet Duplicate
data_source
stringclasses
2 values
prompt
listlengths
1
1
ability
stringclasses
1 value
reward_model
dict
extra_info
dict
question
stringlengths
1.06k
5.48k
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\n\nint main(void){\n\tint A, B, C, X ;\n\tfscanf(stdin, \"%d\\n%d\\n%d\\n%d\", &A, &B, &C, &X ) ;\n\n\tint ways = 0 ;\n\tint a, b, c ;\n...
code
{ "ground_truth": "```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%d\\n%d\\n%d\"\n.LC1:\n\t.string\t\"%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\tendbr...
{ "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%d\\n%d\\n%d\"\n.LC1:\n\t.string\t\"%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\t...
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code. C Code: ```c #include <stdio.h> int main(void){ int A, B, C, X ; fscanf(stdin, "%d\n%d\n%d\n%d", &A, &B, &C, &X ) ; int ways = 0 ; int a, b, c ; int max_a, max_b ; max_a = X / 500 ; if(...
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 n;\n scanf(\"%d\",&n);\n int i;\n int t=0,x=0,y=0;\n \n for(i=0;i<n;++i){\n int nt,nx,ny;\n scanf(\"%d%d%...
code
{ "ground_truth": "```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\"%d%d%d\"\n.LC2:\n\t.string\t\"No\"\n.LC3:\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\...
{ "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\"%d%d%d\"\n.LC2:\n\t.string\t\"No\"\n.LC3:\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:...
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code. C Code: ```c #include <stdio.h> int main(){ int n; scanf("%d",&n); int i; int t=0,x=0,y=0; for(i=0;i<n;++i){ int nt,nx,ny; scanf("%d%d%d",&nt,&nx,&ny); int dt = nt-t, dx ...
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#include <stdio.h>\n#include <string.h>\nchar s[10];\nint a,w,t,r;\nint main(){\n\tint n,i;\n\tscanf(\"%d\",&n);\n\twhile(n--){\n\t\tscanf(\"%s\",s);\n\t\t...
code
{ "ground_truth": "```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\"AC x %d\\n\"\n.LC3:\n\t.string\t\"WA x %d\\n\"\n.LC4:\n\t.string\t\"TLE x %d\\n\"\n.LC5:\n\t.string\t\"RE x %d\\n\"\n\t.section\t.text.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\"%d\"\n.LC1:\n\t.string\t\"%s\"\n.LC2:\n\t.string\t\"AC x %d\\n\"\n.LC3:\n\t.string\t\"WA x %d\\n\"\n.LC4:\n\t.string\t\"TLE x %d\\n\"\n.LC5:\n\t.string\t\"RE x %d\\n\"\n\t.section\t.text.startup...
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code. C Code: ```c #include <stdio.h> #include <string.h> char s[10]; int a,w,t,r; int main(){ int n,i; scanf("%d",&n); while(n--){ scanf("%s",s); if(s[0]=='A')a++;//统计首字母数量 else if(s[0]=='W')...
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 N,M;\n scanf(\"%d%d\",&N,&M);\n if(N%2==1){\n for(int i=1;i<=M;i++){\n printf(\"%d %d\\n\",i,N-i+1);\n }...
code
{ "ground_truth": "```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 %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\tp...
{ "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 %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...
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code. C Code: ```c #include<stdio.h> int main(){ int N,M; scanf("%d%d",&N,&M); if(N%2==1){ for(int i=1;i<=M;i++){ printf("%d %d\n",i,N-i+1); }; } else { int g,k; g=(M-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#include<stdio.h>\n#include<stdlib.h>\n#include<string.h>\n\nint main(void) {\n\tint W, a, b;\n\tchar buf[128], *ch;\n\n\tfgets(buf, sizeof(buf), stdin);\n\t...
code
{ "ground_truth": "```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\" \"\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.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t...
{ "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\" \"\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.LFB51:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r12\n...
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code. C Code: ```c #include<stdio.h> #include<stdlib.h> #include<string.h> int main(void) { int W, a, b; char buf[128], *ch; fgets(buf, sizeof(buf), stdin); ch = strtok(buf, " "); W = atoi(ch); ...
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 a,b;\n scanf(\"%d %d\", &a, &b);\n int c=a/b;\n if (a%b != 0){\n \tc++;\n }\n \n \tprintf (\"%d\\n\",c);\n...
code
{ "ground_truth": "```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\"\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\tsub...
{ "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\"\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...
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code. C Code: ```c #include <stdio.h> int main() { int a,b; scanf("%d %d", &a, &b); int c=a/b; if (a%b != 0){ c++; } printf ("%d\n",c); return 0; } ``` Unoptimized Assembly ...
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 2808: Password\n// 2017.10.11 bal4u@uu\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#define MAX 400004\n#define P4 531441\t\t// 27^4\n\nchar s[MAX+1...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 12, -16\n\tmovq\tstdin(%rip), %rdx\n\tleaq\ts(%rip), %r1...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.text.startup,\"ax\",@progbits\n\t.p2align 4\n\t.globl\tmain\n\t.type\tmain, @function\nmain:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 12, -16\n\tmovq\tstdin(%rip), %rdx\n\tleaq\ts(%rip), %r12\n\tm...
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code. C Code: ```c // AOJ 2808: Password // 2017.10.11 bal4u@uu #include <stdio.h> #include <stdlib.h> #define MAX 400004 #define P4 531441 // 27^4 char s[MAX+10]; char f[P4+10]; int main() { int...
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\ndouble Re(double a)\n{ return 1/a;}\n\nint main()\n{\n int n,i;\n double sum=0,*a;\n\n scanf(\"%d\",&n );\n a ...
code
{ "ground_truth": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tRe\n\t.type\tRe, @function\nRe:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovapd\t%xmm0, %xmm1\n\tmovsd\t.LC0(%rip), %xmm0\n\tdivsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n.LFE39:\n\t.size\tRe, .-Re\n\t.section\t.rodata.str1.1,\"aMS\",...
{ "answer": "```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.p2align 4\n\t.globl\tRe\n\t.type\tRe, @function\nRe:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovapd\t%xmm0, %xmm1\n\tmovsd\t.LC0(%rip), %xmm0\n\tdivsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n.LFE39:\n\t.size\tRe, .-Re\n\t.section\t.rodata.str1.1,\"aMS\",@progb...
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code. C Code: ```c #include <stdio.h> #include <stdlib.h> double Re(double a) { return 1/a;} int main() { int n,i; double sum=0,*a; scanf("%d",&n ); a = calloc(n,sizeof(double)); for(i=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 <string.h>\n#include <stdlib.h>\n#include <stdbool.h>\n#include <math.h>\n\nint main(void){\n\n int x, y;\n\n scanf(\"%d%d...
code
{ "ground_truth": "```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\"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.LFB51:\n\t.cfi_star...
{ "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\"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.LFB51:\n\t.cfi_startproc\...
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code. C Code: ```c #include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> int main(void){ int x, y; scanf("%d%d", &x, &y); if(x == 1 || x == 3 ...
train
[{"content":"Given the following C code and unoptimized assembly code, your task is to generate high(...TRUNCATED)
code
{"ground_truth":"```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@prog(...TRUNCATED)
{"answer":"```assembly\n\t.file\t\"temp.c\"\n\t.text\n\t.section\t.rodata.str1.1,\"aMS\",@progbits,1(...TRUNCATED)
"Given the following C code and unoptimized assembly code, your task is to generate highly optimized(...TRUNCATED)
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
10