/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){
~^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:25: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:28: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:29:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=1; i<=n; i++) scanf("%d",&num[i]);
~^~~