Main.cpp: In function 'void SetIO(std::string)':
Main.cpp:47:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
47 | freopen((str + ".in").c_str(), "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:48:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
48 | freopen((str + ".out").c_str(), "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:51:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
51 | freopen("input.txt", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:52:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
52 | freopen("output.txt", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp: In member function 'void Trie::init()':
Main.cpp:93:19: warning: iteration 200010 invokes undefined behavior [-Waggressive-loop-optimizations]
93 | qn[i] = 0;
| ~~~~~~^~~
Main.cpp:89:26: note: within this loop
89 | for(int i = 0; i < 30*N; i++){
| ~~^~~~~~
In member function 'void Trie::init()',
inlined from 'void solve(int)' at Main.cpp:137:15:
Main.cpp:91:25: warning: 'void* __builtin_memset(void*, int, long unsigned int)' writing 624031200 bytes into a region of size 43202168 overflows the destination [-Wstringop-overflow=]
91 | t[i][j] = -1;
| ~~~~~~~~^~~~
Main.cpp: In function 'void solve(int)':
Main.cpp:109:3: note: destination object 'tr' of size 43202168
109 | } tr[2];
| ^~
In member function 'void Trie::init()',
inlined from 'void solve(int)' at Main.cpp:137:15:
Main.cpp:93:19: warning: 'void* __builtin_memset(void*, int, long unsigned int)' writing 24001200 bytes into a region of size 22401128 overflows the destination [-Wstringop-overflow=]
93 | qn[i] = 0;
| ~~~~~~^~~
Main.cpp: In function 'void solve(int)':
Main.cpp:109:3: note: at offset 20801040 into destination object 'tr' of size 43202168
109 | } tr[2];
| ^~
In member function 'void Trie::init()',
inlined from 'void solve(int)' at Main.cpp:138:15:
Main.cpp:91:25: warning: 'void* __builtin_memset(void*, int, long unsigned int)' writing 624031200 bytes into a region of size 21601084 overflows the destination [-Wstringop-overflow=]
91 | t[i][j] = -1;
| ~~~~~~~~^~~~
Main.cpp: In function 'void solve(int)':
Main.cpp:109:3: note: at offset 21601084 into destination object 'tr' of size 43202168
109 | } tr[2];
| ^~
In member function 'void Trie::init()',
inlined from 'void solve(int)' at Main.cpp:138:15:
Main.cpp:93:19: warning: 'void* __builtin_memset(void*, int, long unsigned int)' writing 24001200 bytes into a region of size 800044 overflows the destination [-Wstringop-overflow=]
93 | qn[i] = 0;
| ~~~~~~^~~
Main.cpp: In function 'void solve(int)':
Main.cpp:109:3: note: at offset 42402124 into destination object 'tr' of size 43202168
109 | } tr[2];
| ^~