Recursive--Two-time lookup
#include <stdio.h>
int b[10]={1,1,2,3,3,5,6,6,7,9},a;
{
int o;
if (x>y) return 0;----------------------------------------------------------//To determine whether it is in the range
else {
o= (x+y)/2;
if (b[o]==a) return o;
if (A<b[o]) return Erfen (x,o-1);
else return Erfen (o+1,y);
}--------------------------------------------------------------------------//classification in the range
}
int main ()
{
int x=0,y=9;
scanf ("%d", &a);
printf ("%d", Erfen (x, y)),------------------------------------------------//Call function
return 0;
Secret: Flash-blind titanium alloy dog eye
Scroll: Local tyrants Gold
Today's training is over, the harvest is quite abundant, but —————————————— too tired!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thanks to all my little friends, keep on refueling tomorrow!!!!!!!
Ps:sorry get the prank software off the teammate's machine hahaha haha
Informatics Brocade (Training) Part 2 (under)