569 subscribers
2 files
52 links
Here I will Share some Very good competitve Programming Tips , Contest Problem Solution and question solution from codechef and codeforces.Stay connected Share with Your Buddy.
Happy Coding
Download Telegram
#include <bits/stdc++.h>
using namespace std;
#define int long long int
bool cmp(int a,int b){
if(a>b){
return true;
}
else{
return false;
}
}
int32_t main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t;
cin>>t;
while(t--){
int a,b,c,d;
cin>>a>>b>>c>>d;
cout<<max((a+b),(c+d))<<endl;

}

}


2nd question solution
dont forget div 2 contest
1 min left
#include <bits/stdc++.h>
using namespace std;
#define int long long int
int32_t main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int k=4*n;
for(int i=1;i<=n;i++){


cout<<k<<" ";


k-=2;


}
cout<<endl;
}

return 0;
}

problem 1 solution
Code chef long challenge mai kitne question kr liye ?
Anonymous Poll
35%
2
24%
3
22%
4
5%
5
14%
Sare kar liye
Happy dewali
Happy dewali
Anonymous Poll
63%
Same 2 you
37%
Ganta ki dewali
I am really sorry guys I will post rest of solution tomorrow
Must watch editorial It will boost logical and programming skill.
Educational Codeforces Round 98 (Rated for Div. 2)
starting after 10 minute