how to think for possible wrong case.its rlly hard for me to check my idea if its correct or no.ive never seen a tutorial on how to defy ur own logic
# | 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 | 150 |
how to think for possible wrong case.its rlly hard for me to check my idea if its correct or no.ive never seen a tutorial on how to defy ur own logic
as usual i have trouble in debugging https://pastebin.com/W4bAsCg5 https://mirror.codeforces.com/contest/474/problem/A
all this time i am actually trying to remember as many tricks as possible instead of trying to get it first.its like the case where a kid cant do multiplication because they dont know what it is.
an example of a trick i learned is getting total sum of input.for example we have an array
a[5]={1,2,3,4,5}
at first i do not know how to get the sum of the numbers of the array.eventually i searched about it on the internet.i found out that its possible by making an additional variable like int sum=0.(i found this out when i was a total newbie)
my problem is that wnever i attend a contest,i feel like the problem is very new and thus making me stuck.the problem seems very strange to me and i couldnt find a common trick to tackle the problem.and i always think my training became a waste since everytime i encounter a problem,its brand new.its no tlike a common topic like taking sum or maybe some formula.
i really need your perspective to overcome my problem
yesterday there was a div2 contest,i was pretty confident since ive trained alot.so i decided to join.
after 5 minutes,i am able to solve A with paper.i have the informal proof.and i decided to code it out.turns out it fails the second pretest.i was testing for another random tc to see whether my approach is correct.turns out my approach is correct yet im unable to solve it until the contest ends.
after the contest,i saw the editorial.the editorial is slightly different than my approach but ive done the math and it was the same.now im suspecting that c++ is actually broken.why i say? because it cant handle decimals correctly.
i think most people has a potential but theyre unable to achieve it because of broken languages like c++.maybe someone can recommend me another language thats as fast as c++ and can handle numbers correctly?
https://mirror.codeforces.com/contest/810/problem/B see this problem and see my code https://pastebin.com/U3p3vCwD
my approach: i make pair,find maximum v[i].first and then check if second is >0 then multiply it.
if u dont understand my code just try to analyze my code.i think its pretty straightforward.
im still unable to do this https://mirror.codeforces.com/problemset/problem/1146/B
someone said i need to explain my solution https://pastebin.com/f4eze85S
what i want to do:
stripg all 'a'
and then check the new string if first half is the same as second half like bcbc its the same
if yes then erase occurence in input string like abc and the occurence is bc then it should print a.
u guys said i need to train,so i train.but i cant do this.thus,help me out.
Its been 7 months since ive started learning c++ and doing cp and ive seen no progress at all.its not lack of practice.ive been solving so many problems on my main everyday.
the reason i asked about this problem is that today i encounter a problem that requires heavy implementation.at first glance,i thought,"okay,this will be a good form of practice".after several minutes thinking,i am still unable to do the problem.it took me 5 minutes or less to came up with an idea but hours or even days to think the syntax that im going to use.sometimes,there is some technique i dont know therefore i see others code and analyze.
after i analyze the code,i understand the trick.after that i do another problem.and then i cant think of the implementation again.this process continues in 7 months.i dont know if ive improved or not but u can say that im stuck on 900 rating which is absolutely terrible.
the reason i made this blog is to warn newbies that seems to stuck at a rating.i need to tell u that most advices like solving problem or doing virtual or ladders etc,will not make u improve.its useless.this is based on my observation and my own experience.
the reason i say this is because ur training is not relevant for other problems.so if u feel down or sad,get up,close your computer,and do something else that is actually useful instead of doing trash stuff.
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
everytime i try to do cp problem.i feel like my ideas is always wrong,even though they are right.for example,when i try to do dp,i always think that this is impossible to do without trying every possibility.but its not always dp,its about all problem that requres HUMAN DECISION MAKING.perhaps someone can help me with this problem as i am really curious how to tackle my problem.
why most gm just tells us to google everything.what if we dont understand the explanation.google other stuff? thats gonna waste our time.thats why newbie stuck on making prefix sum while pros improve.everyone should get help by gm.i have a friend.he is a newbie but better than gm.he explains everything well.so i think newbie>gm
this is going to be a quick tutorial on binary search.
binary search is basically searching a number in O(logn).idk why someone make an algorithm just for searching a number lmao. for easy problems u can use lower_bound and upper_bound or just use binary search function so ez.harder problems require u to make some modifications on binary search so be sure to save the code in ur template so u can beat those cocky gm that tells u to google everything in solving speed.
binary search is kinda useless in higher leagues since nowadays its all about mathforces.
the best for me is prefix sum because it looks good and the worst is dp because it is such a nonsense
everytime i have contest,problem a is always about observation.i hate observation.we need to make all algo contest so we know who is a good programmer and who is just good at math but cant do binary search.
is there a template for every algo? like knapsack or binary search or some graph theory? i really need one to help me solve problems
whenever i attend a contest,i like to see the standings.i always ask myself,how can i solve that fast?.i always see people explaining their ideas.but i rarely see people explain why he/she chose that idea in that contest instead of others.i think whenever u solve problems,u ask ur self what to do in this kind of problem.what is the first question to ask to urself when solving problems?
i want to try to learn dp but before going into problems i want to see some theories so that i dont feel really clueless when solving problems.i hate reading books so videos will be a better option.i found a good dp course at mit ocw but is it worth it?
can someone help me with this problem https://mirror.codeforces.com/contest/218/problem/A my solution is this https://pastebin.com/r0ppiqGh idk what is wrong with it because ive been debugging for 45 mins
in 734 c i tried to implement my ideas into code but failed because c++ is too dumb and giving me numbers like nhentai code.idk whats wrong with c++ so i decided to rage and submit my complaint to c++.idk why c++ wont obey me whenever i think of a solution i mean if u dont want to obey me then do it urself c++
i have a friend that went to pupil in like 5 contest and im here with 12 contest in my main and still newbie.why can he be better? i have solved 500 problems and he has also solved 500 problems
on yesterday's contest,i cant do anything because of buggy code.i should be able to do problem c if i dont write unecessary if elses that makes my code too long and hard.can anyone help me with this problem? writing unecessary if elses and unecessary ideas is not only when contest but also at practice
https://mirror.codeforces.com/problemset/problem/709/A i do not know the solution for this problem can someone help me?
Hi cf communities,i have a question.last week i started to do dynamic programming and i managed to solve easy problem like frog 1 and 2 in atcoder.i think its pretty easy and intuitive.but when i come to knapsack,it was hard.i dont know the dp transition.so i decided to see editorials.after seeing the transition, i still cant solve it this time its about implementation.so i decided to see others solution and just copy paste his/her code and try to analyze each line.i was confused on how can people come up with ideas in contest and also able to implement them(especially dp,dp ideas and implementations are complete nonsenses to me).do i need to improve my math since i have a teacher that join IMO but doesnt train for cp yet he is good at dp?
Name |
---|