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
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
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
Название |
---|
use python its faster ;)
yesss
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.
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
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.