- 107
- 60 363
Coder Hub
Pakistan
เข้าร่วมเมื่อ 21 ส.ค. 2024
This is an entertainment channel.
On this channel also you will get all Codeforces Contest Solutions free of Cost.(Only for Subscribers)
For copy paste solution during contest.
Please Support me all guys.
On this channel also you will get all Codeforces Contest Solutions free of Cost.(Only for Subscribers)
For copy paste solution during contest.
Please Support me all guys.
Codeforces Round 996 (Div. 2) || Crafting || Problem B Solution In Comments
Codeforces Round 996 (Div. 2) || Crafting || Problem B Solution In Comments
#coderhub #codeforcessolution #coderhubofficial #codeforces #python
#coderhub #codeforcessolution #coderhubofficial #codeforces #python
มุมมอง: 646
วีดีโอ
Codeforces Round 996 (Div. 2) | Two Frogs || Problem A Solution in Comments
มุมมอง 9195 วันที่ผ่านมา
Codeforces Round 996 (Div. 2) | Two Frogs || Problem A Solution in Comments #coderhub #codeforcessolution #coderhubofficial #codeforces
Leetcode Weekly Contest 431 || Find Mirror Score of a String || Q2 || Solution in C++
มุมมอง 32513 วันที่ผ่านมา
Leetcode Weekly Contest 431 || Find Mirror Score of a String || Q2 || Solution in C Leetcode Weekly Contest 431 || Find Mirror Score of a String || Q2 || Solution in C Leetcode Weekly Contest 431 || Find Mirror Score of a String || Q2 || Solution in C #coderhub #coderhubofficial
Leetcode Weekly Contest 431 || Q1 || Maximum Subarray with Equal Products || Solution in Java
มุมมอง 45513 วันที่ผ่านมา
Leetcode Weekly Contest 431 || Q1 || Maximum Subarray with Equal Products || Solution in Java #coderhub #coderhubofficial #javascript #leetcode
Codeforces Hello 2025 Solution || Problem D || Gifts Order || Coder Hub Official
มุมมอง 1.2K13 วันที่ผ่านมา
Codeforces Hello 2025 Solution || Problem D || Gifts Order || Coder Hub Official #coderhub #coderhubofficial #codeforces
Codeforces Hello 2025 Solution Of Problem A || Mex Table || By Coder Hub Official
มุมมอง 63013 วันที่ผ่านมา
Codeforces Hello 2025 Solution Of Problem A || Mex Table || By Coder Hub Official Codeforces Hello 2025 Solution Of Problem A || Mex Table || By Coder Hub Official #coderhub #coderhubofficial Solution’s Logic is max(n,m) 1
Codeforces Good Bye 2024 : 2025 is Near Bewitching Stargazer || Problem C || C++ Solution in Comment
มุมมอง 77720 วันที่ผ่านมา
Codeforces Good Bye 2024 : 2025 is Near Bewitching Stargazer || Problem C || C Solution in Comment #CoderHubOfficial #CoderHub
Codeforces Good Bye 2024 : 2025 is Near Contest Solutions Live
20 วันที่ผ่านมา
Codeforces Good Bye 2024 : 2025 is Near Contest Solutions Live #cfsol67 #coding #codefighters #problemsolving #python #problemsolving #problemssolving #codenewbie #codechefdiv3 #programming #problemssolving #CFSOL#CF_SOL
Educational Codeforces Round 172 Div. 2 || Problem B || Game with colored Marble || Solution
มุมมอง 853หลายเดือนก่อน
Educational Codeforces Round 172 Div. 2 || Problem B || Game with colored Marble || Solution If you want solution complete 600 Subscribers #CoderHubOfficial #CoderHub Educational Codeforces Round 172 Div. 2 || Problem B || Game with colored Marble || Solution
Codeforces Round 989 Div.1 + Div.2 || Problem C || Trapped in the Witch’s Labyrinth || Free Solution
มุมมอง 1.6Kหลายเดือนก่อน
Codeforces Round 989 Div.1 Div.2 || Problem C || Trapped in the Witch’s Labyrinth || Free Solution Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 Div. 2) #CoderHubOfficial #CoderHub
Codeforces Round 989 Div.1 + Div. 2 Rayan Programming Selection 2024 Problem B Raksh’s Revival
มุมมอง 781หลายเดือนก่อน
Codeforces Round 989 Div.1 Div. 2 Rayan Programming Selection 2024 Problem B Raksh’s Revival Codeforces Round 989 Div.1 Div. 2 Rayan Programming Selection 2024 Problem B Raksh’s Revival Codeforces Round 989 Div.1 Div. 2 Rayan Programming Selection 2024 Problem B Raksh’s Revival #CoderHubOfficial #CoderHub
Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 + Div. 2) Problem A 1 Code
มุมมอง 459หลายเดือนก่อน
Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 Div. 2) Problem A 1 Code Free Solution #CoderHubOfficial #CoderHub
Leetcode Weekly Contest 424 || Q2. Zero Array Transformation | Solution in C++
มุมมอง 1832 หลายเดือนก่อน
Leetcode Weekly Contest 424 || Q2. Zero Array Transformation | Solution in C #CoderHubOfficial #CoderHub
Leetcode Weekly Contest 424 || Q3. Zero Array Transformation || Free Solution
มุมมอง 4722 หลายเดือนก่อน
Leetcode Weekly Contest 424 || Q3. Zero Array Transformation || Free Solution #CoderHubOfficial #CoderHub
Leetcode Weekly Contest 424 || Q1. Make Array Elements Equal to Zero
มุมมอง 1K2 หลายเดือนก่อน
Leetcode Weekly Contest 424 || Q1. Make Array Elements Equal to Zero #CoderHubOfficial #CoderHub
it must be m+1?
Lol it was so easy explain
t = int(input()) for _ in range(t): # Read n (number of materials) n = int(input()) # Read arrays a and b a = list(map(int, input().split())) b = list(map(int, input().split())) # Process each material for i in range(n): if b[i] > a[i]: Needed = b[i] - a[i] # # for j in range(n): if i != j: # if a[j] - b[j] < Needed: # print("NO") break else: continue # break # else: print("YES")
C comes?
Give the solution B
Uploaded on my channel
Do you can to give me a problem B solution
Done b
I am select python 2 seeing run time error please told the language
hmm you can select c++
Python 3
Which language i should be select
python or c++
t = int(input()) for _ in range(t): n, a, b = map(int, input().split()) if abs(a - b) %2== 1: print("NO") else: print("YES")
I will sub
hey bro can you give me Problem B solution
Yes soon
@@CoderHubOfficial Thanks
bhai hua b ???
please give me code
next solution pls
Complete my 2k subscribers❤
could you pls provide code in comments
give code for problem b as well
Failed showing
This is a TLE code. Failed.
getting TLE on 5
Working problems of solutions 🙊✅❤🩹
❤❤❤❤❤
Oh 😂 Code’s main logic is given in description also❤❤lovely
❤❤❤❤❤Also problem B
❤❤
It's working 😂😂
Working ☺❤🩹
//B #include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { int t; cin>>t; while(t--) { int n; cin>>n; vector<pair<int,int>>vec(n); for(int i=0;i<n;i++) { cin>>vec[i].first>>vec[i].second; } string ans1=""; set<int>st; map<int,int>mp; for(int i=0;i<n;i++) { if(vec[i].first==vec[i].second) { st.insert(vec[i].first); mp[vec[i].first]++; } } vector<int>ans; for(auto it=st.begin();it!=st.end();it++) { ans.push_back(*it); } for(int i=0;i<n;i++) { int l=vec[i].first; int r=vec[i].second; if(l==r) { if(mp[l]>1) { ans1.push_back('0'); } else { ans1.push_back('1'); } continue; } int lower=lower_bound(ans.begin(),ans.end(),l)-ans.begin(); int upper=lower_bound(ans.begin(),ans.end(),r+1)-ans.begin(); int len=(upper-1)-lower+1; if(len==r-l+1) { ans1.push_back('0'); } else { ans1.push_back('1'); } } cout<<ans1<<endl; } return 0; }
//c #include <bits/stdc++.h> using namespace std; pair<long long, int> computeLucky(long long left, long long right, int threshold) { if (right - left + 1 < threshold) { return {0, 0}; } if (right - left + 1 == 1) { return {left, 1}; } long long mid = left + (right - left) / 2; if ((right - left + 1) % 2) { pair<long long, int> leftResult = computeLucky(left, mid - 1, threshold); long long totalLucky = mid + 2 * leftResult.first + mid * leftResult.second; int totalSegments = 2 * leftResult.second + 1; return {totalLucky, totalSegments}; } else { pair<long long, int> leftResult = computeLucky(left, mid, threshold); long long totalLucky = 2 * leftResult.first + mid * leftResult.second; int totalSegments = 2 * leftResult.second; return {totalLucky, totalSegments}; } } int main() { ios::sync_with_stdio(false); cin.tie(NULL); int test_cases; cin >> test_cases; while (test_cases--) { long long n, k; cin >> n >> k; pair<long long, int> result = computeLucky(1, n, k); cout << result.first << " "; } return 0; }
Hi, what was the intuition behind the solution is it a normal maths theory question ?
pls sent show all code
If you want solution in Comments then complete 600 Subscribers Before contest ends😊
bro already subscribed bro plz send the code
Hello
Plz send the code in description
is it correct ??? bro give me the code in comments
q4. minimize the maximum adjacent element difference Please share this 🙏
class Solution { public: bool simulate(vector<int> nums, int curr, int direction) { int n = nums.size(); while (curr >= 0 && curr < n) { if (nums[curr] == 0) { curr += direction; } else { nums[curr]--; direction = -direction; curr += direction; } } for (int x : nums) { if (x != 0) return false; } return true; } int countValidSelections(vector<int>& nums) { int validCount = 0; int n = nums.size(); for (int i = 0; i < n; i++) { if (nums[i] > 0) { if (simulate(nums, i, 1)) { validCount++; } if (simulate(nums, i, -1)) { validCount++; } } } return validCount; } };
bro pls give code
bro pls give code
code
c plz
please give bro
anuone sol a
i got b
Please give sol for A 🙏
Please give sol for A 🙏
Give a please
Code send
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; #define pn cout << "NO "; #define py cout << "YES "; // Function to reduce a string by replacing "ab" with "a" string processString(const string &s) { string reduced; for(char c : s) { reduced += c; // Check if the last two characters are 'a' followed by 'b' if(reduced.size() >= 2 && reduced[reduced.size() - 2] == 'a' && reduced[reduced.size() - 1] == 'b') { // Replace "ab" with "a" reduced.pop_back(); // Remove 'b' // 'a' remains, so no need to pop 'a' } } return reduced; } void solve() { ll n, m; cin >> n >> m; string s, t; cin >> s >> t; string a = processString(s); string b = processString(t); // cout << a << endl; if (a.size() != b.size()) { pn; return; } for (int i = 0; i < min(a.size(), b.size()); i++) { if (a[i] != b[i]) { pn; return; } } py; return; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; while (t--) { solve(); } return 0; }
brother comments me solution dal do !!!
A