monochrome.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main()
| ^~~~
monochrome.cpp: In function 'int main()':
monochrome.cpp:9:13: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[400010]' [-Wformat=]
9 | scanf("%s", &S);
| ~^ ~~
| | |
| | char (*)[400010]
| char*
monochrome.cpp:22:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
22 | for(j=0;j<V.size();j++)for(k=j+1;k<V.size();k++)
| ~^~~~~~~~~
monochrome.cpp:22:43: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
22 | for(j=0;j<V.size();j++)for(k=j+1;k<V.size();k++)
| ~^~~~~~~~~
monochrome.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
8 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
monochrome.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
9 | scanf("%s", &S);
| ~~~~~^~~~~~~~~~