regions.cpp: In function 'int main()':
regions.cpp:66:25: error: 'K' was not declared in this scope
66 | for(int i = 1; i <= K; i++){
| ^
regions.cpp:82:25: error: 'K' was not declared in this scope
82 | for(int i = 1; i <= K; i++){
| ^
regions.cpp:101:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
101 | for(int j = 0; j < f.size(); j++){
| ~~^~~~~~~~~~
regions.cpp:108:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
108 | for(int j = 0; j < f.size(); j++){
| ~~^~~~~~~~~~
regions.cpp:122:25: error: 'K' was not declared in this scope
122 | for(int i = 1; i <= K; i++){
| ^
regions.cpp:123:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
123 | for(int j = 0; j < f.size(); j++){
| ~~^~~~~~~~~~
regions.cpp:124:23: error: expected ';' before '}' token
124 | ans1[i][j]
| ^
| ;
125 | }
| ~
regions.cpp:124:22: warning: statement has no effect [-Wunused-value]
124 | ans1[i][j]
| ~~~~~~~~~^
regions.cpp:129:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
129 | for(int j = 0; j < f.size(); j++){
| ~~^~~~~~~~~~
regions.cpp:147:22: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
147 | printf("%d\n",ans[in][h1]);
| ~^ ~~~~~~~~~~~
| | |
| int long long int
| %lld
regions.cpp:151:22: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
151 | printf("%d\n",ans[h][in]);
| ~^ ~~~~~~~~~~
| | |
| int long long int
| %lld
regions.cpp:159:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
159 | for(int i = 0; i < pov[h1].size() + pov[h].size() - 2; i++){
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regions.cpp:170:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
170 | for(int i = 0; i < prv[h1].size() + pov[h].size() - 2; i++){
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regions.cpp:181:22: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int (*)[25100]' [-Wformat=]
181 | printf("%d\n",ans);
| ~^ ~~~
| | |
| int long long int (*)[25100]
regions.cpp:59:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
59 | scanf(" %d",&N);
| ~~~~~^~~~~~~~~~
regions.cpp:60:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
60 | scanf(" %d",&R);
| ~~~~~^~~~~~~~~~
regions.cpp:61:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
61 | scanf(" %d",&Q);
| ~~~~~^~~~~~~~~~
regions.cpp:64:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
64 | scanf(" %d",&lst[1]);
| ~~~~~^~~~~~~~~~~~~~~
regions.cpp:71:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
71 | scanf(" %d",&parent[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~
regions.cpp:72:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
72 | scanf(" %d",&lst[i]);
| ~~~~~^~~~~~~~~~~~~~~
regions.cpp:139:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
139 | scanf(" %d",&h);
| ~~~~~^~~~~~~~~~
regions.cpp:140:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
140 | scanf(" %d",&h1);
| ~~~~~^~~~~~~~~~~