codeforces 589A Email Aliases(map)】的更多相关文章

Description Polycarp has quite recently learned about email aliases. Of course, he used to suspect that the case of the letters doesn't matter in email addresses. He also learned that a popular mail server in Berland bmail.com ignores dots (character…
A - Email Aliases Time Limit:2000MS     Memory Limit:524288KB     64bit IO Format:%I64d & %I64u Submit Status Description Polycarp has quite recently learned about email aliases. Of course, he used to suspect that the case of the letters doesn't matt…
题意:给定于所有的邮箱,都是由login@domain这样的形式构成,而且字符都是不区分大小写的. 我们有一种特殊类型的邮箱——@bmail.com, 这种邮箱除了不区分大小写外—— 1,'@'之前的'.',有等同于无 2,'@'之前的第一个'+'之后的字符可以忽略不计 然后其他字符相同的被认定为邮箱相同. 现在给你 n 个邮箱,让你输出每个邮箱出现的次数与所有这个邮箱的原始串. 析:没什么好说的,就是先判断不是@bmail.com,然后再按要求去点,去+和@之间的值,然后一个一个的比较即可,这…
Email AliasesCrawling in process... Crawling failed Time Limit:2000MS     Memory Limit:524288KB     64bit IO Format:%I64d & %I64u Submit Status Description   Input   Output   Sample Input   Sample Output   Hint   Description Polycarp has quite recent…
题目链接:http://codeforces.com/problemset/problem/589/A Polycarp has quite recently learned about email aliases. Of course, he used to suspect that the case of the letters doesn't matter in email addresses. He also learned that a popular mail server in B…
Polycarp has quite recently learned about email aliases. Of course, he used to suspect that the case of the letters doesn't matter in email addresses. He also learned that a popular mail server in Berland bmail.com ignores dots (characters '.') and a…
C. Hostname Aliases 题目连接: http://www.codeforces.com/contest/644/problem/C Description There are some websites that are accessible through several different addresses. For example, for a long time Codeforces was accessible with two hostnames codeforce…
题目链接:http://codeforces.com/problemset/problem/977/F 题意: 给定一个长度为 $n$ 的整数序列 $a[1 \sim n]$,要求你找到一个它最长的一个子序列,该子序列满足单调连续递增. 子序列可以不连续,单调连续递增即例如 $[4,5,6,7]$ 或者 $[6,7,8,9,10]$ 这样的. 题解: $f[i]$ 表示以 $a[i]$ 为结尾的最长连续递增子序列,那么要转移就需要找到 $[1,i-1]$ 这个区间内,某个满足 $a[j] = a…
题目链接:http://codeforces.com/problemset/problem/567/C C. Geometric Progression time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Polycarp loves geometric progressions very much. Since he was on…
题目链接:https://codeforces.com/problemset/problem/567/C 题意: 给出长度为 $n$ 的序列 $a[1:n]$,给出公比 $k$,要求你个给出该序列中,长度为 $3$ 的等比子序列的数目. 题解: 首先倒着遍历,用map记录曾经出现过的每个数字的出现次数,然后再用另一个map来记录曾经出现过的所有满足 $(x,kx)$ 的二元组的数目,最后就直接维护答案即可. AC代码: #include<bits/stdc++.h> #define IO (i…