#include #define Max 20 int v[Max][Max]; // Sousede vrcholu int deg[Max]; // Stupne vrcholu int ndeg[Max]; // Nove stupne vrcholu (po odebrani) int queue[Max]; // Odtrzeni=inkremenatace na nulu int pokryt[Max]; // 0=nepokryto,1=pokryto,2=SS int pokryj(int x) { //vlozi servisni stredisko a pokryje sousedy if (pokryt[x]==2) return 1; else pokryt[x]=2; for (int i=0;ifirst) { x=queue[first++]; ndeg[x]--; // dalsi list na utrzeni if (!pokryt[x]) for(i=0;i