en
Feedback
Codeforces|Leetcode|Codechef free solutions

Codeforces|Leetcode|Codechef free solutions

Open in Telegram

Free codeforces, Codechef, Leetcode solutions are available 😍😍😍😍😍😍 Helped More than 200+ students to crack coding round in 2022 and helped placed them in Good companies. 🥳🥳🥳🤩🤩🤩 Dm @Cpsoln if you want help in coding round.

Show more
4 317
Subscribers
No data24 hours
-137 days
-5230 days
Posts Archive
If anyone having Cisco exam today dm @Cpsoln to book the slot

If you refer your friends for OA you will get 50Rs discount Dm @Cpsoln

If you want in Amazon elevate Dm @Cpsoln

Since your placement and intern session is coming 🤓🤓 So don't miss any opportunity in this recession😇😇😇😇 📌📌📌📌📌📌📌
+2
Since your placement and intern session is coming 🤓🤓 So don't miss any opportunity in this recession😇😇😇😇 📌📌📌📌📌📌📌📌📌📌📌📌 No scam No fraud because we are not like other telegram channels. If you want help in coding round of any company then Dm @Cpsoln and book your slot ✅✅✅✅

#include <iostream> #include <vector> #include <string> using namespace std; int main() { int t; cin >> t; while (t > 0) { string s; cin >> s; vector<vector<int>> pos(10); vector<int> idx(10, 0); for (int i = 0; i < s.length(); i++) { int digit = s[i] - '0'; pos[digit].push_back(i); } int m; cin >> m; string lr, rr; cin >> lr >> rr; int cpos = 0; for (int i = 0; i < m; i++) { for (int j = 0; j < 10; j++) { while (idx[j] < pos[j].size() && pos[j][idx[j]] < cpos) { idx[j]++; } } int pck = cpos; for (int j = lr[i] - '0'; j <= rr[i] - '0'; j++) { if (idx[j] >= pos[j].size()) { pck = s.length(); } else { pck = max(pck, pos[j][idx[j]]); } } cpos = pck + 1; } if (cpos >= s.length() + 1) { cout << "YES" << endl; } else { cout << "NO" << endl; } t--; } return 0; }

Share the channel guys

Codeforces C guys❤❤❤❤🤩🤩

#include <iostream> #include <vector> #include <string> using namespace std; int main() { int t; cin >> t; while (t > 0) { string s; cin >> s; vector<vector<int>> pos(10); vector<int> idx(10, 0); for (int i = 0; i < s.length(); i++) { int digit = s[i] - '0'; pos[digit].push_back(i); } int m; cin >> m; string lr, rr; cin >> lr >> rr; int cpos = 0; for (int i = 0; i < m; i++) { for (int j = 0; j < 10; j++) { while (idx[j] < pos[j].size() && pos[j][idx[j]] < cpos) { idx[j]++; } } int pck = cpos; for (int j = lr[i] - '0'; j <= rr[i] - '0'; j++) { if (idx[j] >= pos[j].size()) { pck = s.length(); } else { pck = max(pck, pos[j][idx[j]]); } } cpos = pck + 1; } if (cpos >= s.length() + 1) { cout << "YES" << endl; } else { cout << "NO" << endl; } t--; } return 0; }

C is coming soon🔥🔥🔥🔥🔥

No one has done C till now so don't buy from anyone

#include <bits/stdc++.h> #define ll long long #define endl '\n' using namespace std; vector < int > adj[10001]; bool g[10001][10001]; int color[10001]; const int MAXN = 105; ull t; void solve() { int ax , ay , bx , by , cx , cy; cin >> ax >> ay >> bx >> by >> cx >> cy; int ans = 1; if((bx < ax and cx < ax) or (bx > ax and cx > ax)) { ans += min(abs(bx - ax) , abs(cx - ax)); } if((by < ay and cy < ay) or (by > ay and cy > ay)) { ans += min(abs(by - ay) , abs(cy - ay)); } cout << ans << endl; } int main() { int t; cin >> t; while(t--) { solve(); } }

After 4.5k subscribers I will upload C in the channel 😊😊😊

Codeforces B 🥳🥳🥳

int ax, ay, bx, by, cx, cy; cin >> ax >> ay >> bx >> by >> cx >> cy; int ans = 1; if ((bx < ax and cx < ax) or (bx > ax and cx > ax)) ans += min(abs(bx - ax), abs(cx - ax)); if ((by < ay and cy < ay) or (by > ay and cy > ay)) ans += min(abs(by - ay), abs(cy - ay)); cout << ans << endl;

Don't buy solutions guys if you are getting for free

Codeforces A🥳🥳🥳🥳

void solve() {     ll n, k, x;     cin >> n >> k >> x;     if (x != 1)     {         cout << "YES" << nline;         cout << n << nline;         for (int i = 1; i < n + 1; i++)         {             cout << 1 << " ";         }         cout << nline;         return;     }     if (n == 1 || k <= 1)     {         cout << "NO" << nline;         return;     }     if (n % 2 == 0)     {         cout << "YES" << nline;         cout << n / 2 << nline;         for (int i = 1; i <= n / 2; i++)         {             cout << 2 << " ";         }         cout << nline;         return;     }     if (k > 2)     {         cout << "YES" << nline;         cout << (n - 3) / 2 + 1 << nline;         for (int i = 1; i <= (n - 3) / 2; i++)         {             cout << 2 << " ";         }         cout << 3;         cout << nline;         return;     }     cout << "NO" << nline; }