#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. AVPlayer的使用本地视频

    1引入AVFoundation.framework框架 2引入头文件<AVFoundation/AVFoundation.h>,并拖入需要播放的视频文件 代码如下: 自定义播放的View, ...

  2. (转)Python实例手册

    原文地址:http://hi.baidu.com/quanzhou722/item/cf4471f8e23d3149932af2a7 实在是太好的资料了,不得不转 python实例手册 #encodi ...

  3. 7.HBase In Action 第一章-HBase简介(1.2.1 典型的网络搜索问题:Bigtable的起原)

    Search is the act of locating information you care about: for example, searching for pages in a text ...

  4. Asp.Net MVC 合并js或css请求

    Step1:BundleConfig中注册 bundles.Add(new ScriptBundle("~/isValid").Include(  "~/Scripts/ ...

  5. checkbox radio select绑定

    index11.html <html><head> <title>checkbox radio select绑定</title> <script ...

  6. android之SQLlite操作

    布局文件 创建了四个按键,分别对应增删改查 <?xml version="1.0" encoding="utf-8"?> <LinearLay ...

  7. 原型图利器 – Mockplus的审阅功能

    Mockplus是一款简洁快速的原型图工具 (http://www.mockplus.cn),最近推出了审阅功能. 审阅,旨在解决团队项目原型设计中的沟通和协作的问题. 没有孤立的原型,更没有一次成型 ...

  8. 用SQL打印乘法口诀表

    --用SQL打印出乘法口诀表 declare @i int ,@j int --@i是乘法口诀的行数 --一共九行 begin --每次都是从1*开始,j每循环一次递增 )--print每次输出都会换 ...

  9. 负margin一些奇葩的布局技巧

    copy_from_ http://www.hicss.net/i-know-you-do-not-know-the-negative-margin/ <!doctype html> &l ...

  10. jQuery插件开发模式

    jQuery插件开发模式 软件开发过程中是需要一定的设计模式来指导开发的,有了模式,我们就能更好地组织我们的代码,并且从这些前人总结出来的模式中学到很多好的实践. 根据<jQuery高级编程&g ...