reply came, they are telling problems in the sample test cases
Then how others are able to get AC for this problem.
so are they trying to fix this mess?
yesâŚbut still submissions not working
let them fix it first, i will have a look again in half and hour
when are they fixing the last question, or it wonât be solved ??
no idea, i guess they might post it on announcement on contest page
some submissions are accepted, i wonder how they got selected, is it anything that we are doing wrong
took less than 10 min to do first 4 questions and then 5th one is set so horribly its impossible to get ac or what
Have you got any way to reach the solution?
But this kind of contests are not rated
oh yeah.
Deleted my comment as u pointed this out.
Can anyone point out the mistake in my code for the problem Chef and Strings
My Code
#include <bits/stdc++.h>
#define int long long
#define ld long double
#define endl '\n'
using namespace std;
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int tc ;
cin >> tc ;
cin.ignore() ;
while(tc--){
string s; getline(cin,s) ;
reverse(s.begin(),s.end());
for(int i = 0 ; i < s.size() ; i++){
s[i] = tolower(s[i]) ;
}
cout << s << endl ;
}
return 0;
}
Same ,i also used cin.ignore to ignore the new line but my solution was outputting the right answer.but WA
#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
void sol(){
string str;
getline(cin,str);
reverse(str.begin(), str.end());
transform(str.begin(), str.end(), str.begin(), ::tolower);
cout<<str <<endl;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);cout.tie(NULL);
ll t;
cin>>t;
cin.ignore();
while(t--)
{
sol();
}
return 0;
}
though my ws used code is working but not cin.ignore .
help anyone
I also used the cin.ignore with exact same logic, still got WA
Yes⌠I tried upper case and lower case and both rejected. I submitted in C and noticed that no solutions in C got approved. Most of the approved ones were in C++ (and the solutions were very similar to mine in C). Do you have any idea of why is that?
I posted this post regarding that. Please help me figure that out if you guys have any clue of what can be wrong.
Look at this solution in C++. Pretty similar to my solution in C (that matched the sample output - I tried changing to lower case and not changing), but for some reason got rejected. I still canât figure out what went wrong with my solution.
This approved code does almost the same I did in C. I donât get why I did not get approved. Should be some crazy test case.
Even I got the wrong answer in that question, Iâve seen a few ACs which were almost similar to that of mine, maybe itâs an error from their side, thatâs why I left that question and you should too