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
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 151 |
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
Name |
---|
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.