排个序,map直接搞。

#include <stdio.h>
#include <math.h>
#include<cstring>
#include<cmath>
#include<map>
#include<string>
#include<algorithm>
using namespace std; int main()
{
int n;
while(~scanf("%d",&n))
{
map<string,int>m;
m.clear();
for(int i=; i<=n; i++)
{
char s[];
scanf("%s",s);
sort(s,s+strlen(s));
printf("%d\n",m[s]);
m[s]++;
}
}
return ;
}

2016"百度之星" - 资格赛(Astar Round1) Problem D的更多相关文章

  1. HDU 5688:2016"百度之星" - 资格赛 Problem D

    原文链接:https://www.dreamwings.cn/hdu5688/2650.html Problem D Time Limit: 2000/1000 MS (Java/Others)    ...

  2. HDU 5686:2016"百度之星" - 资格赛 Problem B

    原文链接:https://www.dreamwings.cn/hdu5686/2645.html Problem B Time Limit: 2000/1000 MS (Java/Others)    ...

  3. HDU 5685:2016"百度之星" - 资格赛 Problem A

    原文链接:https://www.dreamwings.cn/hdu5685/2637.html Problem A Time Limit: 2000/1000 MS (Java/Others)    ...

  4. 2016百度之星 资格赛ABCDE

    看题:http://bestcoder.hdu.edu.cn/contests/contest_show.php?cid=690 交题:http://acm.hdu.edu.cn/search.php ...

  5. 2016"百度之星" - 资格赛(Astar Round1) Problem E

    简单模拟题,耐心写就能过. #include <stdio.h> #include <math.h> #include<cstring> #include<c ...

  6. 2016"百度之星" - 资格赛(Astar Round1) Problem C

    字典树. 插入的时候update一下节点出现的次数. delete的时候,先把前缀之后的全删了.然后看前缀最后一个节点出现了几次,然后前缀上每个节点的次数都减去这个次数. 前缀从上到下再检查一遍,如果 ...

  7. 2016"百度之星" - 资格赛(Astar Round1) Problem B

    规律题,斐波那契数列,数据有毒,0的时候输出换行.会爆longlong,写个大数模板或者Java搞. import java.io.BufferedInputStream; import java.m ...

  8. 2016"百度之星" - 资格赛(Astar Round1) Problem A

    保存前缀乘,询问的时候输出c[ri]/c[li-1]即可,因为是除法,所以计算一下c[li-1]的逆元. #include <stdio.h> #include <math.h> ...

  9. 2016"百度之星" - 资格赛(Astar Round1)

    逆元 1001 Problem A 求前缀哈希和逆元 #include <bits/stdc++.h> typedef long long ll; const int MOD = 9973 ...

随机推荐

  1. Ansible1:简介与基本安装【转】

    Ansible是一个综合的强大的管理工具,他可以对多台主机安装操作系统,并为这些主机安装不同的应用程序,也可以通知指挥这些主机完成不同的任务.查看多台主机的各种信息的状态等,ansible都可以通过模 ...

  2. 安卓之PreferenceActivity分享

    PerferenceActivity是什么,看下面的截图: Android的系统截图 乐手设置截图 好了,我们看到Android系统本身就大量用到了PreferenceActivity来对系统进行信息 ...

  3. QML中的ExclusiveGroup

    Exclusive这个单词在高中应该都学过,是互斥的意思.如果你没有上过或者还没有上到高中,那你非常棒,计算机领域的大师很多都是这么起步的. ExclusiveGroup顾名思义就是互斥分组,效果很明 ...

  4. wpa_supplicant_8_ti hostapd wpa_supplicant TI 官方的wpa_supplicant hostapd 移植到linux

    在移植 wpa_supplicant_8_ti 的时候碰到很多头文件找不到.然后参考了下面的博客 http://blog.csdn.net/penglijiang/article/details/85 ...

  5. shell 空格问题

    1.定义变量时, =号的两边不可以留空格. eg: gender=femal------------right gender =femal-----------wrong gender= femal- ...

  6. 把vim变成C编辑器

    转载一篇博客,地址是http://my.oschina.net/kutengshe/blog/423497

  7. 【转载】newInstance()和new()

    newInstance()和new() 在Java开发特别是数据库开发中,经常会用到Class.forName( )这个方法.通过查询Java Documentation我们会发现使用Class.fo ...

  8. 用python计算md5,sha1,crc32

    Linux下计算md5sum,sha1sum,crc: 命令 输出 $md5sum hello f19dd746bc6ab0f0155808c388be8ff0  hello $sha1sum hel ...

  9. js框架——angular.js(2)

    1. 模块的利用扩充 模块的名称也可以当做变量使用,例如: <body ng-app> <label><input type="checkbox" n ...

  10. 报错:error C2229: class ' ' has an illegal zero-sized array 引发的思考

    问题: