foo.cc: In function 'int main()':
foo.cc:29:25: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'll* {aka long long int*}' [-Wformat=]
scanf("%d%d", &n, &m);
^
foo.cc:29:25: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'll* {aka long long int*}' [-Wformat=]
foo.cc:30:51: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'll* {aka long long int*}' [-Wformat=]
for(int i = 0; i < n; ++i) { scanf("%d", &r[i]); }
^
foo.cc:31:69: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'll* {aka long long int*}' [-Wformat=]
for(int i = 0; i < m; ++i) { scanf("%d%d%d", &d[i], &s[i], &t[i]); }
^
foo.cc:31:69: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'll* {aka long long int*}' [-Wformat=]
foo.cc:31:69: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'll* {aka long long int*}' [-Wformat=]
foo.cc:40:35: warning: format '%d' expects argument of type 'int', but argument 2 has type 'll {aka long long int}' [-Wformat=]
else { printf("-1\n%d\n", minn); }
^