pranav232323's blog

By pranav232323, history, 6 years ago, In English

Hey guys,

The following submission keeps getting TLE even though it has the same time complexity as the official solution ($$$\mathcal{O}(n)$$$)

Submission: https://codeforces.me/contest/1430/submission/104613827

Problem: https://codeforces.me/problemset/problem/1430/C

Any ideas about what's going on?

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

»
6 years ago, hide # |
 
Vote: I like it +11 Vote: I do not like it

Java's Scanner is extremely slow; use BufferedReader instead.