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

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

The following problem: Your text to link here... requires DP + 2D BIT according to comment section but I have never used 2D BIT anywhere except for learning its basic concept. Can someone explain how to solve this problem using this concept? Thanks in advance.

Полный текст и комментарии »

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

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

I have written an article on how to implement lower_bound() function of C++ in Java by creating our own method and also using java inbuilt functions. Feel free to comment if you have any query.

Link: https://medium.com/@ssrivastava990/alternative-implementation-of-lower-bound-in-java-23ec40a825ec

Полный текст и комментарии »

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

Автор __goku__, 4 года назад, По-английски

Lets share the best meme related to programming we have!

Ps: I know its a bit old but still relatable.

Полный текст и комментарии »

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

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

My program is running in O(n) time (I hope so) but it is showing TLE in java. Can anyone please tell me what am I doing wrong here. I have used fast input with both BufferedWriter and PrintWriter but it is still showing tle. I know there is no problem with my logic because the same logic is accepted in C++. So can someone please tell me what is wrong with my java code.

Solution: Java: 82284306 CPP: 82285437

Problem: 1324D - Pair of Topics

Edit 2: The code worked after I replaced array with ArrayList. Can anyone explain to me why did this happen? Thanks in advance.

Полный текст и комментарии »

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

Автор __goku__, история, 5 лет назад, По-английски

Many coders who like coding in Java for competitive coding have faced a “TLE” even though their logic and complexity are well within the bounds. The problem in those cases lies in our way of I/O. Using Scanner and System.out.println() in a code is quite convenient but often make our program slow. I am sharing my article in which I have shared my template. I urge fellow coders to check this out and please do notify me if anything can be improved. Thank You!

Полный текст и комментарии »

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