unbuggy_code_path string | unbuggy_code string | unbuggy_code_fail_test_cases string | unbuggy_code_pass_test_cases string | buggy_code_path string | buggy_code string | buggy_code_fail_test_cases string | buggy_code_pass_test_cases string |
|---|---|---|---|---|---|---|---|
/content/codeflaws/676-A-bug-18247191-18247237/676-A-18247237.c | #include<stdio.h>
#include<math.h>
int main(int argc, char *argv[])
{
int b,c,d,e,n,i,f,l,a[10000],count=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d",&a[i]);
if(a[i]==1)
f=i;
if(a[i]==n)
l=i;
}
if((f==1&&l==n)||(l==1&&f==... | Here are the failed test cases:
| Here are the pass test cases:
########## Test Case 1 ##########
**Input:**
100
41 67 94 18 14 83 59 12 19 54 13 68 75 26 15 65 80 40 23 30 34 78 47 21 63 79 4 70 3 31 86 69 92 10 61 74 97 100 9 99 32 27 91 55 85 52 16 17 28 1 64 29 58 76 98 25 84 7 2 96 20 72 36 46 49 82 93 44 45 6 38 87 57 50 53 35 60 33 8 89 39 4... | /content/codeflaws/676-A-bug-18247191-18247237/676-A-18247191.c | #include<stdio.h>
#include<math.h>
int main(int argc, char *argv[])
{
int b,c,d,e,n,i,f,l,a[10000],count=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d",&a[i]);
if(a[i]==1)
f=i;
if(a[i]==n)
l=i;
}
if((f==1&&l==n)||(l==1&&f==... | Here are the failed test cases:
########## Test Case 1 ##########
**Input:**
40
35 39 28 11 9 31 36 8 5 32 26 19 38 33 2 22 23 25 6 37 12 7 3 10 17 24 20 16 27 4 34 15 40 14 18 13 29 21 30 1
**Expected Output:**
39
**Is Expected Output Correct?** No
**If No, Correct Output:**
32
#################################... | Here are the pass test cases:
########## Test Case 1 ##########
**Input:**
100
41 67 94 18 14 83 59 12 19 54 13 68 75 26 15 65 80 40 23 30 34 78 47 21 63 79 4 70 3 31 86 69 92 10 61 74 97 100 9 99 32 27 91 55 85 52 16 17 28 1 64 29 58 76 98 25 84 7 2 96 20 72 36 46 49 82 93 44 45 6 38 87 57 50 53 35 60 33 8 89 39 4... |
/content/codeflaws/4-B-bug-14624010-14624023/4-B-14624023.c | #include<stdio.h>
int x[31],y[31],d[31];
int main(int argc, char *argv[])
{
int n,i,h,max=0,min=0;
scanf("%d%d",&n,&h);
for(i=1;i<=n;++i)
{
scanf("%d%d",x+i,y+i);
min+=x[i];
max+=y[i];
}
if(min>h || max<h)
{
printf("NO");
return 0;
}
else
{... | Here are the failed test cases:
| Here are the pass test cases:
########## Test Case 1 ##########
**Input:**
1 0
0 0
**Expected Output:**
YES
0
**Is Expected Output Correct?** Yes
**If Yes, Correct Output:**
YES
0
#####################################
########## Test Case 2 ##########
**Input:**
2 5
0 1
3 5
**Expected Output:**
YES
1 4
**I... | /content/codeflaws/4-B-bug-14624010-14624023/4-B-14624010.c | #include<stdio.h>
int x[31],y[31],d[31];
int main(int argc, char *argv[])
{
int n,i,h,max=0,min=0;
scanf("%d%d",&n,&h);
for(i=1;i<=n;++i)
{
scanf("%d%d",x+i,y+i);
min+=x[i];
max+=y[i];
}
if(min>h || max<h)
{
printf("NO");
return 0;
}
else
{... | Here are the failed test cases:
########## Test Case 1 ##########
**Input:**
1 0
0 0
**Expected Output:**
YES
0
**Is Expected Output Correct?** No
**If No, Correct Output:**
0
#####################################
########## Test Case 2 ##########
**Input:**
2 5
0 1
3 5
**Expected Output:**
YES
1 4
**Is Ex... | Here are the pass test cases:
########## Test Case 1 ##########
**Input:**
1 1
5 6
**Expected Output:**
NO
**Is Expected Output Correct?** Yes
**If Yes, Correct Output:**
NO
#####################################
########## Test Case 2 ##########
**Input:**
30 71
1 3
0 6
3 5
3 6
2 4
2 8
2 4
3 8
3 5
2 4
2 3
3 ... |
/content/codeflaws/500-C-bug-9336039-9336051/500-C-9336051.c | #include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#define MAX_N (500)
#define MAX_M (1000)
int ws[MAX_N+1];
int bs[MAX_M];
bool sn[MAX_N+1];
int simulate(int * xs, int n, int m) {
int i,j,acc,wt;
for ( i=wt=0; i < m; ++i ) {
for ( j=0,acc=0; xs[j] != bs[i]; acc+=ws[xs[j++]] );
wt += acc;
f... | Here are the failed test cases:
| Here are the pass test cases:
########## Test Case 1 ##########
**Input:**
2 1
1 2
1
**Expected Output:**
0
**Is Expected Output Correct?** Yes
**If Yes, Correct Output:**
0
#####################################
########## Test Case 2 ##########
**Input:**
3 3
10 20 30
1 2 3
**Expected Output:**
40
**Is Ex... | /content/codeflaws/500-C-bug-9336039-9336051/500-C-9336039.c | #include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#define MAX_N (500)
#define MAX_M (1000)
int ws[MAX_N+1];
int bs[MAX_M];
bool sn[MAX_N+1];
int simulate(int * xs, int n, int m) {
int i,j,acc,wt;
for ( i=wt=0; i < m; ++i ) {
for ( j=0,acc=0; xs[j] != bs[i]; ++j, acc+=ws[xs[j]] );
wt += acc;
... | Here are the failed test cases:
########## Test Case 1 ##########
**Input:**
3 3
10 20 30
1 2 3
**Expected Output:**
40
**Is Expected Output Correct?** No
**If No, Correct Output:**
60
#####################################
########## Test Case 2 ##########
**Input:**
2 7
20 30
1 1 1 2 2 2 2
**Expected Outpu... | Here are the pass test cases:
########## Test Case 1 ##########
**Input:**
2 1
1 2
1
**Expected Output:**
0
**Is Expected Output Correct?** Yes
**If Yes, Correct Output:**
0
#####################################
########## Test Case 2 ##########
**Input:**
3 5
1 2 3
1 3 2 3 1
**Expected Output:**
12
**Is E... |
/content/codeflaws/225-B-bug-2237428-2237695/225-B-2237695.c | #include<stdio.h>
#include<stdlib.h>
int main(int argc, char *argv[]){
int fib[45]={0},stock[45]={0};
int s,k,i,n,sum=0,num=0;
scanf("%d %d",&s,&k);
for(i=0;i==0||fib[i-1]<=s;i++){
if(i<=1) fib[i]=1;
else if(i<=k) fib[i]=sum;
else{
sum-=fib[i-k-1];
fib[i]=sum;
}
//printf("%d %d\... | Here are the failed test cases:
| Here are the pass test cases:
########## Test Case 1 ##########
**Input:**
856644446 14
**Expected Output:**
15
1 8 16 128 2048 8192 16383 32765 65528 262096 1048320 16771072 33541120 268304384 536592385
**Is Expected Output Correct?** Yes
**If Yes, Correct Output:**
15
1 8 16 128 2048 8192 16383 32765 65528 262... | /content/codeflaws/225-B-bug-2237428-2237695/225-B-2237428.c | #include<stdio.h>
#include<stdlib.h>
int main(int argc, char *argv[]){
int fib[45]={0},stock[45]={0};
int s,k,i,n,sum=0,num=0;
scanf("%d %d",&s,&k);
for(i=0;i==0||fib[i-1]<=s;i++){
if(i<=1) fib[i]=1;
else if(i<=k) fib[i]=sum;
else{
sum-=fib[i-k-1];
fib[i]=sum;
}
//printf("%d %d\... | Here are the failed test cases:
########## Test Case 1 ##########
**Input:**
8 2
**Expected Output:**
2
0 8
**Is Expected Output Correct?** No
**If No, Correct Output:**
2
3 5
#####################################
########## Test Case 2 ##########
**Input:**
1 1000
**Expected Output:**
2
0 1
**Is Expected ... | Here are the pass test cases:
########## Test Case 1 ##########
**Input:**
856644446 14
**Expected Output:**
15
1 8 16 128 2048 8192 16383 32765 65528 262096 1048320 16771072 33541120 268304384 536592385
**Is Expected Output Correct?** Yes
**If Yes, Correct Output:**
15
1 8 16 128 2048 8192 16383 32765 65528 262... |
/content/codeflaws/570-B-bug-16196476-16196625/570-B-16196625.c | "#include<stdio.h>\nint main(int argc, char *argv[])\n{\n\tlong int m,n,i;\n\tscanf(\"%ld %ld\",&n,&(...TRUNCATED) | Here are the failed test cases:
| "Here are the pass test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n2 2\n\n**Expect(...TRUNCATED) | /content/codeflaws/570-B-bug-16196476-16196625/570-B-16196476.c | "#include<stdio.h>\nint main(int argc, char *argv[])\n{\n\tlong int m,n,i;\n\tscanf(\"%ld %ld\",&n,&(...TRUNCATED) | "Here are the failed test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n262833325 131(...TRUNCATED) | "Here are the pass test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n2 2\n\n**Expect(...TRUNCATED) |
/content/codeflaws/370-A-bug-9567986-9568021/370-A-9568021.c | "#include <stdio.h>\n#include <math.h>\nint main(int argc, char *argv[])\n{\n int a,b,c,d,x,y,z;\(...TRUNCATED) | Here are the failed test cases:
| "Here are the pass test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n1 8 8 1\n\n**Ex(...TRUNCATED) | /content/codeflaws/370-A-bug-9567986-9568021/370-A-9567986.c | "#include <stdio.h>\n#include <math.h>\nint main(int argc, char *argv[])\n{\n int a,b,c,d,x,y,z;\(...TRUNCATED) | "Here are the failed test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n8 1 8 8\n\n**(...TRUNCATED) | "Here are the pass test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n1 8 8 1\n\n**Ex(...TRUNCATED) |
/content/codeflaws/405-C-bug-6132120-6132131/405-C-6132131.c | "#include <stdio.h>\n#define maxn 1005\nint mp[maxn][maxn];\nint main(int argc, char *argv[])\n{\n (...TRUNCATED) | Here are the failed test cases:
| "Here are the pass test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n3\n1 1 1\n0 1 1(...TRUNCATED) | /content/codeflaws/405-C-bug-6132120-6132131/405-C-6132120.c | "#include <stdio.h>\n#define maxn 1005\nint mp[maxn][maxn];\nint main(int argc, char *argv[])\n{\n (...TRUNCATED) | "Here are the failed test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n3\n1 1 1\n0 1(...TRUNCATED) | Here are the pass test cases:
|
/content/codeflaws/75-A-bug-14683488-14683500/75-A-14683500.c | "#include<stdio.h>\nint remove_zero(int n) {\n int prod=0;\n int times=1;\n while(n>0) {\n if((...TRUNCATED) | Here are the failed test cases:
| "Here are the pass test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n110036\n43\n\n*(...TRUNCATED) | /content/codeflaws/75-A-bug-14683488-14683500/75-A-14683488.c | "#include<stdio.h>\nint remove_zero(int n) {\n int prod=0;\n int times=1;\n while(n>0) {\n if((...TRUNCATED) | "Here are the failed test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n110036\n43\n\(...TRUNCATED) | "Here are the pass test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n968\n851\n\n**E(...TRUNCATED) |
/content/codeflaws/339-D-bug-6713715-6713721/339-D-6713721.c | "#include<stdio.h>\n#include<stdlib.h>\n#define ll long long int\nlong long int array[270000];\nlong(...TRUNCATED) | Here are the failed test cases:
| "Here are the pass test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n2 4\n1 6 3 5\n1(...TRUNCATED) | /content/codeflaws/339-D-bug-6713715-6713721/339-D-6713715.c | "#include<stdio.h>\n#include<stdlib.h>\n#define ll long long int\nlong long int array[270000];\nlong(...TRUNCATED) | "Here are the failed test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n2 4\n1 6 3 5\(...TRUNCATED) | Here are the pass test cases:
|
/content/codeflaws/612-C-bug-15186001-15186009/612-C-15186009.c | "#include <stdbool.h>\n#include <stdio.h>\n#include <string.h>\n\n/*bool constructNeed(char* s, int*(...TRUNCATED) | Here are the failed test cases:
| "Here are the pass test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n(([{>}{[{[)]]>>(...TRUNCATED) | /content/codeflaws/612-C-bug-15186001-15186009/612-C-15186001.c | "#include <stdbool.h>\n#include <stdio.h>\n#include <string.h>\n\n/*bool constructNeed(char* s, int*(...TRUNCATED) | "Here are the failed test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n]]\n\n**Expec(...TRUNCATED) | "Here are the pass test cases:\n\n\n########## Test Case 1 ##########\n**Input:**\n(([{>}{[{[)]]>>(...TRUNCATED) |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 8