#include using namespace std; typedef struct{ int x, y; }Punct; int N=200; Punct findCenter(Punct inf, Punct sup) { int val; if (sup.x-inf.x<=1){ cout<>val; return sup; } Punct mij; mij.x = (inf.x + sup.x)/2; mij.y = (inf.y + sup.y)/2; cout<>val; if(val>0) return findCenter(inf, mij); else return findCenter(mij, sup); } void cautare(Punct inf, Punct sup) { Punct mij; mij=findCenter(inf, sup); Punct linf, lsup, rinf, rsup; linf.x=mij.x; linf.y=inf.y; lsup.x=sup.x; lsup.y=mij.y; rinf.x=inf.x; rinf.y=mij.y; rsup.x=mij.x; rsup.y=inf.y; cautare(linf, lsup); cautare(rinf, rsup); } int main() { int X, Y; Punct a, b; a.x=0; a.y=0; b.x=N; b.y=N; cautare(a, b); return 0; }