Codeforces Round 723 (Div 2) | Bugaboos A to D Solutions

  Рет қаралды 15,809

Utkarsh Gupta

Utkarsh Gupta

Күн бұрын

Пікірлер: 75
@utkarshgupta9858
@utkarshgupta9858 3 жыл бұрын
Use invite code HEALTHYUG to watch Modular Arithmetic(for B): unacademy.com/course/modular-arithmetic-operations-under-mod-in-detail/VPR5UIUA Segment Tree (for C2 and D): unacademy.com/a/free-course-on-segment-trees-new
@mistake10449
@mistake10449 3 жыл бұрын
thanks a lot bhaiya mujhe to pehchana hi hoga (unacademy class reference)
@siddhantkhare1659
@siddhantkhare1659 3 жыл бұрын
I ruined C :(
@utkarshgupta9858
@utkarshgupta9858 3 жыл бұрын
@@mistake10449 yup remember you from class
@arnab4151
@arnab4151 3 жыл бұрын
@@utkarshgupta9858 Hey, the modular arithmetic link isn't working
@Abhishek-fo3fc
@Abhishek-fo3fc 3 жыл бұрын
@@arnab4151 yeah true
@siddhantkhare1659
@siddhantkhare1659 3 жыл бұрын
Congrats on Becoming Uber SWE Intern
@ptiwari1882
@ptiwari1882 3 жыл бұрын
Really? Congrats 🎉🎉
@dhananjaysharma4379
@dhananjaysharma4379 3 жыл бұрын
just watched ur Modular arithmetic lecture on unacademy, even though I had earlier attended various lectures on the same topic but never got such a crystal clear view of this topic.........It's amazing man.
@sahil-nz7vk
@sahil-nz7vk 3 жыл бұрын
For B, this is what I did. I know I only have to check for 11 and 111. Also, since 111 is 10*11+1, every time I subtract 111, n%11 will decrease by 1. So, if n%11 is say x, I need to subtract 111 x times The answer becomes, if n-111*(n%11)>=0, print("YES") else print("NO")
@meetbrahmbhatt1531
@meetbrahmbhatt1531 2 жыл бұрын
Bro thanks for giving me an good intuition..was looking for a one liner solution . any tips to solve these types pf questions in contest time quickly?
@sahil-nz7vk
@sahil-nz7vk 2 жыл бұрын
@@meetbrahmbhatt1531 usually for these ad hoc questions, you just need a lot of practice to get it quickly. You can practice A B C of contests to get good with ad hoc problems
@meetbrahmbhatt1531
@meetbrahmbhatt1531 2 жыл бұрын
@@sahil-nz7vk actually I just started 1.5 months ago and I found this one hard to think on my own thats why was abit upset. Whats your rating on cf?
@sahil-nz7vk
@sahil-nz7vk 2 жыл бұрын
@@meetbrahmbhatt1531 Oh, don't get upset if you don't get these problems, with practice you'll get them I'm currently at 1854
@sudarshankundnani41
@sudarshankundnani41 3 жыл бұрын
Bhai aapka knowledge to kamal he bhai
@faisalmahmud9560
@faisalmahmud9560 3 жыл бұрын
It's super. Bro , please made video after every contest.. i've subscribed while watching your first video from Bangladesh..
@orzAR26
@orzAR26 3 жыл бұрын
Waited badly❤️❤️
@manthanvats9809
@manthanvats9809 3 жыл бұрын
@Utkarsh Gupta how you parse testcases in sublime text, I use Competitive Companion and FastOlympicCodingHook but after new update of sublime text it is not working.... Please tell how you parse testcases and which plugin you use.. please..
@swayamsidhant2318
@swayamsidhant2318 3 жыл бұрын
Bhai b me tumne kya socha . I mean how did you get the logic so fast?
@johnmcworth5855
@johnmcworth5855 3 жыл бұрын
That's why he is red coder.
@unanimousdisclosed7482
@unanimousdisclosed7482 3 жыл бұрын
Don't ask the same stupid question, again and again, look at his practice.
@ApoorvaRajBhadani
@ApoorvaRajBhadani 3 жыл бұрын
B jisko turant click Kiya uske liye easy tha Baaki isme kuch ds algo nhi lagana tha
@emurarryreddy476
@emurarryreddy476 3 жыл бұрын
Thank you so much... Really hepful...
@shashibhushanrajput2461
@shashibhushanrajput2461 3 жыл бұрын
bhai you were looking dope in the whole video, take care
@utkarshgupta9858
@utkarshgupta9858 3 жыл бұрын
lol thanks a lot
@uditsanghi9794
@uditsanghi9794 3 жыл бұрын
Bugaboo ftw
@EverythingaboutTechPro
@EverythingaboutTechPro 3 жыл бұрын
what !!!!!! C was not dp ! I am so dumb
@madhavsinghal6230
@madhavsinghal6230 3 жыл бұрын
It can also be solved using DP
@siddhantkhare1659
@siddhantkhare1659 3 жыл бұрын
@@madhavsinghal6230 how bro?
@johnmcworth5855
@johnmcworth5855 3 жыл бұрын
@@madhavsinghal6230 I solved it with 2-D dp and dp + bitmasks too. But still it gave TLE.
@rahulvij696
@rahulvij696 3 жыл бұрын
only c1 can be done using DP
@multiplewaya-qk7uq
@multiplewaya-qk7uq 3 жыл бұрын
#include using namespace std; #define ll long long int int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll n; cin>>n; vector A(n); for(ll &a: A) cin>>a; vector dp(n+1 , vector(1, INT_MIN)); for(ll i = 1 ; i
@udayverma6120
@udayverma6120 3 жыл бұрын
Hi, I wanted to know if you solved problems on platforms other than codeforces or not? Please reply
@javitritiwari9538
@javitritiwari9538 3 жыл бұрын
Hey can I request a video on collisions in unordered_map , gp_hash_table we can blow them using specific primes (neal's blog on cf) Thanks :)
@as.if_0077
@as.if_0077 2 жыл бұрын
the smile at 10:45 🤣🤣🤣
@janmejaysingh7402
@janmejaysingh7402 3 жыл бұрын
Easier to do with B with DFS and early pruning. Start DFS with largest number like 111111111
@yashjain992
@yashjain992 3 жыл бұрын
In C you could just use a multiset and remove the top elements when the sum becomes negative.
@sqarcle
@sqarcle 3 жыл бұрын
No I tried that way. The problem is you need your health to be positive at every instance, e.g. it will not work for -1 -1 -1 3
@sujaykumar7040
@sujaykumar7040 3 жыл бұрын
@@sqarcle it will work , whenever the sum becomes -ve we will remove the largest neagtive till now
@pixmasterstudios5623
@pixmasterstudios5623 3 жыл бұрын
Can't we sort the array and iterate the sum till it becomes 0 and print the index?? I did this but got WA on pretest 2.
@sujaykumar7040
@sujaykumar7040 3 жыл бұрын
@@pixmasterstudios5623 order matters in this question , you have to go from left to right
@pixmasterstudios5623
@pixmasterstudios5623 3 жыл бұрын
@@sujaykumar7040 oh. Also I tried using Kadane's algorithm but messed it up. Don't mind me I'm a newbie, started this week only 😅
@biswajitrout4710
@biswajitrout4710 3 жыл бұрын
❤️❤️❤️❤️
@utkarshnimje
@utkarshnimje 3 жыл бұрын
For the C1 problem, IMO if we sort the potions in descending order and start iterating while adding the health until its >=0 and then return the count then this should work but it doesn't can you tell me what went wrong please?
@auctal4625
@auctal4625 3 жыл бұрын
You cant sort the array coz there is resctrictions(you can move only from left to right). You need to maintain the order as it is.
@utkarshnimje
@utkarshnimje 3 жыл бұрын
@@auctal4625 Ohh so that's why its throwing memory errors😂
@siddharthsharma9829
@siddharthsharma9829 3 жыл бұрын
I also did same but its wa. Eg try for 1 -2 200 your answer would be 3 but correct one is 2
@utkarshnimje
@utkarshnimje 3 жыл бұрын
@@siddharthsharma9829 Yeah, as @Auctal said, we can't sort the array!
@aakarshitrekhi8071
@aakarshitrekhi8071 3 жыл бұрын
I tried c with recursion , but got tle😭
@uppuabhinav9938
@uppuabhinav9938 3 жыл бұрын
same
@pixmasterstudios5623
@pixmasterstudios5623 3 жыл бұрын
I brute forced it only to get WA on pretest 2
@aadityaupadhyay6264
@aadityaupadhyay6264 3 жыл бұрын
C can be solved using heaps easily.
@maaz3461
@maaz3461 3 жыл бұрын
but how will it work as the prob is position dependent (health_at_any_point >= 0)?
@aniketash4738
@aniketash4738 3 жыл бұрын
Bro how to master dp bro ? Give tips bro i m absolute beginner in it
@kashishbansal2651
@kashishbansal2651 3 жыл бұрын
you just make everything easy :)
@PGTECH
@PGTECH 3 жыл бұрын
courses link?
@utkarshgupta9858
@utkarshgupta9858 3 жыл бұрын
see pinned comment
@dipjoybasak3156
@dipjoybasak3156 3 жыл бұрын
Bhai ur second ques logic was cool, I just brute forced for the value of b till 1e7
@meetshah5003
@meetshah5003 3 жыл бұрын
Utkarsh bhai discord kab banaoge
@utkarshgupta9858
@utkarshgupta9858 3 жыл бұрын
6 months ago...
@codetocompetectc1810
@codetocompetectc1810 3 жыл бұрын
Where is the link ???
@utkarshgupta9858
@utkarshgupta9858 3 жыл бұрын
see pinned comment
@aeons0_0
@aeons0_0 3 жыл бұрын
but how to prove D =-=
@shadmanahmed9759
@shadmanahmed9759 3 жыл бұрын
Is university of allahabad is tier 2 or tire 3
@AllTricksMania
@AllTricksMania 3 жыл бұрын
For what course ?
@shadmanahmed9759
@shadmanahmed9759 3 жыл бұрын
@@AllTricksMania Bca and b tech cs
@AllTricksMania
@AllTricksMania 3 жыл бұрын
@@shadmanahmed9759 no.. go for United College. Best college in Allahabad
@ashishnegi9663
@ashishnegi9663 3 жыл бұрын
@@AllTricksMania MNNIT: Am I a joke to you?
@BennyJosephPerepogu
@BennyJosephPerepogu 3 жыл бұрын
C solution was good
Codeforces Round 724 | Problems A to D Screencast with Commentary
59:12
Atcoder Beginner Contest 206 | All Tasks Solutions
30:47
Utkarsh Gupta
Рет қаралды 6 М.
Amazing Parenting Hacks! 👶✨ #ParentingTips #LifeHacks
00:18
Snack Chat
Рет қаралды 18 МЛН
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 125 МЛН
АЗАРТНИК 4 |СЕЗОН 1 Серия
40:47
Inter Production
Рет қаралды 1,4 МЛН
Modus males sekolah
00:14
fitrop
Рет қаралды 25 МЛН
Maths for DSA/CP : All You Need To Know
1:07:19
Utkarsh Gupta
Рет қаралды 136 М.
How I approach Maths and Number theory Problems on Codeforces
19:07
Are Phrasal Verbs Better Than Regular Verbs?
10:27
JForrest English
Рет қаралды 2,3 М.
IOI 2024 Problem A Tutorial: Nile
27:33
Sam Huang - Competitive Programming
Рет қаралды 317
Codeforces Global Round 15 | Problems A to F Video Editorial
35:01
Utkarsh Gupta
Рет қаралды 11 М.
Codenation 29th July 2021 Hiring Test Solutions (Hard)
39:45
Utkarsh Gupta
Рет қаралды 46 М.
Codeforces Edu Round 111 | Problems A to E Solutions
1:06:00
Utkarsh Gupta
Рет қаралды 12 М.
Amazing Parenting Hacks! 👶✨ #ParentingTips #LifeHacks
00:18
Snack Chat
Рет қаралды 18 МЛН