kthpath.cpp: In function 'int main()':
kthpath.cpp:17:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
17 | cin >> a[i] + 1;
| ~~~~~^~~
kthpath.cpp:12:13: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
12 | freopen ("kthpath.in", "r", stdin);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
kthpath.cpp:13:13: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
13 | freopen ("kthpath.out", "w", stdout);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~