Hazemshehaway's blog

By Hazemshehaway, history, 2 years ago, In English

I know why it is time limit error, but why both two codes failed in two different test cases I only changed cin/cout to printf/scanf ؟؟؟

code 1 code2

  • Vote: I like it
  • -3
  • Vote: I do not like it

| Write comment?
»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

You can check this link to understand the difference also add these two lines to your template if you want to use cin/cout as they make them run faster

ios::sync_with_stdio(0); cin.tie(0),cout.tie(0);