Hello,
I got a MLE on the problem You Can Go Your Own Way with the following code:
```cpp
#include <cstring>
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int cases, N;
char buffer[50005], ans[50005];
int main(int argc, const char **argv) {
scanf("%d", &cases);
for(int case_i = 1; case_i <= cases; ++case_i) {
scanf("%d%s", &N, buffer);
int s = strlen(buffer);
for(int i = 0; i < s; ++i) {
if (buffer[i] == 'E') {
ans[i] = 'S';
} else {
ans[i] = 'E';
}
}
ans[s] = '\0';
printf("Case #%d: %s\n", case_i, ans);
}
return 0;
}
```
I tried to figure out what was the problem and I discover that when I declare
the variables like the following, I get a correct status:
```
char buffer[50005], ans[50005];
int cases, N;
```
So, my questions are:
* is it a normal behavior or did I miss something
* how can I check the over memory limit locally, I tested with /usr/bin/time
-v but nothing special was raised
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-code/b9b2a4a1-dc52-4f31-af7f-e3798c8354f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.