printer.cpp: In function 'bool compare(std::string, std::string)':
printer.cpp:8:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
8 | #define rep(i,a,b) for(int i=a; i<b; i++)
......
25 | rep(j,0, a.size()){
| ~~~~~~~~~~~~~
printer.cpp:25:5: note: in expansion of macro 'rep'
25 | rep(j,0, a.size()){
| ^~~
printer.cpp:8:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
8 | #define rep(i,a,b) for(int i=a; i<b; i++)
......
29 | rep(j,0, b.size()){
| ~~~~~~~~~~~~~
printer.cpp:29:5: note: in expansion of macro 'rep'
29 | rep(j,0, b.size()){
| ^~~
printer.cpp: In function 'int main()':
printer.cpp:57:26: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
57 | if(arr[worst].size()<len){
| ~~~~~~~~~~~~~~~~~^~~~
printer.cpp:66:40: error: no matching function for call to 'min(std::__cxx11::basic_string<char>::size_type, int&)'
66 | rep(j,0, min(arr[i-1].size(), len)){
| ^
printer.cpp:8:35: note: in definition of macro 'rep'
8 | #define rep(i,a,b) for(int i=a; i<b; i++)
| ^
In file included from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from printer.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:198:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
198 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:198:5: note: template argument deduction/substitution failed:
printer.cpp:66:40: note: deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'int')
66 | rep(j,0, min(arr[i-1].size(), len)){
| ^
printer.cpp:8:35: note: in definition of macro 'rep'
8 | #define rep(i,a,b) for(int i=a; i<b; i++)
| ^
In file included from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from printer.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:246:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
246 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:246:5: note: template argument deduction/substitution failed:
printer.cpp:66:40: note: deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'int')
66 | rep(j,0, min(arr[i-1].size(), len)){
| ^
printer.cpp:8:35: note: in definition of macro 'rep'
8 | #define rep(i,a,b) for(int i=a; i<b; i++)
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from printer.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:3444:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)'
3444 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/9/bits/stl_algo.h:3444:5: note: template argument deduction/substitution failed:
printer.cpp:66:40: note: mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
66 | rep(j,0, min(arr[i-1].size(), len)){
| ^
printer.cpp:8:35: note: in definition of macro 'rep'
8 | #define rep(i,a,b) for(int i=a; i<b; i++)
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from printer.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:3450:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)'
3450 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/9/bits/stl_algo.h:3450:5: note: template argument deduction/substitution failed:
printer.cpp:66:40: note: mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
66 | rep(j,0, min(arr[i-1].size(), len)){
| ^
printer.cpp:8:35: note: in definition of macro 'rep'
8 | #define rep(i,a,b) for(int i=a; i<b; i++)
| ^
printer.cpp:87:39: error: no matching function for call to 'min(std::__cxx11::basic_string<char>::size_type, int&)'
87 | rep(j,0, min(arr[i-1].size(),len)){
| ^
printer.cpp:8:35: note: in definition of macro 'rep'
8 | #define rep(i,a,b) for(int i=a; i<b; i++)
| ^
In file included from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from printer.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:198:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
198 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:198:5: note: template argument deduction/substitution failed:
printer.cpp:87:39: note: deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'int')
87 | rep(j,0, min(arr[i-1].size(),len)){
| ^
printer.cpp:8:35: note: in definition of macro 'rep'
8 | #define rep(i,a,b) for(int i=a; i<b; i++)
| ^
In file included from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from printer.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:246:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
246 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:246:5: note: template argument deduction/substitution failed:
printer.cpp:87:39: note: deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'int')
87 | rep(j,0, min(arr[i-1].size(),len)){
| ^
printer.cpp:8:35: note: in definition of macro 'rep'
8 | #define rep(i,a,b) for(int i=a; i<b; i++)
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from printer.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:3444:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)'
3444 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/9/bits/stl_algo.h:3444:5: note: template argument deduction/substitution failed:
printer.cpp:87:39: note: mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
87 | rep(j,0, min(arr[i-1].size(),len)){
| ^
printer.cpp:8:35: note: in definition of macro 'rep'
8 | #define rep(i,a,b) for(int i=a; i<b; i++)
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from printer.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:3450:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)'
3450 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/9/bits/stl_algo.h:3450:5: note: template argument deduction/substitution failed:
printer.cpp:87:39: note: mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
87 | rep(j,0, min(arr[i-1].size(),len)){
| ^
printer.cpp:8:35: note: in definition of macro 'rep'
8 | #define rep(i,a,b) for(int i=a; i<b; i++)
| ^
printer.cpp:8:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
8 | #define rep(i,a,b) for(int i=a; i<b; i++)
......
91 | rep(j,0, arr[i-1].size()-same) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~
printer.cpp:91:7: note: in expansion of macro 'rep'
91 | rep(j,0, arr[i-1].size()-same) {
| ^~~
printer.cpp: In function 'void setIO(std::string, int)':
printer.cpp:13:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
13 | freopen((name + ".in").c_str(), "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printer.cpp:14:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
14 | freopen((name + ".out").c_str(), "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~