Bro my advice to you would be - try to understand where you went wrong. Then try to realise the rationale behind it. Also you can join the discord server for doubt clearing session.
Just focus on the things you're lacking. Is it the approach? Is it the implementation? Is it the knowledge gap? Or just lack of practice of that rating problems? Many more. Figure out weaknesses and work on them. Positive delta makes you happy but negative makes you learn. Compete with yourself, not with others. Good luck
how can we think that this type of soulition !!!! ANS E for _ in range(int(input())): n=int(input()) if n%2==1: print(-1) elif (n//2)^(3*n//2)!=n: print(-1) else: print(n//2,3*n//2)
n has to be even because a ^ b = (a + b)/2 as a+b is even For remaining see the testcases My first solution was TLE when I brute force but I got some observation in that. For the test cases 10 and 36 I got answers 5, 15 and 18, 54 which is equal to 10/2, 10 + 10/2 and 36/2, 36 + 36/2. So this has to be answer if this satisfies print else -1
Bro i was trying the D) like this got wrong ans on testcase 5 can u please help why Int main() { setUpInput(); int t; cin >> t; while (t--) { ll n; cin >> n; map mp; ll arr[n]; for (ll i = 0; i < n; i++) { cin >> arr[i]; mp[arr[i]]++; } sort(arr, arr + n); ll ans = n; for (ll i = n - 1; i >= 0; i--) { if (mp[arr[i]] == 0) continue; ll curr = arr[i] - 1; while (mp[curr] > 0) { ans--; mp[curr--]--; } } cout
codeforces.com/contest/1790/submission/190892317 you can find the solution here. I'll try to make a video on this tomorrow if more people request for it. :) i hope the solution seems helpful
Bruh in E problem i just created a loop from 1.....100 and assume it as n and then specify the given conditions and from the outputs i noticed a thing and then boom it just worked and i got my solution accepted lol... is this considered fair ?? 😅
@@ADITYAKUMAR-tb4gm exactly what i described in my second comment... i checked for n from 1 to 100 and observed the following properties in these test cases...... so i didn't have any idea how this working but fortunately got AC due to low constrains
I feel like trash after watching solutions. Problems were so easy yet I was not able to solve them😞
Bro my advice to you would be - try to understand where you went wrong. Then try to realise the rationale behind it. Also you can join the discord server for doubt clearing session.
me who is only able to solve 1st 🗿
Just focus on the things you're lacking. Is it the approach? Is it the implementation? Is it the knowledge gap? Or just lack of practice of that rating problems? Many more. Figure out weaknesses and work on them. Positive delta makes you happy but negative makes you learn. Compete with yourself, not with others. Good luck
@@ADITYAKUMAR-tb4gm 💯💯💯💯💯
@@ADITYAKUMAR-tb4gm Wow! Amazing advice much needed.. Thank You :)
helpful bro keep going
Thank you, I will
bhai hum dono ka first 3 ka same code hai hai ek dum same bus variable differnt hai 😀😀😀
kisi ko btana mt bhai main tumhara hi code churake likh rha thha .. #heckkkerman! :P
@@Acodedaily Aap pro hai sir sayed maine likha hoga
@@ankitkumar-ri2oh 🤣🤣
how can we think that this type of soulition !!!! ANS E
for _ in range(int(input())):
n=int(input())
if n%2==1:
print(-1)
elif (n//2)^(3*n//2)!=n:
print(-1)
else:
print(n//2,3*n//2)
n has to be even because a ^ b = (a + b)/2 as a+b is even
For remaining see the testcases
My first solution was TLE when I brute force but I got some observation in that.
For the test cases 10 and 36 I got answers 5, 15 and 18, 54 which is equal to 10/2, 10 + 10/2 and 36/2, 36 + 36/2. So this has to be answer if this satisfies print else -1
Bro you very strong at mathematics...any suggestion how can i improve mine
bro I am not strong at maths. I am average even on a good day. but still I would suggest you to keep grinding if you think you need improvement.
Bro i was trying the D) like this got wrong ans on testcase 5 can u please help why
Int main() {
setUpInput();
int t;
cin >> t;
while (t--) {
ll n;
cin >> n;
map mp;
ll arr[n];
for (ll i = 0; i < n; i++) {
cin >> arr[i];
mp[arr[i]]++;
}
sort(arr, arr + n);
ll ans = n;
for (ll i = n - 1; i >= 0; i--) {
if (mp[arr[i]] == 0) continue;
ll curr = arr[i] - 1;
while (mp[curr] > 0) {
ans--;
mp[curr--]--;
}
}
cout
bro could you please send on discord ?
Let me go through the Solution directly!!! 🎈😡
you have mentioned round 848.... please rectify it....
Thanks for pointing out❤️
@@Acodedaily Always welcome.... Your videos are really very good....
@@saurabhkumarsingh9550 thanks a lot for the support. :)
I figured out E 1 min before contest ends. Obviously couldn't code in time. 🙃
that's great tbh!
Make video on prob f also
codeforces.com/contest/1790/submission/190892317 you can find the solution here. I'll try to make a video on this tomorrow if more people request for it. :) i hope the solution seems helpful
please improve audio quality its quite low on average vol :p
yeah I had ordered mic from amazon, they sent a defective piece so ordered again :(
In problem B, how do u make sure that r / (N - 1) wont be greater than 6?...... and also we cant put d if it greater than s - r right ?
If it's a valid testcase then it can not be greater than 6. Yeah d can be greater than s-r it has no relation with s-r
@@Acodedaily Ook fine.... thankyou
Intermediate link is not working discord
Updated the link. Thanks for letting me know🙂
Please provide timestamp
Done
Bruh in E problem i just created a loop from 1.....100 and assume it as n and then specify the given conditions and from the outputs i noticed a thing and then boom it just worked and i got my solution accepted lol... is this considered fair ?? 😅
Yeah it's fair. It's just a trick. Just make sure to check editorials afterwards so that you understand the logic too
@@Acodedaily Yup that's why i am here watching your correct explanation of this problem... Thank u sir for all these videos ❤
This can be done in O(1) Solution Code is this good??
void run() {
int n;
cin>>n;
if(n%2 == 1) {
cout1;
if(y & n) {
cout
long long n;
cin >> n;
if(n%2) cout
Great
Can you explain this solution? Why this works?
@@ADITYAKUMAR-tb4gm exactly what i described in my second comment... i checked for n from 1 to 100 and observed the following properties in these test cases...... so i didn't have any idea how this working but fortunately got AC due to low constrains
E is horrific explanations. Please do not make videos if you think you are not 100% ok with it