But OJ has been Wrong Answer
No function, please take a look at the code where there are problems
CodePudding user response:
Suggest the original poster posted the source codeCodePudding user response:
Source:# include
Int main ()
{
Int n, k, I, j, b;
Int a, [1000].
The scanf (" % d % d \ n ", & amp; N, & amp; K);
for(i=0; i
The scanf (" % d ", & amp; A [I]);
For (j=I + 1; J
If (a + [I] a [j]==k)
B=1;
The else
B=0;
}
}
If (b==1)
Printf (" yes \ n ");
The else
Printf (" \ n ");
return 0;
}
CodePudding user response:
Reference:# include
Int main (int arg c, char * argv [])
{
Int n, k, I, j, b=0;
Int a, [1000].
The scanf (" % d % d \ n ", & amp; N, & amp; K);
for(i=0; iThe scanf (" % d ", & amp; A [I]);
for(i=0; iFor (j=I + 1; J If (a + [I] a [j]==k) {
B=1;
break;
}
If (b) break;
}
If (b)
Printf (" yes \ n ");
The else
Printf (" \ n ");
return 0;
}