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

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

i tried to solve a problem.i remember this problem was discussed by my teacher.he use bruteforce but why tle.c++ so stupidly slow lmao

https://codeforces.net/contest/96/problem/B

https://pastebin.com/Wb7sLbwi

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

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

use python its faster ;)

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

First of all, C++ is really fast, your solution is the reason why you are failing.

Second, why calculate all the numbers from 4 to 1e9? The question only ask if n is a lucky number, so just check for n only. You complicated things, calculate the solution for all numbers, thus getting TLE.

Lastly, why are you ranting here instead of asking nicely for help? Learn some basic common sense.

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

    asking nicely wont help.see my first blog.people will just downvote genuine newbie problem and upvote trash blog from high elo coders.i feel bad for them sometimes

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

      Your first blog still has a legit comment helping you out. All other blogs are either you just ranting about C++ and DP, or asking questions and expecting others to help you out. Even when you ask a question and when others answer you, you just ignore them or ask back "how is it so simple? are u a grandmaster?". I don't see a reason why you shouldn't be downvoted. Your latest blogs are all rants about binary search (which is really relevant in higher problems, for example see problem 1548B, and other blogs are about your opinions about GMs and C++. Please learn some common sense before posting like that, and if you don't then expect even more downvotes.