Hello,

I try to figure out why I get a MLE on the problem "You Can Go Your Own Way".
Here is my 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;
}
```

After some research, when I switch the declaration lines to the following, I 
don't get the MLE:

```cpp
char buffer[50005], ans[50005];
int cases, N;
```

So my questions are: 
 * Is it a normal behavior or did I miss something?
 * Can I reproduce locally the over memory limit locally? I test with 
/usr/bin/time -v but nothing special appeared.

-- 
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/d538085c-a60a-4b7b-85fb-b5dfd3d17f79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to