0

Whats wrong in the code ?

Recently I wrote code for the Sololearn code coach problem "New drivers license" in C++. And it fails in test case 2 and 5 where testcase 5 is hidden . My code generates correct answer in Cppdroid(A C and C++ compiler ) ,but gives wrong answer in Sololearn Compiler in testcase 2. Here is my code : https://code.sololearn.com/c6EoPpq1d4uJ/?ref=app Any insight will help a lot.

27th Dec 2020, 3:41 PM
Nayeem Islam Shanto...ą¦¶ą¦¾ą¦Øą§ą¦¤
Nayeem Islam Shanto...ą¦¶ą¦¾ą¦Øą§ą¦¤ - avatar
4 Answers
0
Line 21, instead of == 1 write >0
28th Dec 2020, 5:18 PM
george
george - avatar
+ 1
please write the challenge assignment
28th Dec 2020, 4:21 PM
george
george - avatar
0
You can see the challenge here: https://www.sololearn.com/coach/18?ref=app
28th Dec 2020, 4:27 PM
Nayeem Islam Shanto...ą¦¶ą¦¾ą¦Øą§ą¦¤
Nayeem Islam Shanto...ą¦¶ą¦¾ą¦Øą§ą¦¤ - avatar
0
But i want to say that your code is not c++, only cin amd cout is c++ the rest part is from c. You need to use vector, string std::sort and other real c++ classes
28th Dec 2020, 5:24 PM
george
george - avatar