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 more4 317
Subscribers
No data24 hours
-137 days
-5230 days
Posts Archive
B , cpp 17
#include <bits/stdc++.h>
using namespace std;
int find(int x,int y, int n){
x--;y--;
x = min(x, n-x-1);
y = min(y, n-y-1);
return min(x,y);
}
int main(){
int t,n,x1,y1,x2,y2;
cin>>t;
while(t--){
cin>>n>>x1>>y1>>x2>>y2;
cout<<abs(find(x1,y1,n) - find(x2,y2,n))<<"\n";
}
return 0;
}
Code for A python 3
def ii():
return int(input())
def ai():
return [int(x) for x in input().strip().split()]
for _ in range(ii()):
n,d = ai()
s = input().strip()
ans = ''
done = False
for i in s:
# print(i,ans,done)
if int(i) >= d or (done):
ans += i
else:
ans += str(d)
ans += i
done = True
if not done:
ans += str(d)
print(ans)
https://t.me/CRICKET_BETTING_TIPS_IPL12
Join this channel if you want correct predictions of IPL and correct Dream 11 team
class Solution {
public:
int minNumber(vector& nums1, vector& nums2) {
sort(nums1.begin(),nums1.end());
sort(nums2.begin(),nums2.end());
vector::iterator it;
for(int i=0;i
Today's leetcode solutions will be available for free
So subscribe the channel
Contact me before your coding round and book your slot
100% solutions guaranteed 🔥🔥🔥🔥🔥
‼️‼️‼️‼️‼️‼️‼️‼️‼️‼️
Solution for all companies will be available
🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁
Get a special discount
Dm @Cpsoln
‼️‼️‼️‼️‼️‼️‼️‼️‼️‼️‼️‼️
Don't trust on other telegram channels they will take money and block you
A
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD 1000000007
#define SIZE 1e6+2
#define endl "\n"
void solve(){
string s; cin>>s;
map<char,ll>mp;
for(auto x: s) mp[x]++;
ll sz=mp.size();
if(sz==4 or sz==3) cout<<4<<endl;
else if(sz==1) cout<<-1<<endl;
else{
for(auto x: mp){
if(x.second==3) {
cout<<6<<endl;
return;
}
}
cout<<4<<endl;
}
}
int main(){
ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
ll t; cin>>t;
while(t--){
solve();
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD 1000000007
#define SIZE 1e6+2
#define endl "\n"
void solve(){
ll n; cin>>n;
ll ans = sqrtl(n-1);
cout<<ans<<endl;
}
int main(){
ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
ll t; cin>>t;
while(t--){
solve();
}
return 0;
}
How many coding questions you have solved in Hyland coding round?
How many of you got Hyland test link for intern role?
Register yourself in the given link and attend the sessions.
https://rb.gy/5yh6ji
You will be also certified for the session.
If anyone needs help in Hyland coding round then dm @Cpsoln
