nrg_aceu's blog

By nrg_aceu, history, 40 hours ago, In English

the previous blog got downvoted,so ima just make a copy

I've practiced for dp and i have found my weakness.its the dp state.somehow i never guessed it correctly.the states that i made was never relevant to the actual answer.its totally wrong.i have no clue whenever i try to make some dp states and just see if somethings correct.idk how poeple just solve dp like its 1+1.i do not know what do memoize.can someone help me?

Read more »

 
 
 
 
  • Vote: I like it
  • -27
  • Vote: I do not like it

By nrg_aceu, history, 3 days ago, In English

I've practiced for dp and i have found my weakness.its the dp state.somehow i never guessed it correctly.the states that i made was never relevant to the actual answer.its totally wrong.i have no clue whenever i try to make some dp states and just see if somethings correct.idk how poeple just solve dp like its 1+1.i do not know what do memoize.can someone help me?

Read more »

 
 
 
 
  • Vote: I like it
  • -23
  • Vote: I do not like it

By nrg_aceu, history, 4 weeks ago, In English

https://atcoder.jp/contests/abc220/editorial/2703

on the recent atcoder round,i find problem D not very intuitive.can someone explain the editorial even more?

Read more »

 
 
 
 
  • Vote: I like it
  • +23
  • Vote: I do not like it

By nrg_aceu, history, 5 weeks ago, In English

i read cp algorithm and understand bfs theory.when it comes to implementation i cant. see this code https://pastebin.com/5RtDSMMW this is literally copying yet its still wrong idk whats wrong.pls help

Read more »

 
 
 
 
  • Vote: I like it
  • +1
  • Vote: I do not like it

By nrg_aceu, history, 5 weeks ago, In English

today's contest was chaotic.my solution was in queue for so long.while waiting,i wondered,why is it called in queue not in stack or maybe in deque.does anyone know the reason?

Read more »

 
 
 
 
  • Vote: I like it
  • -18
  • Vote: I do not like it

By nrg_aceu, history, 5 weeks ago, In English

most people will ask how to do dp.now im asking,what to dp?

ive seen so many dp tutorials.most of them are really good.i understand dp because of them.but there is still 1 more flaw.what to dp?.i usually ask this question to myself when im practicing for dp and stuck for 30 mins because idk where to start.i dont see anything dp-able from a dp problem but i know its a dp problem.some dp problems are obvious like knapsack but others like in contest r not rlly straightforward.i will end up seeing the editorial without even trying not because i dont want to try,but because im unable to.i really want to improve.ive put the effort to try but cant.maybe u guys can help.

Read more »

 
 
 
 
  • Vote: I like it
  • +14
  • Vote: I do not like it

By nrg_aceu, history, 5 weeks ago, In English

https://codeforces.com/contest/201/problem/A

the editorial is too long and i dont understand.also its a dp problem.can somebody help? thanks!

Read more »

 
 
 
 
  • Vote: I like it
  • -5
  • Vote: I do not like it

By nrg_aceu, history, 6 weeks ago, In English

most of the time,when im learning new algo,i always struggle to implement them in problems.i remember studying binary search.it took me 20 mins to understand the concept and 7 months to actually able to solve 1 problem using it.and now im learning bfs and dfs and other graph theory.i understand bfs concepts but when applied to real problems,i cant.i ended up copying others because in the problem i encounter,the nodes are coordinates,instead of numbers like node 1,2 etc.took me 3 days to try to solve before giving up.

does anyone know how to overcome this?

Read more »

 
 
 
 
  • Vote: I like it
  • -30
  • Vote: I do not like it

By nrg_aceu, history, 7 weeks ago, In English

i think its best to share practice results daily so that people will know cp makes me want to kill myself and reaching pupil is so hard.

practice=bfs and dfs and basic graphs verdict=fail

i understood the point of bfs and dfs.but when it is applied to real problems,it will drive me nuts.from lunch to dinner i still unable to solve basic graoh taht only requires bfs with modification.so cringe ngl.

Read more »

 
 
 
 
  • Vote: I like it
  • -36
  • Vote: I do not like it

By nrg_aceu, history, 7 weeks ago, In English

im trying to learn bfs and there are so many implementation.i dont know the general bfs implementation.can someone give?

Read more »

 
 
 
 
  • Vote: I like it
  • -32
  • Vote: I do not like it

By nrg_aceu, history, 7 weeks ago, In English

imagine ur trying to solve problem C.the first time u see the problem statement ur like damn this is interesting.and 30 mins later u ahve no clue how to solve even though u have thought hardly about the problem as if youre solving world hunger and peace. then u see the editorial and it says.

just split it into 2 numbers and ur basically done.

happens to noone except me i guess

Read more »

 
 
 
 
  • Vote: I like it
  • +41
  • Vote: I do not like it

By nrg_aceu, history, 7 weeks ago, In English

finally! poggers

Read more »

 
 
 
 
  • Vote: I like it
  • -3
  • Vote: I do not like it

By nrg_aceu, history, 7 weeks ago, In English

after thinking for 2 hours i cant solve this problem https://codeforces.com/edu/course/2/lesson/9/1/practice/contest/307092/problem/C can someone help me?

Read more »

 
 
 
 
  • Vote: I like it
  • -3
  • Vote: I do not like it

By nrg_aceu, history, 2 months ago, In English

im trying to solve problems above my level and like in the previous blog,i cant do a single problem.the streak continues.0% rate of solved problem without editorial and other kind of help.is this normal? ive seen others went from a level to another flawlessly

