Compiler output
prog.cpp: In function 'long long int f(int, char, std::string, std::string)':
prog.cpp:38:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
#define FORN(i, n) for(int i = 0; i < (n); ++i)
^
prog.cpp:79:3: note: in expansion of macro 'FORN'
FORN(i, used.SZ)
^
prog.cpp:86:31: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (a[j][0] == lastChar && a[j][2] == prevChar ||
^
prog.cpp: In function 'int main()':
prog.cpp:38:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
#define FORN(i, n) for(int i = 0; i < (n); ++i)
^
prog.cpp:117:3: note: in expansion of macro 'FORN'
FORN(i, s.SZ) ++count[s[i]];
^
prog.cpp:160:38: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (a[j][0] == halfString[0] && a[j][2] == halfString[1] || a[j][0] == halfString[1] && a[j][2] == halfString[0])
^
prog.cpp:168:101: warning: 'oddChar' may be used uninitialized in this function [-Wmaybe-uninitialized]
else sum = (sum + f((s.SZ - 1) / 2, oddChar, halfString.erase(halfString.find(oddChar), 1), "")) % BASE;
^