PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author: iceknight1093
Tester: sky_nik
Editorialist: iceknight1093
DIFFICULTY:
TBD
PREREQUISITES:
None
PROBLEM:
Chef received X votes and Chefu received Y votes in an election.
Chef dominates the election if he received at least twice the votes Chefu did.
Find whether Chef dominated the election.
EXPLANATION:
The answer is Yes
if X \geq 2Y and No
otherwise.
This can be checked using an if
condition.
TIME COMPLEXITY:
\mathcal{O}(1) per testcase.
CODE:
Editorialist's code (Python)
x, y = map(int, input().split())
print('Yes' if x >= 2*y else 'No')