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
@mistake104493 жыл бұрын
thanks a lot bhaiya mujhe to pehchana hi hoga (unacademy class reference)
@siddhantkhare16593 жыл бұрын
I ruined C :(
@utkarshgupta98583 жыл бұрын
@@mistake10449 yup remember you from class
@arnab41513 жыл бұрын
@@utkarshgupta9858 Hey, the modular arithmetic link isn't working
@Abhishek-fo3fc3 жыл бұрын
@@arnab4151 yeah true
@siddhantkhare16593 жыл бұрын
Congrats on Becoming Uber SWE Intern
@ptiwari18823 жыл бұрын
Really? Congrats 🎉🎉
@dhananjaysharma43793 жыл бұрын
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-nz7vk3 жыл бұрын
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")
@meetbrahmbhatt15312 жыл бұрын
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-nz7vk2 жыл бұрын
@@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
@meetbrahmbhatt15312 жыл бұрын
@@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-nz7vk2 жыл бұрын
@@meetbrahmbhatt1531 Oh, don't get upset if you don't get these problems, with practice you'll get them I'm currently at 1854
@sudarshankundnani413 жыл бұрын
Bhai aapka knowledge to kamal he bhai
@faisalmahmud95603 жыл бұрын
It's super. Bro , please made video after every contest.. i've subscribed while watching your first video from Bangladesh..
@orzAR263 жыл бұрын
Waited badly❤️❤️
@manthanvats98093 жыл бұрын
@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..
@swayamsidhant23183 жыл бұрын
Bhai b me tumne kya socha . I mean how did you get the logic so fast?
@johnmcworth58553 жыл бұрын
That's why he is red coder.
@unanimousdisclosed74823 жыл бұрын
Don't ask the same stupid question, again and again, look at his practice.
@ApoorvaRajBhadani3 жыл бұрын
B jisko turant click Kiya uske liye easy tha Baaki isme kuch ds algo nhi lagana tha
@emurarryreddy4763 жыл бұрын
Thank you so much... Really hepful...
@shashibhushanrajput24613 жыл бұрын
bhai you were looking dope in the whole video, take care
@utkarshgupta98583 жыл бұрын
lol thanks a lot
@uditsanghi97943 жыл бұрын
Bugaboo ftw
@EverythingaboutTechPro3 жыл бұрын
what !!!!!! C was not dp ! I am so dumb
@madhavsinghal62303 жыл бұрын
It can also be solved using DP
@siddhantkhare16593 жыл бұрын
@@madhavsinghal6230 how bro?
@johnmcworth58553 жыл бұрын
@@madhavsinghal6230 I solved it with 2-D dp and dp + bitmasks too. But still it gave TLE.
@rahulvij6963 жыл бұрын
only c1 can be done using DP
@multiplewaya-qk7uq3 жыл бұрын
#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
@udayverma61203 жыл бұрын
Hi, I wanted to know if you solved problems on platforms other than codeforces or not? Please reply
@javitritiwari95383 жыл бұрын
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_00772 жыл бұрын
the smile at 10:45 🤣🤣🤣
@janmejaysingh74023 жыл бұрын
Easier to do with B with DFS and early pruning. Start DFS with largest number like 111111111
@yashjain9923 жыл бұрын
In C you could just use a multiset and remove the top elements when the sum becomes negative.
@sqarcle3 жыл бұрын
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
@sujaykumar70403 жыл бұрын
@@sqarcle it will work , whenever the sum becomes -ve we will remove the largest neagtive till now
@pixmasterstudios56233 жыл бұрын
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.
@sujaykumar70403 жыл бұрын
@@pixmasterstudios5623 order matters in this question , you have to go from left to right
@pixmasterstudios56233 жыл бұрын
@@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 😅
@biswajitrout47103 жыл бұрын
❤️❤️❤️❤️
@utkarshnimje3 жыл бұрын
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?
@auctal46253 жыл бұрын
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.
@utkarshnimje3 жыл бұрын
@@auctal4625 Ohh so that's why its throwing memory errors😂
@siddharthsharma98293 жыл бұрын
I also did same but its wa. Eg try for 1 -2 200 your answer would be 3 but correct one is 2
@utkarshnimje3 жыл бұрын
@@siddharthsharma9829 Yeah, as @Auctal said, we can't sort the array!
@aakarshitrekhi80713 жыл бұрын
I tried c with recursion , but got tle😭
@uppuabhinav99383 жыл бұрын
same
@pixmasterstudios56233 жыл бұрын
I brute forced it only to get WA on pretest 2
@aadityaupadhyay62643 жыл бұрын
C can be solved using heaps easily.
@maaz34613 жыл бұрын
but how will it work as the prob is position dependent (health_at_any_point >= 0)?
@aniketash47383 жыл бұрын
Bro how to master dp bro ? Give tips bro i m absolute beginner in it
@kashishbansal26513 жыл бұрын
you just make everything easy :)
@PGTECH3 жыл бұрын
courses link?
@utkarshgupta98583 жыл бұрын
see pinned comment
@dipjoybasak31563 жыл бұрын
Bhai ur second ques logic was cool, I just brute forced for the value of b till 1e7
@meetshah50033 жыл бұрын
Utkarsh bhai discord kab banaoge
@utkarshgupta98583 жыл бұрын
6 months ago...
@codetocompetectc18103 жыл бұрын
Where is the link ???
@utkarshgupta98583 жыл бұрын
see pinned comment
@aeons0_03 жыл бұрын
but how to prove D =-=
@shadmanahmed97593 жыл бұрын
Is university of allahabad is tier 2 or tire 3
@AllTricksMania3 жыл бұрын
For what course ?
@shadmanahmed97593 жыл бұрын
@@AllTricksMania Bca and b tech cs
@AllTricksMania3 жыл бұрын
@@shadmanahmed9759 no.. go for United College. Best college in Allahabad