skyscraper.cpp: In function 'int main()':
skyscraper.cpp:52:14: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
52 | printf("%d\n", (dis[1] >= INT_MAX/2? -1ll : dis[1]));
| ~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| int long long int
| %lld
skyscraper.cpp:43:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
43 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
skyscraper.cpp:44:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
44 | scanf("%d", &m);
| ~~~~~^~~~~~~~~~
skyscraper.cpp:47:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
47 | scanf("%d", b + i);
| ~~~~~^~~~~~~~~~~~~
skyscraper.cpp:48:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
48 | scanf("%d", p + i);
| ~~~~~^~~~~~~~~~~~~