Can anyone tell why this code gives expected(correct) output in other online compilers but not in that of codeforces(when submitted)..??(I'm New to codeforces, idk properly abt it)
Difference between en1 and en2, changed 592 character(s)
//Round#751_A↵

#include <bits/stdc++.h>↵
#include<algorithm>↵
#define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)↵
using namespace std;↵
int main() {↵
int T;cin>>T;↵
while(T--)↵
{↵
     fastio();↵
     string s,store,store1;↵
     cin>>s;↵
     int count=s.length();↵
     store=s;↵
     sort(s.begin(), s.end());↵
     store1=s[0];↵
     cout<<s[0];↵
     auto it = std::find(store.begin(), store.end(), s[0]);↵
     if (it != store.end())↵
     store.erase(it);↵
     cout<<" "<<store<<endl;↵
}↵
return 0;↵
}↵

/*INPUT : ↵

3↵
fc↵
aaaa↵
thebrightboiler↵

*/↵
[submission:133001319]

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English ConquerCode 2021-10-26 12:56:52 592
en1 English ConquerCode 2021-10-26 12:53:02 778 Initial revision (published)