Sędzia nie akceptuje mojego kodu do zadania Flamaster, nie potrafię znaleźć przypadku, gdzie program miałby się “wykrzaczyć”. Poniżej proszę link do ideone:
https://ideone.com/VtXLs2
#include <iostream>
using namespace std;
int x;
string word;
int main()
{
cin>>x;
for (int i=0; i<x; i++)
{
cin>>word;
int len=word.length();
{
int number=1;
for (int j=0; j<len; j++)
{
if (word[j]==word[j+1])
number++;
else
{
if (number<2)
{
cout<<word[j];
}
else if (number==2)
{
cout<<word[j-1]<<word[j];
}
else
{
cout<<word[j]<<number;
number=1;
}
}
}
cout<<endl;
}
}
return 0;
}