不知道为什么,想着就过了😂,应该是贪心问题,只要将a
设置l - 1
,如果r
不过,肯定没有通解
C++ 代码
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int t;
int main()
{
cin >> t;
while (t -- )
{
int l, r;
cin >> l >> r;
if (2 * l - 1 >= r) printf("YES\n");
else printf("NO\n");
}
return 0;
}