printer.cpp: In function 'void add(std::string)':
printer.cpp:23:25: warning: array subscript has type 'char' [-Wchar-subscripts]
23 | if (!t[cur].nxt[e]) t[cur].nxt[e] = ++idx; t[cur].lv[e] = max(t[cur].lv[e], (int) s.size()); cur = t[cur].nxt[e];
| ^
printer.cpp:23:40: warning: array subscript has type 'char' [-Wchar-subscripts]
23 | if (!t[cur].nxt[e]) t[cur].nxt[e] = ++idx; t[cur].lv[e] = max(t[cur].lv[e], (int) s.size()); cur = t[cur].nxt[e];
| ^
printer.cpp:23:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
23 | if (!t[cur].nxt[e]) t[cur].nxt[e] = ++idx; t[cur].lv[e] = max(t[cur].lv[e], (int) s.size()); cur = t[cur].nxt[e];
| ^~
printer.cpp:23:52: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
23 | if (!t[cur].nxt[e]) t[cur].nxt[e] = ++idx; t[cur].lv[e] = max(t[cur].lv[e], (int) s.size()); cur = t[cur].nxt[e];
| ^
printer.cpp:23:62: warning: array subscript has type 'char' [-Wchar-subscripts]
23 | if (!t[cur].nxt[e]) t[cur].nxt[e] = ++idx; t[cur].lv[e] = max(t[cur].lv[e], (int) s.size()); cur = t[cur].nxt[e];
| ^
printer.cpp:23:81: warning: array subscript has type 'char' [-Wchar-subscripts]
23 | if (!t[cur].nxt[e]) t[cur].nxt[e] = ++idx; t[cur].lv[e] = max(t[cur].lv[e], (int) s.size()); cur = t[cur].nxt[e];
| ^
printer.cpp:23:119: warning: array subscript has type 'char' [-Wchar-subscripts]
23 | if (!t[cur].nxt[e]) t[cur].nxt[e] = ++idx; t[cur].lv[e] = max(t[cur].lv[e], (int) s.size()); cur = t[cur].nxt[e];
| ^
printer.cpp: In function 'int main()':
printer.cpp:41:14: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wformat=]
41 | printf("%d\n", ans.size());
| ~^ ~~~~~~~~~~
| | |
| int std::vector<char>::size_type {aka long unsigned int}
| %ld
printer.cpp:37:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
37 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~