Блог пользователя Cash_carti_bitch

Автор Cash_carti_bitch, история, 3 года назад, По-английски

Hello CF community, I am solving 339D - Xenia and Bit Operations and I get Time Limit on Test 7, Here is the submission 125178552. I have written the same solution in c++ and it is quick and got accepted, but I am new to Java 11 and I don't know why I get a time limit, please help me.

  • Проголосовать: нравится
  • -3
  • Проголосовать: не нравится

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Dude, this has been answered so many times. You're using the Java Scanner Class, which is notoriously slow. If you want a good reading class, check out https://medium.com/@ssrivastava990/a-java-template-for-competitive-coding-b810fbda77c9, otherwise check out https://www.geeksforgeeks.org/fast-io-in-java-in-competitive-programming/.