#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<stack>
#include<cstdlib>
#include<string>
#include<bitset>
#define INF 100000000
#define fi first
#define se second
#define debug(x) cout<<#x<<"="<<x<<endl
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
int c[][],a[];
char s[];
int main()
{
freopen("david.in","r",stdin);
freopen("david.out","w",stdout);
c[][]=;
c[][]=;
c[][]=,c[][]=;
c[][]=;
c[][]=,c[][]=;
c[][]=;
c[][]=,c[][]=;
c[][]=,c[][]=,c[][]=;
int n,i,j;
cin>>n;
scanf("%s",s+);
for(i=;i<=n;i++)
{
for(j=;j<=;j++)
a[j]+=c[s[i]-][j];
}
for(j=;j;j--)
while(a[j])
printf("%d",j),a[j]--;
cout<<endl;
return ;
}
// davidlee1999WTK 2015/
// srO myk Orz
//ios::sync_with_stdio(false);

繁华模拟赛 David与阶乘的更多相关文章

  1. 繁华模拟赛 David与Vincent的博弈游戏

    #include<iostream> #include<cstdio> #include<string> #include<cstring> #incl ...

  2. [繁华模拟赛]Evensgn 剪树枝

    Evensgn 剪树枝 题目 繁华中学有一棵苹果树.苹果树有 n 个节点(也就是苹果),n − 1 条边(也就 是树枝).调皮的 Evensgn 爬到苹果树上.他发现这棵苹果树上的苹果有两种:一 种是 ...

  3. 繁华模拟赛day8 牛栏

    /* 标称并没有用到题解中提到的那种奇妙的性质,我们可以证明,正常从1开始走的话,需要T次,如何使这个次数减小?题解中提到一个办法,有一步小于n/t,我们考虑这一步,如果把它匀到左右两步中,则可以减小 ...

  4. 繁华模拟赛day8 字典序

    /* 这个题要我们求一个字典序,字符串给出的顺序,会对字母的字典序前后相对顺序进行限定,如何用来表示这种限定,我们注意到这种一个之后接着一个,只有先输出他前面的才能输出他,很明显就是拓扑排序,最小方案 ...

  5. 繁华模拟赛day8 科技树

    /* 贪心,很明显是越容易升级的越先升级 */ #include<iostream> #include<cstdio> #include<string> #incl ...

  6. 繁华模拟赛 Vicent坐电梯

    /*n<=5000­这样就不能用O(n)的转移了,而是要用O(1)的转移.­注意我们每次的转移都来自一个连续的区间,而且我们是求和­区间求和?­前缀和!­令sum[step][i]表示f[ste ...

  7. 繁华模拟赛 Vincent的城堡

    #include<iostream> #include<cstdio> #include<string> #include<cstring> #incl ...

  8. 繁华模拟赛 vicent的字符串

    #include<iostream> #include<cstdio> #include<string> #include<cstring> #incl ...

  9. 繁华模拟赛 Evensgn剪树枝

    #include<iostream> #include<cstdio> #include<string> #include<cstring> #incl ...

随机推荐

  1. 使用MarkdonPad2学习心得

    使用MarkdonPad2学习心得 心得体会 自从接触了娄老师的课程后,逐渐的适应了使用博客园.实验楼等网络学习资源学习课程,虽说和传统的授课方式有些不同,但毕竟我们就是与电脑与网络打交道,所以在学习 ...

  2. maven编译设置pom.xml

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...

  3. IText&Html2canvas js截图 绘制 导出PDF

    Html2canvas JS截图 HTML <div id="divPDF"> 需要截图的区域 </div> JS <script src=" ...

  4. 手把手教你Linux服务器集群部署.net网站 - 让MVC网站运行起来

    一.Linux下面安装需要软件 我们这里需要安装的软件有: 1) Mono 3.2.8 : C#跨平台编译器,能使.Net运行与Linux下,目前.net 4.0可以完美运行在该平台下 2) ngin ...

  5. [AaronYang]C#人爱学不学8[事件和.net4.5的弱事件深入浅出]

    没有伟大的愿望,就没有伟大的天才--Aaronyang的博客(www.ayjs.net)-www.8mi.me 1. 事件-我的讲法 老师常告诉我,事件是特殊的委托,为委托提供了一种发布/订阅机制. ...

  6. MyEclipse8.5快速搭建SSH框架

    来源于:http://jingyan.baidu.com/article/a378c960a78125b3282830cc.html MyEclipse8.5快速搭建SSH框架 使用版本: Strut ...

  7. try throw catch异常处理机制

    /*本程序实现分块查找算法  又称索引顺序查找     需要注意的是分块查找需要2次查找  先对块查找  再对块内查找    2013.12.16    18:44*/ #include <io ...

  8. Linux进程管理工具——supervisor

    介绍 Supervisord是用Python实现的一款非常实用的进程管理工具 安装 这里用源码 supervisor-.tar.gz .tar.gz cd supervisor- sudo pytho ...

  9. 【LeetCode】Sum of Two Integers

    问题描述: Calculate the sum of two integers a and b, but you are not allowed to use the operator + and - ...

  10. 19.Android之文件存储方法学习

    Android开发中会用到文件存储,今天来学习下. 先改下布局界面: <?xml version="1.0" encoding="utf-8"?> ...