Codeforces Round 808 Division 2 | Problem B : Difference Of GCDs Solutions | In Hindi | Editorial

  Рет қаралды 2,908

Coding Community | Newton School

Coding Community | Newton School

Күн бұрын

Пікірлер: 38
@girishbhargava6367
@girishbhargava6367 2 жыл бұрын
Brother, you explain the best. Please carry on with this amazing initiative.
@amimultamim9893
@amimultamim9893 11 күн бұрын
awesome explanation. Thanks a lot.
@U2011-n7w
@U2011-n7w Жыл бұрын
nice explanation bhaiya i am not able to solve 1100 rating problem even after solving 50 problems of 1100-1200 rating ? Pls tell what should i do since i am in my final year so i am only able to solve one problem daily
@saurabh.gupta22
@saurabh.gupta22 7 ай бұрын
Good Explanation
@ashishkumaryadav5252
@ashishkumaryadav5252 2 жыл бұрын
Thanks sir, expected same.
@ashishkumaryadav5252
@ashishkumaryadav5252 2 жыл бұрын
If possible please provide solution for C also.
@anishpatil3541
@anishpatil3541 2 жыл бұрын
Very Nice explaination
@mridul1075
@mridul1075 2 жыл бұрын
nice expln as always..thankyou for fast editorial
@amanbhadani8840
@amanbhadani8840 2 жыл бұрын
Best explanation
@Digital-Inception
@Digital-Inception 2 жыл бұрын
Thank you, brother.
@champion5946
@champion5946 2 жыл бұрын
Elements in the array can be duplicate ? We only need diffrent gcd
@chiragkulshrestha4033
@chiragkulshrestha4033 2 жыл бұрын
Yeah
@shyambonde4577
@shyambonde4577 2 жыл бұрын
Thanku sir, plz provide editorial of question a and c
@codingcommunitynewtonschoo8582
@codingcommunitynewtonschoo8582 2 жыл бұрын
C is uploaded.
@sahilanand30
@sahilanand30 2 жыл бұрын
🔥
@prabhavdobhal7877
@prabhavdobhal7877 2 жыл бұрын
can anyone tell me that freaking 1081st token pls
@mithileshkumar9653
@mithileshkumar9653 2 жыл бұрын
in first else statement it should be j = l%i instead of j/i ?
@codingcommunitynewtonschoo8582
@codingcommunitynewtonschoo8582 2 жыл бұрын
No it will be l/i only. l%i is only to check whether it divides perfectly or not. If not then j=(j+1)*i in the next step which means the next higher multiple. I hope you got the point.
@ghosthunternotclickbaitaka1997
@ghosthunternotclickbaitaka1997 2 жыл бұрын
in one of the cases will we not push more than once?(violating the unique condition)? like if my l=10 so in beginnning we push l (10,....) now inside loop we go to first if condition saying (l%i==0) so 10%2==0 so we again push l so (10,10...)?
@codingcommunitynewtonschoo8582
@codingcommunitynewtonschoo8582 2 жыл бұрын
Ai doesn't need to be necessarily unique. Elements can be repeated in array A. gcd(i, Ai) needs to be unique. I hope you got the point.
@ghosthunternotclickbaitaka1997
@ghosthunternotclickbaitaka1997 2 жыл бұрын
@@codingcommunitynewtonschoo8582 oh yes 😅 i understand now..
@ghosthunternotclickbaitaka1997
@ghosthunternotclickbaitaka1997 2 жыл бұрын
@@codingcommunitynewtonschoo8582 thanks
@angryprogrammer7788
@angryprogrammer7788 Жыл бұрын
@@codingcommunitynewtonschoo8582 isn't gcd of (i,ai) always guaranteed to be unique?
@emanmohsen3493
@emanmohsen3493 2 жыл бұрын
can you add subtitel plz to make defirant people understand you
@Selim_Hasan_Raj
@Selim_Hasan_Raj 2 жыл бұрын
Do you teach in English? I am from Bangladesh.
@aryangupta2051
@aryangupta2051 2 жыл бұрын
Search Ended here, whiteboard ,clean hindi explanation
@stunnerhash
@stunnerhash 2 жыл бұрын
C ka editorial
@deepakjoshi4318
@deepakjoshi4318 2 жыл бұрын
Can you please tell me why it is giving WA for test case 2 ArrayListans=new ArrayList(); ans.add(l); int c=1; for(int i=2;i=l && val
@codingcommunitynewtonschoo8582
@codingcommunitynewtonschoo8582 2 жыл бұрын
Try taking long instead of int.
@roshangeorge97
@roshangeorge97 3 ай бұрын
int val=(1+mul)*i;
@SaurabhKumar-kn1qc
@SaurabhKumar-kn1qc 2 жыл бұрын
Since there is simple clear that i should be multiple of a[i],can't we do a simple check a number between l and r to be divisible by i and simply print it.... Eg. #include using ll = long long; using namespace std; int main() { int t; cin >> t; while(t--){ ll n,l,r;int f=0; cin >> n >> l >> r; vectorv; if(r-l+1 < n){ f=1; } else{ ll c=1; for(ll i=l;i
@codingcommunitynewtonschoo8582
@codingcommunitynewtonschoo8582 2 жыл бұрын
I have not gone into details of your approach but one mistake here which I can see is for loop from l to r will give time limit exceeded. You can't use a for loop for that, you need to find in constant time as I have shown.
@SaurabhKumar-kn1qc
@SaurabhKumar-kn1qc 2 жыл бұрын
@@codingcommunitynewtonschoo8582 thankyou so much for replying...i ve not expected that... Thankyou so much for clearing my doubt...
@prakharjain1228
@prakharjain1228 2 жыл бұрын
bhaiya yeh code mene contest ke time submit kiya tha , logic same hai aapki tareh par phir bhi galat aa rha hai Aap bata sakte exactly kidhar galat jaa rha hun. here is my code // code by Prakhar Jain #include using namespace std; #define ll long long #define no coutr){ f=1; break; } v.pb(l+d); } if((r-l+1
@KaranMashru
@KaranMashru 2 жыл бұрын
Code : #include using namespace std; #define ll long long int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ll t, n, l, r, i, j, c; cin>>t; for(;t--;) { cin>>n>>l>>r; vector ans; c=1; ans.push_back(l); for(i=2; i=l && j
@AtulKumar-xh2gb
@AtulKumar-xh2gb 2 жыл бұрын
c editorial please
@UR0Cristiano
@UR0Cristiano 2 жыл бұрын
What if it is given that elements of array should be distinct?
Codeforces Round 808 Division 2 | Problem C : Doremy's IQ Solutions | In Hindi | Editorial
20:52
Coding Community | Newton School
Рет қаралды 1,8 М.
Codeforces Round 811 Div 3 | Problem E : Add Modulo 10 Solution | In Hindi | Editorial | Coding
15:37
怎么能插队呢!#火影忍者 #佐助 #家庭
00:12
火影忍者一家
Рет қаралды 29 МЛН
Yay, My Dad Is a Vending Machine! 🛍️😆 #funny #prank #comedy
00:17
"كان عليّ أكل بقايا الطعام قبل هذا اليوم 🥹"
00:40
Holly Wolly Bow Arabic
Рет қаралды 11 МЛН
Synyptas 4 | Арамызда бір сатқын бар ! | 4 Bolim
17:24
Recover an RBS || Codeforces Educational Round 132 Div2 Problem C
16:52
Competitive Coding - Newton School
Рет қаралды 4,2 М.
Codeforces Round #808 (Div. 2) Editorial - Problems A,B,C,D
36:01
Programming Club IITM
Рет қаралды 3,6 М.
Min-Max Array Transformation || Codeforces Educational Round 134 Div2 Problem C
19:57
Competitive Coding - Newton School
Рет қаралды 4,2 М.
Awoo's Favorite Problem || Codeforces Educational Round 130 Div2 Problem C
14:24
Competitive Coding - Newton School
Рет қаралды 7 М.
Codeforces Round 793 (Div-2) | Solutions | A-B-C-D
42:25
Naman Bansal
Рет қаралды 5 М.
Codeforces Round 816 Div 2 | Problem B : Beautiful Array Solution | InHindi | Explanation + Code
12:41
Mark and Lightbulbs || Codeforces Round 807 Div2 Problem D
16:06
Competitive Coding - Newton School
Рет қаралды 4,9 М.
怎么能插队呢!#火影忍者 #佐助 #家庭
00:12
火影忍者一家
Рет қаралды 29 МЛН