标签:没有 ack ons 提交 style span 输入格式 sign 内存
#include <iostream> #include <cstdio> #include <sstream> #include <cstring> #include <map> #include <cctype> #include <set> #include <vector> #include <stack> #include <queue> #include <algorithm> #include <cmath> #include <bitset> #define rap(i, a, n) for(int i=a; i<=n; i++) #define rep(i, a, n) for(int i=a; i<n; i++) #define lap(i, a, n) for(int i=n; i>=a; i--) #define lep(i, a, n) for(int i=n; i>a; i--) #define rd(a) scanf("%d", &a) #define rlld(a) scanf("%lld", &a) #define rc(a) scanf("%c", &a) #define rs(a) scanf("%s", a) #define rb(a) scanf("%lf", &a) #define rf(a) scanf("%f", &a) #define pd(a) printf("%d\n", a) #define plld(a) printf("%lld\n", a) #define pc(a) printf("%c\n", a) #define ps(a) printf("%s\n", a) #define MOD 2018 #define LL long long #define ULL unsigned long long #define Pair pair<int, int> #define mem(a, b) memset(a, b, sizeof(a)) #define _ ios_base::sync_with_stdio(0),cin.tie(0) //freopen("1.txt", "r", stdin); using namespace std; const int maxn = 10010, INF = 0x7fffffff; map<string, int> mapp; int main() { int n, m, d, cnt = 0; string str1; rd(n), rd(m); getchar(); for(int i = 0; i < n; i++) { string str2; getline(cin, str1); int len = str1.size(); for(int k = 0; k < len; k++) { if(str1[k] == ‘ ‘) continue; if(str1[k] == ‘0‘) str2 += ‘1‘; else if(str1[k] == ‘1‘) str2 += ‘0‘; if(k != len - 1) str2 += ‘ ‘; } cnt += mapp[str2]; mapp[str1]++; } cout << cnt << endl; return 0; }
标签:没有 ack ons 提交 style span 输入格式 sign 内存
原文地址:https://www.cnblogs.com/WTSRUVF/p/10454478.html