Read more »

 
 
 
 
  • Vote: I like it
  • -18
  • Vote: I do not like it

By nrg_aceu, history, 2 months ago, In English

i have found my real problem in cp.not dp not implementation but more like psychological effect.i dont really know if a blog similar to this exist but im just going to make one anyway.

it all started on my first ccontest on other judge.where i felt confident enough to solve 3 problems.without any knowledge on any algorithm.at this time i just learnt how to take sum of multiple numbers.

long story short,the contest started.i immediately do problem A.it was pretty easy.now i come to problem b.it looks pretty easy so i immediately tried.at first i cant implement it.so i did a quick google search.i found one solution but it didnt fit time limit.it was linear search.after long time,i decided to give up and see the editorial.i found out that it needed n log n binary search or two pointers.i felt really sad.failed to solve 3 problems like what i expected.

then i joined codeforces.after reading some binary search and done a few problems i joined another contest.i thought the previous one was just a bad day for me.but turns out i was still unable to do problem c.it was really hard like it looks easy if u do it on paper but for coding part,rlly hard ngl.

this cycle continues until now and idk what to do.even on practice i feel scared of trying 1300+ like i know that my solution will fail and eventually waste my time.while in contrary if u dont try u wont be able to do it.

Read more »

 
 
 
 
  • Vote: I like it
  • -27
  • Vote: I do not like it

By nrg_aceu, history, 2 months ago, In English

This will most likely be my last blog about dp since i have given up on cp communities.noone is helping me nor even caring to me.whenever i ask someone they think im just trolling when im being dead serious.

dynamic programming,what is it? dynamic programming is the technique of optimization.instead of bruteforcing,we can just do dp.which is convenient.there are 2 ways.recursion with memoization and filling arrays(basically all memoization).

sounds simple right? lets move on to the example.there are alot of classical dp problems like 0-1 knapsack,prefix sum,catalan numbers and so on.it might be hard if u do them for the first time.but as time goes on,it will become easier.

now to the real deal.how to do it in contest when its not classical problems.like modified knapsack wheremaybe 1 item cannot be taken twice or maybe every i-th taking process some value will cut down into n/2 because of some reason and many more.now you are solving a brand new problems.can you? this is equivalent of making a brand new algorithm,but in this case its just modifying but still it requires thinking and impossible to do within contest time.

most tutorials will say identify,think about states and youre done.yea thats it.thats basically what dp is about.but about getting the exact states that the problem wants? im not so sure if everyone can do that unless by doing similar problems(not classical but the exact same type of problem that is given to you).

what ur going to do in this situation? ask? if you have someone that u can rely on then good,it would be easy.but what if someone just trolls you everytime and ignore you because they are better than you and not worht of their time? do u think this is just beyond rude?.u will just fall into the pit of desperation and cant do anything since you cant adapt and noone is guiding.u will just become a cheater if u are really desperate to have better(i think most cheater are in this case,correct me if im wrong).but for someone that doesnt want to cheat and improve purely? how? like a clueless baby that try to stay alive without a parent,u will eventually fail.trust me,u will.u will just make a blog on how to improve and people will say u suck,not worth of cp and probably tell you just quit cp ur not smart enough.

the point of making this blog is just to remind people that sometimes,learning an algorithm is not worth your time.its just really abstract that people just make random proof for the sake of editorial content.

perhaps someone can convince me that dp is not that hard? but i think at this stage noone will ever change my mindset.

goodbye

Read more »

 
 
 
 
  • Vote: I like it
  • -27
  • Vote: I do not like it

By nrg_aceu, history, 2 months ago, In English

https://codeforces.com/contest/1459/problem/B

i just started learning dp a year ago and i could not find the solution for this problem.i dont know the states because i dont know what thing matters to get to a certain point and also the dimension of the dp.can anyone help me>

Read more »

 
 
 
 
  • Vote: I like it
  • -9
  • Vote: I do not like it

By nrg_aceu, history, 2 months ago, In English

dp problems r combinatorics.i dont know why people dont use some kind of permutation and combination formula.idk how adding some random states like dp[i]=dp[i-1] bla bla bla works.pretty dumb concept if u ask me.

Read more »

 
 
 
 
  • Vote: I like it
  • -36
  • Vote: I do not like it

By nrg_aceu, history, 2 months ago, In English

i practiced for 5 hours straight and cant even do a single problem.

after i play apex legends for 1 hour i have 3 problems ac streak

conclusion=play apex legends and stop studying

Read more »

 
 
 
 
  • Vote: I like it
  • -34
  • Vote: I do not like it

By nrg_aceu, history, 2 months ago, In English

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

Read more »

 
 
 
 
  • Vote: I like it
  • +12
  • Vote: I do not like it

By nrg_aceu, history, 2 months ago, In English
 
 
 
 
  • Vote: I like it
  • -4
  • Vote: I do not like it

By nrg_aceu, history, 3 months ago, In English

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

Read more »

 
 
 
 
  • Vote: I like it
  • -28
  • Vote: I do not like it

By nrg_aceu, history, 3 months ago, In English

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?

Read more »

 
 
 
 
  • Vote: I like it
  • -32
  • Vote: I do not like it

By nrg_aceu, history, 3 months ago, In English

https://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.

Read more »

 
 
 
 
  • Vote: I like it
  • -33
  • Vote: I do not like it

By nrg_aceu, history, 3 months ago, In English

im still unable to do this https://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.

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it