aryanc403
aryanc403
  • 101
  • 237 041
How to bruteforce game theory problems using CF Edu problem
This is a clip from my post contest discussion stream for codeforces education round 169.
I'm adding it as a separate video so that I can refer people to this video whenever a new problems comes up.
Codeforces problem - codeforces.com/contest/2004/problem/E
ABC368F is another such problems which requires only bruteforce.
atcoder.jp/contests/abc368/tasks/abc368_f
Also checkout ""Winning Ways for Your Mathematical Plays V1"" book for more examples of nim games.
มุมมอง: 1 380

วีดีโอ

Codeforces Educational Round 169 Solution Discussion | ABCDEF
มุมมอง 2.5K21 วันที่ผ่านมา
Codeforces Educational Round 169 Solution Discussion | ABCDEF My submissions - codeforces.com/submissions/aryanc403/contest/2004 Community discord server - discord.gg/HKFgRWmWNY LinkedIn - www.linkedin.com/in/yt403 Twitter - aryanc403 Chapters - 00:00:00 Testing 00:02:20 A. Closest Point 00:13:30 B. Game with Doors 00:26:00 C. Splitting Items 00:36:00 D. Colored Portals 00:50:00 E. ...
How to install atcoder library
มุมมอง 1.7Kหลายเดือนก่อน
My blog - aryanc403.com/blog/installing-atcoder-library/ Community discord server - discord.gg/HKFgRWmWNY LinkedIn - www.linkedin.com/in/yt403 Twitter - aryanc403 Tags - #icpc #ioi #codeforces #codeforcessolution #codeforcessolutions #codechef #codechefsolution #codechefsolutiontoday #atcoder #geekforgeeks #topcoder#hackerearth #hackerrank #hackerranksolution #hackerranksolutions #l...
TheOneYouWant AMA
มุมมอง 7K4 หลายเดือนก่อน
TheOneYouWant AMA
TheOneYouWant AMA Trailer
มุมมอง 3.6K5 หลายเดือนก่อน
TheOneYouWant AMA Trailer
#Atcoder #ABC 345 "E - Colorful Subsequence" Editorial (By #AIR #1)
มุมมอง 9595 หลายเดือนก่อน
#Atcoder #ABC 345 "E - Colorful Subsequence" Editorial (By #AIR #1)
#Codeforces round 930 "Bitwise Operation Wizard" Editorial
มุมมอง 1.2K6 หลายเดือนก่อน
#Codeforces round 930 "Bitwise Operation Wizard" Editorial
#Codeforces round 930 "Shuffle Party" Editorial
มุมมอง 1.2K6 หลายเดือนก่อน
#Codeforces round 930 "Shuffle Party" Editorial
#Codeforces round 930 "Pokémon Arena" Editorial
มุมมอง 5596 หลายเดือนก่อน
#Codeforces round 930 "Pokémon Arena" Editorial
#Codeforces think-cell round 1 C. "Lexicographically Largest" editorial
มุมมอง 2.5K6 หลายเดือนก่อน
#Codeforces think-cell round 1 C. "Lexicographically Largest" editorial
#Codeforces think-cell round 1 A. "Maximise The Score" editorial
มุมมอง 3446 หลายเดือนก่อน
#Codeforces think-cell round 1 A. "Maximise The Score" editorial
#Codeforces think-cell round 1 B. "Permutation Printing" editorial
มุมมอง 1.1K6 หลายเดือนก่อน
#Codeforces think-cell round 1 B. "Permutation Printing" editorial
#StopPostContestHacking How to play cat and mouse game ft leetcode contests (and a shadow ban)
มุมมอง 7276 หลายเดือนก่อน
#StopPostContestHacking How to play cat and mouse game ft leetcode contests (and a shadow ban)

