uk
Feedback
Codeforces|Leetcode|Codechef free solutions

Codeforces|Leetcode|Codechef free solutions

Відкрити в 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.

Показати більше
4 317
Підписники
Немає даних24 години
-137 днів
-5230 день
Архів дописів
After 4280+ subscribers I will upload c for free

Codechef B 😁😁

// #pragma GCC optimize("O3") // #pragma GCC optimize("Ofast") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <class T> using o_set =     tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; // order_of_key (val): returns the no. of values less than val // find_by_order (k): returns the kth largest element.(0-based) #define int long long typedef pair<int, int> II; typedef vector<II> VII; typedef vector<int> VI; typedef vector<VI> VVI; typedef long long LL; #define PB push_back #define F first #define S second #define ALL(a) a.begin(), a.end() #define SET(a, b) memset(a, b, sizeof(a)) #define SZ(a) (int)(a.size()) #define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i) #define fast_io                                                                \     ios_base::sync_with_stdio(false);                                          \     cin.tie(NULL) #define deb(a) cerr << #a << " = " << (a) << endl; #define deb1(a)                                                                \     cerr << #a << " = [ ";                                                     \     for (auto it = a.begin(); it != a.end(); it++)                             \         cerr << *it << " ";                                                    \     cerr << "]\n"; #define endl "\n" const long long mod = 1e9 + 7; void solve() {     int n, c;     cin >> n >> c;     vector<int> a(n);     FOR(i, 0, n) { cin >> a.at(i); }     VI bad(n, 0);     bad[0] = 1;     auto check = [&]() {         int prod = 0;         FOR(i, 0, n) {             if (bad[i] == 0)                 continue;             FOR(j, 0, n) {                 if (bad[j] == 0)                     prod += a[i] * a[j];             }         }         if (prod <= c)             return true;         return false;     };     if (check())         cout << 1 << endl;     else {         int sz = 1;         while (sz < n) {             int mi = -1;             FOR(i, 0, n) {                 if (bad[i] == 0 && (mi == -1 || a[i] > a[mi]))                     mi = i;             }             bad[mi] = 1;             sz++;             if (check()) {                 cout << sz << endl;                 return;             }         }     } } signed main() {     fast_io;     //  freopen("input.txt", "r", stdin);     //  freopen("output.txt", "w", stdout);     int totalTests = 1;     cin >> totalTests;     for (int testNo = 1; testNo <= totalTests; testNo++) {         // cout << "Case #" << testNo << ": ";         solve();     }     return 0; }

Upon 4275+ subscribers I will upload b for free

React krdo guys

Today I will upload codechef free solutions🥳🥳

Today's Nielson slot done✅✅✅
Today's Nielson slot done✅✅✅

Dm me for willey edge slots

Maq slots available Dm @Cpsoln

Oracle slot available Dm @Cpsoln

De shaw 2nd code done

De shaw codes available Dm @Cpsoln

Amex slots available Dm @Cpsoln

DE shaw slots available Dm @Cpsoln

Ibm slots available Dm @Cpsoln

Dm @Cpsoln for any coding round Tomorrow I am free all day Will do you oa 😊

Flipkart codes available Dm @Cpsoln

Phone pay oa slots available Dm @Cpsoln

React krdo guys Motivation milega 😊

Codeforces D 🥳🥳🥳🥳🥳 Enjoy guys🥳🥳😁😁