Compiler output
prog.cpp: In function 'long long int f(int, char, 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:72:3: note: in expansion of macro 'FORN'
FORN(i, used.SZ)
^
prog.cpp:79: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:110:3: note: in expansion of macro 'FORN'
FORN(i, s.SZ) ++count[s[i]];
^
prog.cpp:153: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:161:97: warning: 'oddChar' may be used uninitialized in this function [-Wmaybe-uninitialized]
else sum = (sum + f((s.SZ - 3) / 2, oddChar, halfString.erase(halfString.find(oddChar), 1))) % BASE;
^