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
#include <iostream>
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int test;
cin>>test;
while(test--){
int n;
cin>>n;
int count=0;
int a[n];
for(auto &x:a){
cin>>x;
count+=x;
}
if(n%2==1){
if(count%2==1){
cout<<"chef"<<endl;
}
else{
cout<<"chefina"<<endl;
}
}
else{
int x = *min_element(a,a+n);
if(x==1){
cout<<"chef"<<endl;
continue;
}
// count-=2*n;
if(count%2==0&&x%2==0){
cout<<"chefina"<<endl;
}
else{
cout<<"chef"<<endl;
}
}
}
return 0;
}
Repost from Codeforces|Leetcode|Codechef free solutions
Don't buy solutions from anyone and don't waste your money bcozz in these channel you will get free codes😁😁🥳🥳❤
Share the channel among your friends
#include <iostream>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int x;
cin >> x;
bool found_triplet = false;
for (int a = 1; a <= x; a++) {
for (int b = 1; b <= x; b++) {
int c = x - a*b;
if (c >= 1 && c <= x) {
cout << a << " " << b << " " << c << "\n";
found_triplet = true;
break;
}
}
if (found_triplet) {
break;
}
}
if (!found_triplet) {
cout << "-1\n";
}
}
return 0;
}
Inversion of subsegment
Abhi bahot kuch ane wala hai guys jo channel ko subscribe krke rakhna nhi toh bahot kuch miss kardoge
#include <iostream>
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int test;
cin>>test;
while(test--){
int x,y;
cin>>x>>y;
if(x*x==2*y){
cout<<"yes"<<endl;
}
else{
cout<<"no"<<endl;
}
}
return 0;
}
Repost from Codeforces|Leetcode|Codechef free solutions
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 ✅✅✅✅
Don't buy solutions from anyone and don't waste your money bcozz in these channel you will get free codes😁😁🥳🥳❤
Share the channel among your friends
#include <iostream>
using namespace std;
int round(int n)
{
int a = (n / 10) * 10;
int b = a + 10;
return (n - a > b - n)? b : a;
}
int main() {
int t;
cin>>t;
while(t--){
int x;
cin>>x;
cout<<round(100-x)<<endl;
}
return 0;
}