ความคิดเห็น

  • @cegprakash
    @cegprakash วันที่ผ่านมา

    Bro why no video on atcoder abc 370

  • @watch2-grow
    @watch2-grow 2 วันที่ผ่านมา

    Thank you bhaiya for your efforts

  • @devmahad
    @devmahad 2 วันที่ผ่านมา

    Hi, can you share your build and test process?

  • @devmahad
    @devmahad 2 วันที่ผ่านมา

    Thanks:) Problem B: 10:14 Problem D: 20:00

  • @MrGameface123
    @MrGameface123 5 วันที่ผ่านมา

    You're doing an amazing job. Keep up the great work

  • @shreyxnsh.14
    @shreyxnsh.14 5 วันที่ผ่านมา

    That solution for E was great!

  • @bharatmalhotra1880
    @bharatmalhotra1880 6 วันที่ผ่านมา

    leetcode or codeforces

  • @Najir581
    @Najir581 6 วันที่ผ่านมา

    Everything is really good explaination but I can not understand the H question .. is there anyone who can help me out from that

  • @ashishchokhani9084
    @ashishchokhani9084 6 วันที่ผ่านมา

    In last question, why did u initialize l for binary search=-1 instead of 0 as median>=0. I wasn't getting right answer with l=0. Thanks for the explanation btw !!

  • @codingdude8718
    @codingdude8718 7 วันที่ผ่านมา

    thanks alot bro I get really good approach from your channel

  • @mankeshdhanawat5613
    @mankeshdhanawat5613 7 วันที่ผ่านมา

    1:05:27 this mint (atcoder library) allowed in ICPC or not (also on codechef and leetcode as well)

    • @ayushsah8077
      @ayushsah8077 6 วันที่ผ่านมา

      Why would it be disallowed lmao?

  • @danushbasanaboyina1306
    @danushbasanaboyina1306 7 วันที่ผ่านมา

    Bro I started attempting codeforces, after watching your videos.thank you for your such a nice explanation.

    • @aryanc403
      @aryanc403 7 วันที่ผ่านมา

      Keep it up

    • @danushbasanaboyina1306
      @danushbasanaboyina1306 7 วันที่ผ่านมา

      @@aryanc403 When will you start a series (playlist)on DSA

  • @Mark-vv8by
    @Mark-vv8by 7 วันที่ผ่านมา

    I still don't understand the 3rd case in problem F. how did expected value of 1 2 3 4 5 became 500000012 ?

    • @SHUBHAM-ru7lk
      @SHUBHAM-ru7lk 7 วันที่ผ่านมา

      For that you have to study what modulo inverse is and how does it works. For that test case answer would be 17/2 and in question it was stated that if your answer is in fraction (p/q form) the you have to print value of p * q-¹ where q-¹ is modulo of q so answer would be 17 * 2-¹ = 50000012

    • @aryanc403
      @aryanc403 7 วันที่ผ่านมา

      The answer is 85/10. The problem statement asks us to print a integer 0<=X<mod, such that (10*X) % mod = 85. 500000012 is the integer between [0,mod-1] such that if we multiply it by 10 and take mod, we will get 85. How to find such integers for other fractions? Checkout modular arithmetic section here usaco.guide/gold/modular

  • @KNR_06_10
    @KNR_06_10 7 วันที่ผ่านมา

    Sir if possible can u pls explain java code too..

    • @akshattheintrovert3153
      @akshattheintrovert3153 7 วันที่ผ่านมา

      honestly logic is enough if you code in any language. btw i also do cp in java

  • @sourabhtiwari4788
    @sourabhtiwari4788 7 วันที่ผ่านมา

    Your stream is mostly watched by 1200 below rated coders, it would really help if you start your solution by first explaining a test case and then doing a dry run over your solution that would really be helpful and please go a bit slow for questions after d(e,f,g...) for div3 and after b(c,d...) in div2, you just need to understand why is your stream not watched by enough even after so many newbies in the contest something needs to change in your style otherwise blatantly giving out solution won't help and your channel would remain stagnant.

    • @aryanc403
      @aryanc403 7 วันที่ผ่านมา

      Thank you for the feedback. I will try doing better.

    • @Kartikey30
      @Kartikey30 7 วันที่ผ่านมา

      @@aryanc403 sir how u proof ur solution in contest?

    • @sourabhtiwari4788
      @sourabhtiwari4788 7 วันที่ผ่านมา

      @@aryanc403 One more suggestion if you could write the code without using the templates that you use in the code(that is like instead of using vi for vector<int> use the whole) that can improve the understanding of the code for the people who are watching your stream for the first time.

    • @sagnikbiswas3268
      @sagnikbiswas3268 5 วันที่ผ่านมา

      @@sourabhtiwari4788 i feel like implementation should be done entirely on your own, his code can serve as a reference here and there. But if you understand the algorithm, you should be able to code it entirely on your own.

  • @Kartikey30
    @Kartikey30 7 วันที่ผ่านมา

    why gcd==0? can't we write? ke whole array GCF ==1 then it's always possible ke array ko ham 0 to n-1 bana sakte

    • @aryanc403
      @aryanc403 7 วันที่ผ่านมา

      It was added before there was a change in constraints. We do not need a check for gcd==0.

    • @Kartikey30
      @Kartikey30 7 วันที่ผ่านมา

      @@aryanc403 okk now we only need for gcd 1 na ? since it's now a[i]>=1

  • @cegprakash
    @cegprakash 7 วันที่ผ่านมา

    For problem E I didn't attempted because I thought O(t x 26 x n) will timeout as t is too high

    • @aryanc403
      @aryanc403 7 วันที่ผ่านมา

      Problem statement has a line - “sum of n over all testcases is .....” With t*n you are essentially computing the same thing. So you can replace t*n with 2e5 and overall time complexity becomes 2e5*26

  • @Mohitkumar-zz4mp
    @Mohitkumar-zz4mp 7 วันที่ผ่านมา

    to be honest jis level pe app ho , apka minimum 1m subs hone chahiye , but ye duniya , kya karein bhaiya , acche log ka kadar hi nhi hai , faltu content me million , billion view aate hai

  • @vaibhavyadav1787
    @vaibhavyadav1787 8 วันที่ผ่านมา

    where is error in this code void func(){ int a, b; cin>>a>>b; if(a&1){ no; return; } a/=2; if(b<=a){ yes; }else if(b>a){ b = abs(b-a); if((b&1)==0) yes; else no; }else no; }

    • @sarthak9932
      @sarthak9932 8 วันที่ผ่านมา

      I wrote the same code dude

    • @vaibhavyadav1787
      @vaibhavyadav1787 7 วันที่ผ่านมา

      @@sarthak9932 still getting failed testcase in 2

    • @zebra-er6xc
      @zebra-er6xc 7 วันที่ผ่านมา

      why are you doing b = abs(b-a) and comparing a and b values, thodi intuition explain karo

    • @mranonymous8498
      @mranonymous8498 7 วันที่ผ่านมา

      A=4, B=8

    • @cegprakash
      @cegprakash 7 วันที่ผ่านมา

      A=2 B=4. Your code returns no as 4-2/2 = 3 which is odd. However 1 - 2 + 2 - 2 + 2 - 1 is possible. The problem is you never considered the case where 1 and 1 can simply cancel out each other (without having to depend on 2s) Your code fails for any even b>= 2*a when a is a oddx2 For example your code fails on a=6 b=12 too

  • @ashishchokhani9084
    @ashishchokhani9084 8 วันที่ผ่านมา

    Can the last problem be also solved using small to large merging? Thanks for wonderful explanation !

    • @aryanc403
      @aryanc403 7 วันที่ผ่านมา

      Maybe one can, but the problem does not need anything more than single dfs.

  • @rengoku448
    @rengoku448 8 วันที่ผ่านมา

    That thumbnail picture looks really nice👏👏

  • @L_Yassine
    @L_Yassine 8 วันที่ผ่านมา

    thanks for the valuable content !

    • @safetwat
      @safetwat 8 วันที่ผ่านมา

      for real, i have seen people discussing post contest but this man is just too good with it, his thought process and explanation is just sublime.

  • @rachakondaeshwar4129
    @rachakondaeshwar4129 8 วันที่ผ่านมา

    congrats\\\\\\\\\\\\\\\\\

  • @zebra-er6xc
    @zebra-er6xc 9 วันที่ผ่านมา

    Aryan level on cf when?

  • @arpitkumarmishra6220
    @arpitkumarmishra6220 9 วันที่ผ่านมา

    your new subscriber

  • @SpiritualMaster-gx6lu
    @SpiritualMaster-gx6lu 10 วันที่ผ่านมา

    Leetcode contest winner💥

  • @dfdga34gfd
    @dfdga34gfd 11 วันที่ผ่านมา

    can you do abc367 also?

  • @RastyRocky
    @RastyRocky 11 วันที่ผ่านมา

    Can you please make a video on selecting problems for practicing and which resources do you use learn for learning topics?

  • @rishabhnegi1937
    @rishabhnegi1937 12 วันที่ผ่านมา

    Worst explanation

  • @grandparick3176
    @grandparick3176 12 วันที่ผ่านมา

    In problem D1, it says you start with some element X but what exactly is that X? We don't really take anything X as input so how do we exactly guess what x to take?

  • @laxmanchoudhary4450
    @laxmanchoudhary4450 13 วันที่ผ่านมา

    please explain what you have written in contest do not code a new code while explaining it creates problem in understanding the code

  • @jaadu2551
    @jaadu2551 13 วันที่ผ่านมา

    Need a video on parallel binary search

  • @kz_cbble9670
    @kz_cbble9670 14 วันที่ผ่านมา

    Thanks for codeforces. Can you also do this for atcoder?

    • @aryanc403
      @aryanc403 14 วันที่ผ่านมา

      th-cam.com/play/PLY4qyBz7rQ86kKUmXmAcr8_FUyGIy7iJ2.html

    • @shreyxnsh.14
      @shreyxnsh.14 11 วันที่ผ่านมา

      @@aryanc403 Please do this for every Atcoder Beginner

  • @KuldeepSingh-yo7sh
    @KuldeepSingh-yo7sh 14 วันที่ผ่านมา

    sir D1 wala bilkul smjh mai nhi aya

    • @faiazmahmud6277
      @faiazmahmud6277 14 วันที่ผ่านมา

      u can ask me in cf id i can explain u there

  • @shivapandey8510
    @shivapandey8510 14 วันที่ผ่านมา

    In question C, we can store the characters along with their frequency without sorting and then keep popping the front element for one time and then the other element. This continues while size of q is greater than 1 and at last we can pop the last character. #include <bits/stdc++.h> using namespace std; #define ll long long int #define pp pair<int,char> int main() { ll t; cin>>t; while(t--) { ll n; cin>>n; string s; cin>>s; unordered_map<char,int> mp; for(auto &x : s) mp[x]++; queue<pp> pq; for(auto &x: mp) pq.push({x.second, x.first}); string st=""; while(pq.size()>1) { auto tp= pq.front(); pq.pop(); st.push_back(tp.second); if(tp.first-1>0) { auto tp1 = pq.front(); pq.pop(); st.push_back(tp1.second); pq.push({tp.first-1,tp.second}); if(tp1.first>1) pq.push({tp1.first-1,tp1.second}); } } if(pq.size()) { auto tp = pq.front(); pq.pop(); for(int i=0;i<tp.first;i++) st.push_back(tp.second); } cout<<st<<endl; } } This also shows accepted.

    • @aryanc403
      @aryanc403 14 วันที่ผ่านมา

      Yes this is another correct solution. Official editorial has this solution and a reason why it works. codeforces.com/blog/entry/132953

  • @vyomgoyal3125
    @vyomgoyal3125 14 วันที่ผ่านมา

    bhai yeh aapke baal pure white kaise ho gaye ek dum se ?

  • @divaspathak8857
    @divaspathak8857 14 วันที่ผ่านมา

    Sir can you please continue doing this for upcoming codeforces contest as well?

    • @aryanc403
      @aryanc403 14 วันที่ผ่านมา

      I do this for almost every contest. :)

  • @csbotlol
    @csbotlol 14 วันที่ผ่านมา

    In google OA there was a question in which given a tree we needed to find sum of medians of all odd length path of the tree.. i tried solving it using ordered set but got TLE.. tips on how to solve it

  • @vineetsingh4707
    @vineetsingh4707 14 วันที่ผ่านมา

    Can someone suggest me like it took me almost 1 hour to hit the approach for the second one.

  • @AnkitSingh-ex6ib
    @AnkitSingh-ex6ib 15 วันที่ผ่านมา

    Number of question solve by you in today contest can send someone to depression 😢 but motivating at same time

  • @padhai_karle_bhai
    @padhai_karle_bhai 15 วันที่ผ่านมา

    Thanks a lot for this .

  • @shreyanray7624
    @shreyanray7624 15 วันที่ผ่านมา

    congratulations! nice performance today

    • @aryanc403
      @aryanc403 14 วันที่ผ่านมา

      Thank you very much!

    • @shreyxnsh.14
      @shreyxnsh.14 11 วันที่ผ่านมา

      Shreyan Ray the legend!!!!

  • @hkrai1372
    @hkrai1372 15 วันที่ผ่านมา

    Will u Atcoder regular contest solution?

    • @aryanc403
      @aryanc403 15 วันที่ผ่านมา

      Not planning to.

  • @frouMagician
    @frouMagician 15 วันที่ผ่านมา

    didnt know pedro pascal started cp

  • @llarn.i5103
    @llarn.i5103 15 วันที่ผ่านมา

    Amazing thank you so much

  • @zebra-er6xc
    @zebra-er6xc 16 วันที่ผ่านมา

    C: 8:30

  • @prantobala8505
    @prantobala8505 16 วันที่ผ่านมา

    plz add subtitle for better understanding.

    • @Study_With_Sachin
      @Study_With_Sachin 16 วันที่ผ่านมา

      bro this is live stream how he can add subtitles . #aryan sir orz

  • @prantobala8505
    @prantobala8505 16 วันที่ผ่านมา

    don't stop bro. Love from Bangladesh!

    • @HridoyNandi-cn3qk
      @HridoyNandi-cn3qk 16 วันที่ผ่านมา

      bro whats your rating? i am also from bd

    • @prantobala8505
      @prantobala8505 16 วันที่ผ่านมา

      @@HridoyNandi-cn3qk CF max 1122. you?

    • @HridoyNandi-cn3qk
      @HridoyNandi-cn3qk 14 วันที่ผ่านมา

      @@prantobala8505 1200 max

  • @user-xk6ob5eb8t
    @user-xk6ob5eb8t 16 วันที่ผ่านมา

    useful video,hope u do more vid like this