aryanc403
aryanc403
  • Видео 101
  • Просмотров 237 732
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 385

Видео

Codeforces Educational Round 169 Solution Discussion | ABCDEF
Просмотров 2,5 тыс.21 день назад
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,7 тыс.Месяц назад
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
Просмотров 7 тыс.4 месяца назад
TheOneYouWant AMA
TheOneYouWant AMA Trailer
Просмотров 3,6 тыс.5 месяцев назад
TheOneYouWant AMA Trailer
#Atcoder #ABC 345 "E - Colorful Subsequence" Editorial (By #AIR #1)
Просмотров 9625 месяцев назад
#Atcoder #ABC 345 "E - Colorful Subsequence" Editorial (By #AIR #1)
#Codeforces round 930 "Bitwise Operation Wizard" Editorial
Просмотров 1,2 тыс.6 месяцев назад
#Codeforces round 930 "Bitwise Operation Wizard" Editorial
#Codeforces round 930 "Shuffle Party" Editorial
Просмотров 1,2 тыс.6 месяцев назад
#Codeforces round 930 "Shuffle Party" Editorial
#Codeforces round 930 "Pokémon Arena" Editorial
Просмотров 5606 месяцев назад
#Codeforces round 930 "Pokémon Arena" Editorial
#Codeforces think-cell round 1 C. "Lexicographically Largest" editorial
Просмотров 2,5 тыс.6 месяцев назад
#Codeforces think-cell round 1 C. "Lexicographically Largest" editorial
#Codeforces think-cell round 1 A. "Maximise The Score" editorial
Просмотров 3496 месяцев назад
#Codeforces think-cell round 1 A. "Maximise The Score" editorial
#Codeforces think-cell round 1 B. "Permutation Printing" editorial
Просмотров 1,1 тыс.6 месяцев назад
#Codeforces think-cell round 1 B. "Permutation Printing" editorial
#StopPostContestHacking How to play cat and mouse game ft leetcode contests (and a shadow ban)
Просмотров 7306 месяцев назад
#StopPostContestHacking How to play cat and mouse game ft leetcode contests (and a shadow ban)

