(Problem-C) Good String | Codeforces Educational Round 92

  Рет қаралды 5,947

Hitesh Tripathi

Hitesh Tripathi

Күн бұрын

Пікірлер: 53
@VishalYadav-gk1kg
@VishalYadav-gk1kg 6 ай бұрын
Very nice explanation sir, Thank you!
@freeprojecttrainingrealtim9465
@freeprojecttrainingrealtim9465 4 жыл бұрын
first time I solved first four second was good problem
@pranjalbansal8459
@pranjalbansal8459 4 жыл бұрын
bhai iski complexity smjh nhi aa rhi bs, mtlb 100 cases pr string check ho rhi h and string ki length 2*10^5 h to TLE aa jana chahiye naa.
@nutanhotwani8967
@nutanhotwani8967 4 жыл бұрын
Hello! I have been following your videos for a long time and I wanted the solution for one question. If you could please help me with it? The question is: find total number of ways of selecting K non-adjacent cells in a matrix. I would be waiting for your video:) Or any link to the solution would also help
@HiteshTripathi
@HiteshTripathi 4 жыл бұрын
Question link please.
@nutanhotwani8967
@nutanhotwani8967 4 жыл бұрын
@@HiteshTripathi This question was asked in CodeArena.. I do not have the link
@priyanshurajtrading
@priyanshurajtrading 4 жыл бұрын
Bhai code ki link bhi daal diya karo description me samjhne me help hoti hai
@darshanjha4086
@darshanjha4086 4 жыл бұрын
was waiting for this....please upload B
@naafizrahman6538
@naafizrahman6538 4 жыл бұрын
I have taken all the pair of numbers from 0-9 possible and tried to find the pair with maximum frequency, still I get WA.
@HiteshTripathi
@HiteshTripathi 4 жыл бұрын
Sequence also matters. abababababa......in this way.... But in your case sequence check nahi hoga
@ashutoshdixit2806
@ashutoshdixit2806 4 жыл бұрын
#include #include #include #include #include #include using namespace std; int min(int a, int b) { if (a < b) return a; else { return b; } } int main() { int t; cin >> t; while (t--) { string str; cin >> str; int h[10]; memset(h, 0, sizeof(h)); for (int i = 0; i < str.length(); i++) { h[str[i] - '0']++; } // cout
@RakeshGupta-ft6cc
@RakeshGupta-ft6cc 4 жыл бұрын
Nope, I think Hitesh is wrong. It is possible. I used the same method. I stored all the indices of 0-9 in separate arrays. Then for each pair, I took the corresponding two arrays and started checking the sequence frequency using the indices stored in them
@HiteshTripathi
@HiteshTripathi 4 жыл бұрын
@@RakeshGupta-ft6cc bro he is saying different thing and you are saying different thing.
@RakeshGupta-ft6cc
@RakeshGupta-ft6cc 4 жыл бұрын
@@HiteshTripathi oh ok.
@girishgarg2816
@girishgarg2816 4 жыл бұрын
Bro ur image is blocking the view. Webcam view nhi bhi rakhoge toh chalega
@HiteshTripathi
@HiteshTripathi 4 жыл бұрын
Ok bhai.
@fearlesscoder2054
@fearlesscoder2054 4 жыл бұрын
Bhaiya kal mai maths waale question mai hi phas gya but jab maine uska solution dekha to pta chala kitna easy tha wo,Bhaiya maths questions ke liye kya karu?,mai seive method se prime nikalne laga tha but solution mai kuch laga hi nhi aisa
@lmlstudio2008
@lmlstudio2008 3 жыл бұрын
thanks, helped me a lot
@mdshahariarsadiq9995
@mdshahariarsadiq9995 3 жыл бұрын
thanks
@palashkamble2325
@palashkamble2325 4 жыл бұрын
Superb explanation bro.
@aayush8841
@aayush8841 4 жыл бұрын
Great Explanation Bro !!!
@SumitSingh-zw5on
@SumitSingh-zw5on 4 жыл бұрын
Please post the solution for problem b array walk also.
@ramyadav-jk1mm
@ramyadav-jk1mm 4 жыл бұрын
i first left rotated and right rotated the string and compared them.. if they are equal i print 0 else i take the frequency of each number in the input string and store them in a map.Then i take the highest frequency and return size of string - highest frequency.If the frequency of all the numbers in the input string is 1 i return size of string - 2 Please tell me where am I going wrong.
@rishabladha6831
@rishabladha6831 4 жыл бұрын
why you are considering the case that frequency of all the numbers in string is 1 , it may or may not !! but this case not going to help us much!!!!
@girishgarg2816
@girishgarg2816 4 жыл бұрын
if (i == j) continue; Why didn't you add this line inside our loop while counting pairs ?
@HiteshTripathi
@HiteshTripathi 4 жыл бұрын
Sorry bro.
@girishgarg2816
@girishgarg2816 4 жыл бұрын
But I saw your code that u submitted. You didn't write it there too but it was Accepted
@HiteshTripathi
@HiteshTripathi 4 жыл бұрын
@@girishgarg2816 isko naa likhne se koi galti thodi na hai....bas extra values check kar raha hai.
@bhoumikparmar8348
@bhoumikparmar8348 4 жыл бұрын
Bro Maine same logic lagaya python me par Mera tle de raha
@ankushchhabra6092
@ankushchhabra6092 4 жыл бұрын
nice explanation
@nikhilkumar-ot9rn
@nikhilkumar-ot9rn 4 жыл бұрын
bhai question ka link v de diya krr na ..or apne solution ka bhi...
@jethalalnhk2409
@jethalalnhk2409 4 жыл бұрын
Good video hitesh sir
@prakhartiwari3831
@prakhartiwari3831 4 жыл бұрын
Bro please upload solution of problem B..
@namangirdhar8736
@namangirdhar8736 4 жыл бұрын
I could solve only A for past two contests😬.
@HiteshTripathi
@HiteshTripathi 4 жыл бұрын
Same bhai....😂😂 Approach aajati hai but choti mistake se rehra😅😅
@pranjalbansal8459
@pranjalbansal8459 4 жыл бұрын
Bhai mere smjh me aa jata h ese ese hoga bt krna nhi aa pata😂😂
@HiteshTripathi
@HiteshTripathi 4 жыл бұрын
Hoga bhai hoga 😂😂
@ninadchaudhari433
@ninadchaudhari433 4 жыл бұрын
Bhai aapko first wale ka logic samjha kya iam new to coding emre slution ko toh TLE aari thhi
@rishabladha6831
@rishabladha6831 4 жыл бұрын
logic : just check if l*2
@ninadchaudhari433
@ninadchaudhari433 4 жыл бұрын
@@rishabladha6831 THANKSS!!!
@hacksark9748
@hacksark9748 4 жыл бұрын
Bhai kal bala contest fir vi acha tha
@akhilkhubchandani2632
@akhilkhubchandani2632 4 жыл бұрын
Iski koi dp approach bhi hai?
@HiteshTripathi
@HiteshTripathi 4 жыл бұрын
Iska to koi ni hai bhai shyd ....meri samjh me😅😅
@akhilkhubchandani2632
@akhilkhubchandani2632 4 жыл бұрын
Acha thanks
@akhilkhubchandani2632
@akhilkhubchandani2632 4 жыл бұрын
Aapka codeforces handle kya hai?
@HiteshTripathi
@HiteshTripathi 4 жыл бұрын
Channel Bio
@mukulverma8404
@mukulverma8404 4 жыл бұрын
Bro can u share the code?
@HiteshTripathi
@HiteshTripathi 4 жыл бұрын
ideone.com/HTfESf
@mukulverma8404
@mukulverma8404 4 жыл бұрын
@@HiteshTripathi thanks 👍
@jeesujain1476
@jeesujain1476 4 жыл бұрын
Broo can u give solution of B
@HiteshTripathi
@HiteshTripathi 4 жыл бұрын
Hua ni bro.....I'll try to upload.
@RakeshGupta-ft6cc
@RakeshGupta-ft6cc 4 жыл бұрын
@@HiteshTripathi Initially, find the total sum of k elements (0 to k). that will be the initial value. Then for each i=1 to z, the max right you can go will be decreased i.e it will be 0 to k-(2*i). In this range, you need to find two adjacent elements with max possible sum. There you will use all the z operations continuously. Since z operations are designed in a particular way, this will not create any problem. codeforces.com/contest/1389/submission/88324964
E001 : A Good String | Divide & Conquer | CodeNCode
15:12
CodeNCode
Рет қаралды 811
Новый уровень твоей сосиски
00:33
Кушать Хочу
Рет қаралды 4,7 МЛН
Players vs Corner Flags 🤯
00:28
LE FOOT EN VIDÉO
Рет қаралды 61 МЛН
Codeforces Educational Round 93 Screencast + Solutions (A-E)
2:48:46
Colin Galen
Рет қаралды 4,8 М.
OpenAI’s New ChatGPT: 7 Incredible Capabilities!
6:27
Two Minute Papers
Рет қаралды 102 М.
Winning Codeforces Round 971 (Div. 4) in honor of @que_tourist
1:39:42
B. Suffix Operations | Codeforces Round #688 (Div. 2) | CODEFORCES
16:27
Codeforces Round 972 (Div 2) | Video Solutions - A to E | by Gaurish Baliga | TLE Eliminators
1:22:18