📌 Problem Faced

While solving a Codeforces problem (Anton and Danik), I got Memory Limit Exceeded (MLE).

Code snippet:

int n, A=0, D=0;
char win[n];   // ❌ Problem here
scanf("%d", &n);

❗ What Went Wrong

I declared:

char win[n];

before assigning a value to n.

At that moment:

If that random number is large:


🧠 Core Concept Learned

🔹 In C, variables are NOT initialized automatically.

When you write: