safety.cpp:3: warning: ignoring '#pragma warning ' [-Wunknown-pragmas]
3 | #pragma warning (disable:4996)
|
safety.cpp: In function 'long long int func(int, int, std::vector<int>)':
safety.cpp:22:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
22 | for (int j = 0; j < ri.size(); j++) {
| ~~^~~~~~~~~~~
safety.cpp:25:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
25 | for (int j = 0; j < le.size(); j++) {
| ~~^~~~~~~~~~~
safety.cpp:43:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
43 | for (int j = 2; j < ri.size();j++) nri.push_back(ri[j]);
| ~~^~~~~~~~~~~
safety.cpp:49:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
49 | for (int j = 2; j < le.size(); j++) nle.push_back(le[j]);
| ~~^~~~~~~~~~~
safety.cpp:80:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
80 | for (int j : dp) printf("%d ", j); printf("\n");
| ^~~
safety.cpp:80:38: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
80 | for (int j : dp) printf("%d ", j); printf("\n");
| ^~~~~~
safety.cpp: In function 'int main()':
safety.cpp:95:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
95 | scanf("%d%d", &N, &H);
| ~~~~~^~~~~~~~~~~~~~~~
safety.cpp:97:35: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
97 | for (int i = 0; i < N; i++) scanf("%d", &S[i]);
| ~~~~~^~~~~~~~~~~~~