Комментарии

  • @cegprakash
    @cegprakash 3 дня назад

    Bro why no video on atcoder abc 370

  • @watch2-grow
    @watch2-grow 4 дня назад

    Thank you bhaiya for your efforts

  • @devmahad
    @devmahad 4 дня назад

    Hi, can you share your build and test process?

  • @devmahad
    @devmahad 4 дня назад

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

  • @MrGameface123
    @MrGameface123 6 дней назад

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

  • @shreyxnsh.14
    @shreyxnsh.14 7 дней назад

    That solution for E was great!

  • @bharatmalhotra1880
    @bharatmalhotra1880 8 дней назад

    leetcode or codeforces

  • @Najir581
    @Najir581 8 дней назад

    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 8 дней назад

    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 8 дней назад

    thanks alot bro I get really good approach from your channel

  • @mankeshdhanawat5613
    @mankeshdhanawat5613 8 дней назад

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

    • @ayushsah8077
      @ayushsah8077 8 дней назад

      Why would it be disallowed lmao?

  • @danushbasanaboyina1306
    @danushbasanaboyina1306 9 дней назад

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

  • @Mark-vv8by
    @Mark-vv8by 9 дней назад

    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 9 дней назад

      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 8 дней назад

      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 9 дней назад

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

    • @akshattheintrovert3153
      @akshattheintrovert3153 8 дней назад

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

  • @sourabhtiwari4788
    @sourabhtiwari4788 9 дней назад

    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 9 дней назад

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

    • @Kartikey30
      @Kartikey30 9 дней назад

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

    • @sourabhtiwari4788
      @sourabhtiwari4788 8 дней назад

      @@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 7 дней назад

      @@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 9 дней назад

    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 9 дней назад

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

    • @Kartikey30
      @Kartikey30 9 дней назад

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

  • @cegprakash
    @cegprakash 9 дней назад

    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 9 дней назад

      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 9 дней назад

    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 9 дней назад

    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 9 дней назад

      I wrote the same code dude

    • @vaibhavyadav1787
      @vaibhavyadav1787 9 дней назад

      @@sarthak9932 still getting failed testcase in 2

    • @zebra-er6xc
      @zebra-er6xc 9 дней назад

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

    • @mranonymous8498
      @mranonymous8498 9 дней назад

      A=4, B=8

    • @cegprakash
      @cegprakash 9 дней назад

      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 10 дней назад

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

    • @aryanc403
      @aryanc403 8 дней назад

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

  • @MonoLith.m
    @MonoLith.m 10 дней назад

    That thumbnail picture looks really nice👏👏

  • @L_Yassine
    @L_Yassine 10 дней назад

    thanks for the valuable content !

    • @safetwat
      @safetwat 10 дней назад

      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 10 дней назад

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

  • @zebra-er6xc
    @zebra-er6xc 10 дней назад

    Aryan level on cf when?

  • @arpitkumarmishra6220
    @arpitkumarmishra6220 10 дней назад

    your new subscriber

  • @SpiritualMaster-gx6lu
    @SpiritualMaster-gx6lu 12 дней назад

    Leetcode contest winner💥

  • @dfdga34gfd
    @dfdga34gfd 12 дней назад

    can you do abc367 also?

  • @RastyRocky
    @RastyRocky 13 дней назад

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

  • @rishabhnegi1937
    @rishabhnegi1937 14 дней назад

    Worst explanation

  • @grandparick3176
    @grandparick3176 14 дней назад

    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 15 дней назад

    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 15 дней назад

    Need a video on parallel binary search

  • @kz_cbble9670
    @kz_cbble9670 16 дней назад

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

    • @aryanc403
      @aryanc403 16 дней назад

      ruclips.net/p/PLY4qyBz7rQ86kKUmXmAcr8_FUyGIy7iJ2

    • @shreyxnsh.14
      @shreyxnsh.14 13 дней назад

      @@aryanc403 Please do this for every Atcoder Beginner

  • @KuldeepSingh-yo7sh
    @KuldeepSingh-yo7sh 16 дней назад

    sir D1 wala bilkul smjh mai nhi aya

    • @faiazmahmud6277
      @faiazmahmud6277 15 дней назад

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

  • @shivapandey8510
    @shivapandey8510 16 дней назад

    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 16 дней назад

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

  • @vyomgoyal3125
    @vyomgoyal3125 16 дней назад

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

  • @divaspathak8857
    @divaspathak8857 16 дней назад

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

    • @aryanc403
      @aryanc403 16 дней назад

      I do this for almost every contest. :)

  • @csbotlol
    @csbotlol 16 дней назад

    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 16 дней назад

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

  • @AnkitSingh-ex6ib
    @AnkitSingh-ex6ib 16 дней назад

    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 16 дней назад

    Thanks a lot for this .

  • @shreyanray7624
    @shreyanray7624 16 дней назад

    congratulations! nice performance today

    • @aryanc403
      @aryanc403 16 дней назад

      Thank you very much!

    • @shreyxnsh.14
      @shreyxnsh.14 13 дней назад

      Shreyan Ray the legend!!!!

  • @hkrai1372
    @hkrai1372 16 дней назад

    Will u Atcoder regular contest solution?

    • @aryanc403
      @aryanc403 16 дней назад

      Not planning to.

  • @frouMagician
    @frouMagician 17 дней назад

    didnt know pedro pascal started cp

  • @llarn.i5103
    @llarn.i5103 17 дней назад

    Amazing thank you so much

  • @zebra-er6xc
    @zebra-er6xc 17 дней назад

    C: 8:30

  • @prantobala8505
    @prantobala8505 17 дней назад

    plz add subtitle for better understanding.

    • @Study_With_Sachin
      @Study_With_Sachin 17 дней назад

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

  • @prantobala8505
    @prantobala8505 17 дней назад

    don't stop bro. Love from Bangladesh!

  • @user-xk6ob5eb8t
    @user-xk6ob5eb8t 17 дней назад

    useful video,hope u do more vid like this