Facing this error always ,could any one please help ? pls tell me why?
<a href=“https://www.codechef.com/submit/LAPIN” alt="problem LAPINDROME USER =Saitejakanumuri>share code
4 Likes
Please either format your code or (better!) link to your submission
The link which you have given is not working
1 Like
He solved it, I guess.
https://www.codechef.com/viewsolution/51387313
https://www.codechef.com/viewsolution/51388096
2 Likes
Yes, the only change he has done appears to be
long int i,n,j,t; to int i,n,j,t;
#this seems to be the problem
and
printf("true"); to printf("YES\n");
Yet another case where compiler warnings give you a huge hint:
[simon@simon-laptop][07:26:10]
[~/tmp/DONTSYNC/hackerrank/otherpeoples]>./compile-latest-cpp.sh
Compiling saitejakanumur-LAPIN.cpp
+ g++ -std=c++17 saitejakanumur-LAPIN.cpp -O3 -g3 -Wall -Wextra -Wconversion -DONLINE_JUDGE -D_GLIBCXX_DEBUG -fsanitize=undefined -ftrapv
saitejakanumur-LAPIN.cpp: In function ‘int main()’:
saitejakanumur-LAPIN.cpp:6:18: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long int*’ [-Wformat=]
scanf("%d",&t);
1 Like
sorry, solved the problem
1 Like
thanks for your concern