排个序,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. Docker学习笔记 — Docker私有仓库搭建【转载】

    标签: Docker 2015-03-10 21:08 24190人阅读 评论(0) 收藏 举报  分类: Docker(26)    目录(?)[+]   和Mavan的管理一样,Dockers不仅 ...

  2. 设置标题小图标ico

    在head里添加 <link rel="shortcut icon" href="<%=request.getContextPath()%>/FlatU ...

  3. wpa_supplicant wpa_cli 的使用说明

    wpa_supplicant -d -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -iwlan0 -B   会在/data/misc/wifi/下产生 ...

  4. error: invalid 'asm': invalid operand for code 'w'

    google 出结果 http://stackoverflow.com/questions/15623609/including-curl-into-the-android-aosp ........ ...

  5. 清除number输入框的上下箭头

    <input type="number"/> 在chrome,firefox,safari浏览器上输入框右侧会有上下箭头 方法1: <input type=&qu ...

  6. HDU5907 Find Q 数学

    题目大意:求当前串中只含q的连续子串的个数 题目思路:水题,但要注意的是计算过程中可能超int范围; #include<iostream> #include<algorithm> ...

  7. 第一个前台页面----xflow的页面

    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%><%@ tagl ...

  8. Factory and AbstractFactory ——抽象与具体的分离

    Factory and AbstractFactory——抽象与具体的分离 面向对象标准关注于抽取一系列事物的共同行为,组建一个基类.行为再划分成两类: 1:现在及以后不太可能会变化的行为. 2:以后 ...

  9. Swift中的闭包(Closure) 浅析

    转载自:http://www.devtalking.com/articles/closure-expressions-in-swift/ 闭包在Swift中非常有用.通俗的解释就是一个Int类型里存储 ...

  10. java synchronized内置锁的可重入性和分析总结

    最近在读<<Java并发编程实践>>,在第二章中线程安全中降到线程锁的重进入(Reentrancy) 当一个线程请求其它的线程已经占有的锁时,请求线程将被阻塞.然而内部锁是可重 ...