If I just did:
- Code: Select all
cin >> cases;
it returned Output Limit Exceeded, because it entered an infinite loop.
What I had to do is:
- Code: Select all
string s;
string aux;
getline(cin, aux);
int k = 0;
for (int i = 0; i < aux.size(); ++i) {
if (isdigit(aux[i])) {
k *= 10;
k += (aux[i] - '0');
}
}
while (k-->0) {
So probabbly the number of cases is written like this.
If there are 1578 cases, the input is:
1 57 8
I hope you fix it soon!
Thanks,
Enric S. Cusell

