Author: Mayur Ray
Editorialist: Mayur Ray
DIFFICULTY:
CAKEWALK
PREREQUISITES:
None
PROBLEM:
You are provided with the starting date & duration of the travelling journey. You need to determine whether you can reach the college before 21^{st} March or not.
EXPLANATION:
We just need the check whether the sum of S (the starting date) & D (duration of the journey) is less than 21 or not. If it’s less, then we can successfully reach the college before 21^{st} March, & hence we print YES, else NO.
SOLUTIONS:
Setter's & Editorialist's Solution
#include <iostream>
using namespace std;
int main() {
int s, d;
cin >> s >> d;
if (s + d < 21)
cout << "YES";
else
cout << "NO";
return 0;
}