Educational Codeforces Round 80 (Rated for Div. 2(A Deadline )
Posted vampire6
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Educational Codeforces Round 80 (Rated for Div. 2(A Deadline )相关的知识,希望对你有一定的参考价值。
(A) Deadline
题目:
思路:一开始还傻傻的暴力康康。。。。只要求出令x=n的一半就行,然后判断
1 #include<bits/stdc++.h> 2 using namespace std; 3 int main() 4 { 5 //freopen("text","r",stdin); 6 int T; 7 scanf("%d",&T); 8 while(T--) 9 { 10 //cout<<ceil(0.0)<<endl; 11 long long n,d; 12 cin>>n>>d; 13 if(d<=n) 14 printf("YES "); 15 else 16 { 17 double a=n/2; 18 double b=ceil(d/(a+1)); 19 if(a+b<=n) 20 printf("YES "); 21 else 22 printf("NO "); 23 } 24 } 25 return 0; 26 }
以上是关于Educational Codeforces Round 80 (Rated for Div. 2(A Deadline )的主要内容,如果未能解决你的问题,请参考以下文章
Educational Codeforces Round 7 A
Educational Codeforces Round 7
Educational Codeforces Round 90
Educational Codeforces Round 33