#include <cstdio>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <set>
#include <vector>
#include <sstream>
#include <queue>
#include <typeinfo>
#include <fstream>
typedef long long ll;
using namespace std;
//freopen("D.in","r",stdin);
//freopen("D.out","w",stdout);
int a[];
int main()
{
int m,s;
cin>>m>>s;
if(m==&&s==)
{
cout<<"0 0"<<endl;
return ;
}
if(s==)
{
cout<<"-1 -1"<<endl;
return ;
}
if(s>*m)
{
cout<<"-1 -1"<<endl;
return ;
}
int t=s-;//精湛的-1 屌不屌?
for(int i=;i<m;i++)
{
int r=min(t,);
a[i]=r;
t-=r;
}
a[m-]++;
for(int i=m-;i>=;i--)
cout<<a[i];
cout<<" ";
t=s;
for(int i=;i<m;i++)
{
int r=min(,t);
cout<<r;
t-=r;
}
cout<<endl;
return ;
}

最新文章

  1. Alcatraz 的安装和删除
  2. Spring-AOP实践 - 统计访问时间
  3. C#导出csv文件
  4. VS一次删除多个窗体后报错
  5. 一次Oracle 11g+FluentNHibernate AutoMapping组合尝试
  6. Maven打包跳过测试
  7. git 常用命令使用
  8. windows下的unix工具集:UnxUtils
  9. windows系统mysql定时自动备份
  10. Linux I/O模型
  11. Java API —— BigInteger类
  12. 【概率dp,难度3颗星】hdu-5001(2014鞍山网络赛)
  13. HDOJ 1214 圆桌会议
  14. 设计模式(二): BUILDER生成器模式 -- 创建型模式
  15. 对于笔试题--“good and abc”的理解
  16. ORA-00119/ORA-00132
  17. js-将一个对象转换成一个新的对象
  18. Asp.Net MVC 获取当前 Controller Action Area
  19. python爬虫-基础入门-爬取整个网站《2》
  20. JavaScript ES6格式化字符串方法

热门文章

  1. setInterval做定时器
  2. js面试题之求数组最值
  3. No.3 selenium学习之路之鼠标&amp;键盘事件
  4. 20165203《Java程序设计》第二周Java学习总结
  5. ef查询mysql数据库数据支持DbFunctions函数
  6. appium+python 【Mac】Android夜神模拟器
  7. Radon变换——MATLAB
  8. jsonrpc.js -- 原生js实现 JSON-RPC 协议
  9. 跟厂长学PHP7内核(三):源码目录结构
  10. 【原创】SQL Server常用脚本整理