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 день
Архів дописів
#include <iostream> #include<bits/stdc++.h> #define int long long using namespace std; #define pb push_back void sol(){ int n,e; cin>>n>>e; vector<int> v(n); for(auto &val:v) cin>>val; v[0]+=e; int ind = 0,m = v[0]; for(int i = 0;i<v.size();i++){    if(m<v[i]){      m = v[i];      ind = i;    } } int pre = 0; vector<int> ans; for(auto i = 0;i<v.size();i++){    int val = v[i];    pre+=val;    if(i==ind){      ans.push_back(0);    }    else{           if(pre>=m){        ans.push_back(i);      }      else{        ans.push_back(i+1);      }         }       } for(auto &val:ans){    cout<<val<<" "; } cout<<endl;   return; } signed main() {     int test;   cin>>test;   while(test--){     sol();   }        return 0; }

New target 🎯 Will share D on 4215+ subscribers😁

Share this channel with your friends will upload more free codes in the channel😊😊

Codeforces C 🥳🥳🥳🥳 Made my promise😁

#include <iostream> #include<bits/stdc++.h> #define int long long using namespace std; #define pb push_back void sol(){ int n,k; cin>>n>>k; vector<int> ans; int sum = 0; for(int i = 1;i<=n;i++){    sum+=abs(i - (n-i+1));    ans.push_back(i);   // cout<<i<<endl; } if(k%2==1||sum<k){    cout<<"NO"<<endl; } else{    cout<<"YES"<<endl;    int ind = 0;    int N = n;    while((k)>(N-1)*2){     // cout<<k<<" "<<ind<<endl;      swap(ans[ind],ans[n-ind-1]);      k-=(N-1)*2;      N-=2;      ind++;    }          k/=2;       swap(ans[ind],ans[ind+k]);          int cal = 0;    for(auto i = 0;i<ans.size();i++){      cal+=abs(ans[i] - i-1);      cout<<ans[i]<<" ";    }    cout<<endl;   // cout<<cal<<endl;    }   return; } signed main() {     int test;   cin>>test;   while(test--){     sol();   }        return 0; }

After 4180+ subscribers I will upload C

Codeforces B 😊

#include <iostream> #include<bits/stdc++.h> #define int long long using namespace std; #define pb push_back void sol(){ int n,a,b; cin>>n>>a>>b; if(b<a){    cout<<n*a<<endl; } else{        int x = min(n,b - a);     int y = n - x;     int c = b-x;         int ans = y*a + (b*(b+1)/2) - (c*(c+1)/2);         cout<<ans<<endl;        }   return; } signed main() {     int test;   cin>>test;   while(test--){     sol();   }        return 0; }

Today's ukg slot done ✅✅✅
Today's ukg slot done ✅✅✅

Juspay slots available Dm @Cpsoln

Dm @Cpsoln for ukg help.

Wiley edge slots available Dm @Cpsoln fast

Dm me today for any oa slots, today I am free for any coding rounds.

Novago slots available Dm @Cpsoln

Arcesium slots available Dm @Cpsoln

Wiley edge slots available Dm @Cpsoln

Today's JPMC slot done ✅✅✅
Today's JPMC slot done ✅✅✅

Oracle both code done ✅✅✅

Code with cisco slots available Dm @Cpsoln

Willey slots available Dm @Cpsoln