755 - 487--3279
来源:互联网 发布:淘宝模板化设置 编辑:程序博客网 时间:2024/05/22 04:49
#include <iostream>#include <map>#include <vector>#include <list>#include <string>using namespace std;int main ( int argc, char * argv[ ] ) {int n, N;cin >> N;for ( n = 0; n < N; n++ ) {if ( n ) cout << endl;int m, M;cin >> M;map<string, int> map_r;for ( m = 0; m < M; m++ ) {string ts;while ( ts == "" || ts[0] == '\n' ) getline ( cin, ts );int pos;while ( ( pos = ts.find("-", 0) ) != string::npos ) ts.erase ( pos, 1 );#define R(X, Y) while ( ( pos = ts.find( #X, 0 ) ) != string::npos ) { ts.erase ( pos, 1 ); ts.insert ( pos, #Y ); }R(A, 2)R(B, 2)R(C, 2)R(D, 3)R(E, 3)R(F, 3)R(G, 4)R(H, 4)R(I, 4)R(J, 5)R(K, 5)R(L, 5)R(M, 6)R(N, 6)R(O, 6)R(P, 7)R(R, 7)R(S, 7)R(T, 8)R(U, 8)R(V, 8)R(W, 9)R(X, 9)R(Y, 9)ts.insert ( 3, "-" );map_r[ ts ] ++;}map<string, int> map_2;for ( auto i : map_r ) {if ( i.second > 1 ) map_2[ i.first ] = i.second;}bool tick = true;for ( auto i : map_2 ) {tick = false;cout << i.first << " " << i.second << endl;}if ( tick ) cout << "No duplicates." << endl;}return 0;}
0 0
- UVa 755 - 487--3279
- uva 755 487--3279
- 755 487--3279(***)
- UVa 755 - 487--3279
- uva 755 - 487--3279
- UVA 755 487-3279
- 755 - 487--3279
- UVA 755 - 487--3279
- UVaOJ 755 - 487--3279
- UVa 755 - 487--3279
- UVa: 755 - 487--3279
- Uva-755-487--3279
- 755 - 487--3279
- UVA 755 - 487--3279
- UVa 755 487-3279
- UVa 755 487-3279
- UVa 755 - 487--3279
- UVa:755 - 487--3279
- 动态规划
- ubuntu14.04---多语言输入法的配置
- 123 - Searching Quickly
- 黑马程序员-IO-递归遍历文件夹中的全部文件,拷贝到另一个文件中,对每一个文件修改其后缀名
- IOS学习之UITabBarController和UITabBarButton
- 755 - 487--3279
- 107 - The Cat in the Hat
- Spring Framework源码(十二):SpringMVC之数据绑定、验证、转换
- 10014 - Simple calculations
- “ android 4.3 卡热插拔 自动识别卡类型 ”中AndroidManifest.xml路径
- Listener--监听器
- android viewPager使用,实现界面的左右滑动
- 视图概述
- 文档数据库的学习报告