Need Help With Error

Revision en3, by Qualified, 2020-05-14 23:54:52

I am doing 1066A - Vova and Train and I am using Gvim. Here is my source code below.

Code

It always says 'terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc shell returned 3

Need help! Thanks in advance! Don't know why the font is weird for my code.

Looks like it works when I run it through the sample test cases. Submission says Memory Limit Exceeded.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Qualified 2020-05-14 23:54:52 107
en2 English Qualified 2020-05-14 23:02:17 48 Tiny change: 'n advance!\n' -> 'n advance! Don't know why the font is weird for my code.\n' (published)
en1 English Qualified 2020-05-14 23:00:37 794 Initial revision (saved to drafts)