# $Educational\ Codeforces\ Round\ 80\ (Rated\ for\ Div.\ 2)$

//#pragma comment(linker, "/STACK:1024000000,1024000000")
#include
using namespace std;
function ____ = [](){ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);};
int T,n,d;
typedef long long int LL;
int main(){
____();
cin >> T;
while(T--){
cin >> n >> d;
LL dd = sqrt(d);
bool ok = false;
for(LL x = max(0ll,dd-2); x <= dd+2; x++) if(x+d/(x+1)+(d%(x+1)!=0)<=n) ok = true;
cout << (ok?"YES":"NO") << endl;
}
return 0;
}

## B.Yet Another Meme Problem

$$1\le a \le A, 1\le b \le B$$,问区间内满足$$a·b+a+b=a·10^{dig(b)}+b$$，其中$$dig(b)$$为b的位数

//#pragma comment(linker, "/STACK:1024000000,1024000000")
#include
using namespace std;
function ____ = [](){ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);};
using LL = int_fast64_t;
int t;
LL a,b;
int main(){
____();
cin >> t;
while(t--){
cin >> a >> b;
LL cnt = 0,cur = 10;
while(cur-1<=b){
cnt++;
cur*=10;
}
cout << cnt*a << endl;
}
return 0;
}

## C.Two Arrays

//#pragma comment(linker, "/STACK:1024000000,1024000000")
#include
using namespace std;
function ____ = [](){ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);};
typedef int_fast64_t LL;
const LL MOD = 1e9+7;
const int MAXN = 1111;
int n,m;
LL f[11][MAXN][MAXN],sum[MAXN][MAXN];
int main(){
____();
cin >> n >> m;
for(int i = 1; i <= n; i++) for(int j = i; j <= n; j++) f[1][i][j] = 1;
for(int k = 2; k <= m; k++){
for(int i = 1; i <= n; i++) for(int j = 1; j <= n; j++)
sum[i][j] = (sum[i-1][j]+sum[i][j-1]-sum[i-1][j-1]+f[k-1][i][j])%MOD;
for(int i = 1; i <= n; i++) for(int j = i; j <= n; j++)
f[k][i][j] = (sum[i][n]-sum[i][j-1]+MOD)%MOD;
}
LL res = 0;
for(int i = 1; i <= n; i++) for(int j = i; j <= n; j++) res = (res+f[m][i][j])%MOD;
cout << res << endl;
return 0;
}

## D. Minimax Problem

 
 
 
 
 
 
 
 你可能感兴趣的 web前段跨域nginx代理配置 刘正强 nginxcmsWeb spring学习笔记 caoyong spring Eclipse打开workspace提示工作空间不可用 0624chenhong eclipse Javascript 面向对面写法的必要性？ 一炮送你回车库 JavaScript js array对象的迭代方法 换个号韩国红果果 array 对Hibernate缓存机制的理解 归来朝歌 session一级缓存对象持久化 WebService调用错误合集 darkranger webservice JSP和Servlet的中文乱码处理 aijuans Java Web 按字母分类： ABCDEFGHIJKLMNOPQRSTUVWXYZ其他 首页 - 关于我们 - 设为首页 - 加入收藏 - 站内搜索 - Sitemap - 侵权投诉 版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号