October Lunchtime 2020 (3h)
starts in 2d 7h 21m
Codeforces Round #680 (Div. 2, based on Moscow Team Olympiad) (2h)
starts in 3d 4h 26m
Codeforces Round #680 (Div. 1, based on Moscow Team Olympiad) (2h)
starts in 3d 4h 26m
Codeforces Round #681 (Div. 2, based on VK Cup 2019-2020 - Final) (2h)
starts in 4d 7h 56m
Codeforces Round #681 (Div. 1, based on VK Cup 2019-2020 - Final) (2h)
starts in 4d 7h 56m
SRM 793 (2h)
starts in 6d 19h 21m
Kotlin Heroes 5: ICPC Round (Practice) (168h)
starts in 7d 6h 56m
And other 1 scheduled in the next 2 weeks...
starts in 2d 7h 21m
Codeforces Round #680 (Div. 2, based on Moscow Team Olympiad) (2h)
starts in 3d 4h 26m
Codeforces Round #680 (Div. 1, based on Moscow Team Olympiad) (2h)
starts in 3d 4h 26m
Codeforces Round #681 (Div. 2, based on VK Cup 2019-2020 - Final) (2h)
starts in 4d 7h 56m
Codeforces Round #681 (Div. 1, based on VK Cup 2019-2020 - Final) (2h)
starts in 4d 7h 56m
SRM 793 (2h)
starts in 6d 19h 21m
Kotlin Heroes 5: ICPC Round (Practice) (168h)
starts in 7d 6h 56m
And other 1 scheduled in the next 2 weeks...
Reminder🔔
https://www.technicalkeeda.in/2020/10/code-chef-november-long-challenge-solution.html
do not forget to participate november long challenge
https://www.technicalkeeda.in/2020/10/code-chef-november-long-challenge-solution.html
do not forget to participate november long challenge
Technical Keeda
Codechef November long challenge solution | November long challenge solution
#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 n,x;
cin>>n>>x;
vector<int > v1;
vector<int > v2;
for(int i=0;i<n;i++){
int k;
cin>>k;
v1.push_back(k);
}
for(int i=0;i<n;i++){
int k;
cin>>k;
v2.push_back(k);
}
// sort(v1.begin(),v1.end());
sort(v2.begin(),v2.end());
int j=n-1;
bool check=true;
for(int i=0;i<n;i++){
if(v1[i]+v2[j]>x){
cout<<"NO"<<endl;
check=false;
break;
}
j--;
}
if(check){
cout<<"YES"<<endl;
}
}
}
First question solution
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 n,x;
cin>>n>>x;
vector<int > v1;
vector<int > v2;
for(int i=0;i<n;i++){
int k;
cin>>k;
v1.push_back(k);
}
for(int i=0;i<n;i++){
int k;
cin>>k;
v2.push_back(k);
}
// sort(v1.begin(),v1.end());
sort(v2.begin(),v2.end());
int j=n-1;
bool check=true;
for(int i=0;i<n;i++){
if(v1[i]+v2[j]>x){
cout<<"NO"<<endl;
check=false;
break;
}
j--;
}
if(check){
cout<<"YES"<<endl;
}
}
}
First question solution
#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
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
3rd mai TLE kis kis ka aaya ?
Anonymous Poll
48%
mera bhi TLE aaya ?
15%
maine nhi pda
38%
maine contest nhi khela
Code chef long challenge mai kitne question kr liye ?
Anonymous Poll
35%
2
24%
3
22%
4
5%
5
14%
Sare kar liye