| 
 | 
вернуться в форумWA test#7 Послано  Rudo 31 май 2022 02:24 Have no idea what's wrong I used simple plan with massive of relations and recursive function that checks all ancesters (only up moving) and all descendants (only down moving). There is some part of code in C++:   int checkforblood(int index, int** mas, int* checkmas, int range, int direct) {     if (checkmas[index - 1] == 1) return 0;     checkmas[index-1] = 1;     for (int i = 0; i < range; i++) {         if (( mas[i][0] == index )&&(direct > -1)) {             checkforblood(mas[i][1], mas, checkmas, range, 1);         }         if (( mas[i][1] == index ) && (direct < 1)) {             checkforblood(mas[i][0], mas, checkmas, range, -1);         }     }     return 0; }   I can't see the problem, so if you can't too i will know, that problem in output method.   Edited by author 31.05.2022 02:26  |  
  | 
|