foo.cc: In function 'void init(std::vector<int>&)':
foo.cc:10:24: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
10 | for (char i; i = cin.get();) {
| ~~^~~~~~~~~~~
foo.cc: In function 'void print1(std::vector<int>&)':
foo.cc:20:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
20 | for (int i = 0; i < n.size(); i++) {
| ~~^~~~~~~~~~
foo.cc: In function 'void getnum(const std::vector<int>&, std::vector<int>&, int)':
foo.cc:35:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
35 | if (k > num.size()) {
| ~~^~~~~~~~~~~~
foo.cc:36:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
36 | for (int i = 0; i < k - num.size(); i++)
| ~~^~~~~~~~~~~~~~~~
foo.cc: In function 'bool chengfa(std::vector<int>&, std::vector<int>&, std::vector<int>&, int)':
foo.cc:72:35: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
72 | if (result.size() >= k) break;
| ~~~~~~~~~~~~~~^~~~
foo.cc: In function 'void getnum1(const std::vector<int>&, std::vector<int>&, int)':
foo.cc:96:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
96 | if (k > num.size()) {
| ~~^~~~~~~~~~~~
foo.cc:99:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
99 | for (int i = 0; i < k - num.size(); i++)
| ~~^~~~~~~~~~~~~~~~
foo.cc: In function 'int getresult(std::vector<int>&, int)':
foo.cc:181:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
181 | for (int j = 0; j < circle.size(); j++)
| ~~^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务