[quote]and (i<m)[/quote]
![]()
The code you posted is uncompilable (Please format your code in future!
), so I’ll use this solution:
[simon@simon-laptop][19:42:51]
[~/devel/hackerrank/otherpeoples]>./compile-latest-cpp.sh
Compiling pradyumnt-FAIRELCT.cpp
+ g++ -std=c++14 pradyumnt-FAIRELCT.cpp -O3 -g3 -Wall -Wextra -Wconversion -DONLINE_JUDGE -D_GLIBCXX_DEBUG -fsanitize=undefined -ftrapv -fno-sanitize-recover
+ set +x
Successful
[simon@simon-laptop][19:42:58]
[~/devel/hackerrank/otherpeoples]>echo "1
1 3
1
1000 1000 1000
" | ./a.out
pradyumnt-FAIRELCT.cpp:40:24: runtime error: index 2 out of bounds for type 'long long int [*]'