Brother, you explain the best. Please carry on with this amazing initiative.
@amimultamim989311 күн бұрын
awesome explanation. Thanks a lot.
@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.gupta227 ай бұрын
Good Explanation
@ashishkumaryadav52522 жыл бұрын
Thanks sir, expected same.
@ashishkumaryadav52522 жыл бұрын
If possible please provide solution for C also.
@anishpatil35412 жыл бұрын
Very Nice explaination
@mridul10752 жыл бұрын
nice expln as always..thankyou for fast editorial
@amanbhadani88402 жыл бұрын
Best explanation
@Digital-Inception2 жыл бұрын
Thank you, brother.
@champion59462 жыл бұрын
Elements in the array can be duplicate ? We only need diffrent gcd
@chiragkulshrestha40332 жыл бұрын
Yeah
@shyambonde45772 жыл бұрын
Thanku sir, plz provide editorial of question a and c
@codingcommunitynewtonschoo85822 жыл бұрын
C is uploaded.
@sahilanand302 жыл бұрын
🔥
@prabhavdobhal78772 жыл бұрын
can anyone tell me that freaking 1081st token pls
@mithileshkumar96532 жыл бұрын
in first else statement it should be j = l%i instead of j/i ?
@codingcommunitynewtonschoo85822 жыл бұрын
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.
@ghosthunternotclickbaitaka19972 жыл бұрын
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...)?
@codingcommunitynewtonschoo85822 жыл бұрын
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.
@ghosthunternotclickbaitaka19972 жыл бұрын
@@codingcommunitynewtonschoo8582 oh yes 😅 i understand now..
@ghosthunternotclickbaitaka19972 жыл бұрын
@@codingcommunitynewtonschoo8582 thanks
@angryprogrammer7788 Жыл бұрын
@@codingcommunitynewtonschoo8582 isn't gcd of (i,ai) always guaranteed to be unique?
@emanmohsen34932 жыл бұрын
can you add subtitel plz to make defirant people understand you
@Selim_Hasan_Raj2 жыл бұрын
Do you teach in English? I am from Bangladesh.
@aryangupta20512 жыл бұрын
Search Ended here, whiteboard ,clean hindi explanation
@stunnerhash2 жыл бұрын
C ka editorial
@deepakjoshi43182 жыл бұрын
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
@codingcommunitynewtonschoo85822 жыл бұрын
Try taking long instead of int.
@roshangeorge973 ай бұрын
int val=(1+mul)*i;
@SaurabhKumar-kn1qc2 жыл бұрын
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
@codingcommunitynewtonschoo85822 жыл бұрын
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-kn1qc2 жыл бұрын
@@codingcommunitynewtonschoo8582 thankyou so much for replying...i ve not expected that... Thankyou so much for clearing my doubt...
@prakharjain12282 жыл бұрын
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
@KaranMashru2 жыл бұрын
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-xh2gb2 жыл бұрын
c editorial please
@UR0Cristiano2 жыл бұрын
What if it is given that elements of array should be distinct?