weird Run time error!!

Правка en1, от checkMate09, 2016-08-21 22:15:42

i was coding solution for the problem C. The Smallest String Concatenation . the solution depends mainly on overriding the cmp() function. first version caused RTE

bool cmp(const string &a, const string &b){

    return a+b <= b+a;
}

second version Accepted without = sign.

bool cmp(const string &a, const string &b){

    return a+b < b+a;
}

why the = sign caused RTE ?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский checkMate09 2016-08-21 22:25:53 77
en1 Английский checkMate09 2016-08-21 22:15:42 496 Initial revision (published)