Vlad and Unfinished Business Codeforces Solution:-
https://bit.ly/3Fm8wm5
https://bit.ly/3Fm8wm5
Alternating Diameter CodeChef Solution :-
https://bit.ly/3KPPAxr
https://bit.ly/3KPPAxr
Sugarcane Juice Business CodeChef Solution :-
https://bit.ly/384Wj9w
https://bit.ly/384Wj9w
DISCUSS YOUR SOLUTIONS HERE :-
๐๐๐๐๐๐๐
https://bit.ly/3k3J3UY
https://bit.ly/3k3J3UY
๐๐๐๐๐๐๐
https://bit.ly/3k3J3UY
https://bit.ly/3k3J3UY
Programming Coding Contest:
Football Cup CodeChef Solution:-
https://bit.ly/3OVafTU
The Magical Stone CodeChef Solution:-
https://bit.ly/3sfP1q6
Alternating Diameter CodeChef Solution :-
https://bit.ly/3KPPAxr
Mystical Numbers CodeChef Solution:-
https://bit.ly/390zRyp
Pushpa CodeChef Solution :-
https://bit.ly/3FtwbRN
Sugarcane Juice Business CodeChef Solution :-
https://bit.ly/384Wj9w
Miami GP CodeChef Solution :-
https://bit.ly/37kQDYn
The Attack of Queen CodeChef Solution :-
https://bit.ly/3kMUzV0
Football Cup CodeChef Solution:-
https://bit.ly/3OVafTU
The Magical Stone CodeChef Solution:-
https://bit.ly/3sfP1q6
Alternating Diameter CodeChef Solution :-
https://bit.ly/3KPPAxr
Mystical Numbers CodeChef Solution:-
https://bit.ly/390zRyp
Pushpa CodeChef Solution :-
https://bit.ly/3FtwbRN
Sugarcane Juice Business CodeChef Solution :-
https://bit.ly/384Wj9w
Miami GP CodeChef Solution :-
https://bit.ly/37kQDYn
The Attack of Queen CodeChef Solution :-
https://bit.ly/3kMUzV0
Programming Coding Contest pinned ยซDISCUSS YOUR SOLUTIONS HERE :- ๐๐๐๐๐๐๐ https://bit.ly/3k3J3UY https://bit.ly/3k3J3UYยป
Prof. Slim Codeforces Solution :-
https://bit.ly/3MXteeI
Dorms War Codeforces Solution :-
https://bit.ly/3vQ3nQn
Where is the Pizza? Codeforces Solution :-
https://bit.ly/37lmGrc
Very Suspicious Codeforces Solution :-
https://bit.ly/3MTA70G
Hemose on the Tree Codeforces Solution :-
https://bit.ly/3kKqZzq
Jee, You See? Codeforces Solution :-
https://bit.ly/3P51pmu
https://bit.ly/3MXteeI
Dorms War Codeforces Solution :-
https://bit.ly/3vQ3nQn
Where is the Pizza? Codeforces Solution :-
https://bit.ly/37lmGrc
Very Suspicious Codeforces Solution :-
https://bit.ly/3MTA70G
Hemose on the Tree Codeforces Solution :-
https://bit.ly/3kKqZzq
Jee, You See? Codeforces Solution :-
https://bit.ly/3P51pmu
Programming Coding Contest:
Football Cup CodeChef Solution:-
https://bit.ly/3OVafTU
The Magical Stone CodeChef Solution:-
https://bit.ly/3sfP1q6
Alternating Diameter CodeChef Solution :-
https://bit.ly/3KPPAxr
Mystical Numbers CodeChef Solution:-
https://bit.ly/390zRyp
Pushpa CodeChef Solution :-
https://bit.ly/3FtwbRN
Sugarcane Juice Business CodeChef Solution :-
https://bit.ly/384Wj9w
Miami GP CodeChef Solution :-
https://bit.ly/37kQDYn
The Attack of Queen CodeChef Solution :-
https://bit.ly/3kMUzV0
Football Cup CodeChef Solution:-
https://bit.ly/3OVafTU
The Magical Stone CodeChef Solution:-
https://bit.ly/3sfP1q6
Alternating Diameter CodeChef Solution :-
https://bit.ly/3KPPAxr
Mystical Numbers CodeChef Solution:-
https://bit.ly/390zRyp
Pushpa CodeChef Solution :-
https://bit.ly/3FtwbRN
Sugarcane Juice Business CodeChef Solution :-
https://bit.ly/384Wj9w
Miami GP CodeChef Solution :-
https://bit.ly/37kQDYn
The Attack of Queen CodeChef Solution :-
https://bit.ly/3kMUzV0
DISCUSS YOUR SOLUTIONS HERE :-
๐๐๐๐๐๐๐
https://bit.ly/3k3J3UY
https://bit.ly/3k3J3UY
๐๐๐๐๐๐๐
https://bit.ly/3k3J3UY
https://bit.ly/3k3J3UY
Tokitsukaze and All Zero Sequence Codeforces Solution:-
https://bit.ly/3FpmiEP
[Solution] Tokitsukaze and Good 01-String:-
https://bit.ly/3P3dNnh
[Solution] Tokitsukaze and Good 01-String (hard version):-
https://bit.ly/3ysgetP
Tokitsukaze and Strange Inequality Codeforces Solution:-
https://bit.ly/38Zj4vu
Tokitsukaze and Meeting Codeforces Solution:-
https://bit.ly/3M06ACs
Tokitsukaze and Two Colorful Tapes Codeforces Solution:-
https://bit.ly/3wcLhXD
Tokitsukaze and Permutations Codeforces Solution:-
https://bit.ly/3MWn2DR
https://bit.ly/3FpmiEP
[Solution] Tokitsukaze and Good 01-String:-
https://bit.ly/3P3dNnh
[Solution] Tokitsukaze and Good 01-String (hard version):-
https://bit.ly/3ysgetP
Tokitsukaze and Strange Inequality Codeforces Solution:-
https://bit.ly/38Zj4vu
Tokitsukaze and Meeting Codeforces Solution:-
https://bit.ly/3M06ACs
Tokitsukaze and Two Colorful Tapes Codeforces Solution:-
https://bit.ly/3wcLhXD
Tokitsukaze and Permutations Codeforces Solution:-
https://bit.ly/3MWn2DR
Lucky? Codeforces Solution:-
https://bit.ly/3wm0h5L
Equal Candies Codeforces Solution:-
https://bit.ly/37Cv9GM
Most Similar Words Codeforces Solution:-
https://bit.ly/3ysM2Pg
X-Sum Codeforces Solution:-
https://bit.ly/3sp3QGW
Eating Queries Codeforces Solution:-
https://bit.ly/3M2YU2m
Longest Strike Codeforces Solution:-
https://bit.ly/3wjBnmZ
White-Black Balanced Subtrees Codeforces Solution:-
https://bit.ly/3ysMvku
Maximum Crossings (Easy Version) Codeforces Solution:-
https://bit.ly/3KVSpwN
Maximum Crossings (Hard Version) Codeforces Solution:-https://bit.ly/3kVClR5
https://bit.ly/3wm0h5L
Equal Candies Codeforces Solution:-
https://bit.ly/37Cv9GM
Most Similar Words Codeforces Solution:-
https://bit.ly/3ysM2Pg
X-Sum Codeforces Solution:-
https://bit.ly/3sp3QGW
Eating Queries Codeforces Solution:-
https://bit.ly/3M2YU2m
Longest Strike Codeforces Solution:-
https://bit.ly/3wjBnmZ
White-Black Balanced Subtrees Codeforces Solution:-
https://bit.ly/3ysMvku
Maximum Crossings (Easy Version) Codeforces Solution:-
https://bit.ly/3KVSpwN
Maximum Crossings (Hard Version) Codeforces Solution:-https://bit.ly/3kVClR5
Get Subscription CodeChef Solution:-
https://bit.ly/3L2wHar
Chef gives Party CodeChef Solution:-
https://bit.ly/3N8wuUU
Dominant Army CodeChef Solution:-
https://bit.ly/3FDzXbb
Circular Track CodeChef Solution:-
https://bit.ly/3wdqras
Good Pairs CodeChef Solution:-
https://bit.ly/3L5sjI3
Anti-knapsack CodeChef Solution:-
https://bit.ly/3wnfbIK
A Bit Easy CodeChef Solution:-
https://bit.ly/37DlyPY
Average Gift CodeChef Solution:-
https://bit.ly/3l1V9OU
https://bit.ly/3L2wHar
Chef gives Party CodeChef Solution:-
https://bit.ly/3N8wuUU
Dominant Army CodeChef Solution:-
https://bit.ly/3FDzXbb
Circular Track CodeChef Solution:-
https://bit.ly/3wdqras
Good Pairs CodeChef Solution:-
https://bit.ly/3L5sjI3
Anti-knapsack CodeChef Solution:-
https://bit.ly/3wnfbIK
A Bit Easy CodeChef Solution:-
https://bit.ly/37DlyPY
Average Gift CodeChef Solution:-
https://bit.ly/3l1V9OU
Minimums and Maximums Codeforces Solution:-
https://bit.ly/3sycFyc
Robots Codeforces Solution:-
https://bit.ly/3l4orMR
Binary String Codeforces Solution:-
https://bit.ly/3NaroHA
Dog Walking Codeforces Solution:-
https://bit.ly/3w9oEo6
Moving Chips Codeforces Solution:-
https://bit.ly/3Nek1Py
Lenient Vertex Cover Codeforces Solution :-
https://bit.ly/3yCBg90
https://bit.ly/3sycFyc
Robots Codeforces Solution:-
https://bit.ly/3l4orMR
Binary String Codeforces Solution:-
https://bit.ly/3NaroHA
Dog Walking Codeforces Solution:-
https://bit.ly/3w9oEo6
Moving Chips Codeforces Solution:-
https://bit.ly/3Nek1Py
Lenient Vertex Cover Codeforces Solution :-
https://bit.ly/3yCBg90
#include <bits/stdc++.h>
using namespace std;
int main() {
freopen("inputf.inp","r",stdin);
freopen("outputf.out","w",stdout);
int n;
cin >> n;
for(int i = 0 ; i < n ; i++)
{
int l1,r1,l2,r2;
cin >> l1 >> r1 >> l2 >> r2;
int res = l1 + l2;
if (l1 <= l2 && l2 <= r1) res = l2;
if (l2 <= l1 && l1 <= r2) res = l1;
cout << res << endl;
}
return 0;
}
using namespace std;
int main() {
freopen("inputf.inp","r",stdin);
freopen("outputf.out","w",stdout);
int n;
cin >> n;
for(int i = 0 ; i < n ; i++)
{
int l1,r1,l2,r2;
cin >> l1 >> r1 >> l2 >> r2;
int res = l1 + l2;
if (l1 <= l2 && l2 <= r1) res = l2;
if (l2 <= l1 && l1 <= r2) res = l1;
cout << res << endl;
}
return 0;
}