Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

memcpy's blog

By memcpy, 3 years ago, In English,

Hello CodeForces. I wrote this code for today's problem A and it got AC. I want to know how this got AC with big mistake in input:

    scanf("%lld", &n);
    cin >> s;

However, input should be only line contains string. Why scanf is ignored? This works locally on my computer you can check in your pc.

Thanks in advance.

Read more »

 
 
 
 
  • Vote: I like it
  • +34
  • Vote: I do not like it