/in/foo.cc: In function 'void dfs(int, ULL)':
/in/foo.cc:9:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(d==n+1){
~^~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:23:19: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'ULL* {aka long long unsigned int*}' [-Wformat=]
scanf("%d",&rd);
^
/in/foo.cc:26:22: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'ULL* {aka long long unsigned int*}' [-Wformat=]
scanf("%d",&n);
^
/in/foo.cc:27:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=1; i<=n; i++) scanf("%llu",&num[i]);
~^~~