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.
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/.
Thank you