蓝桥 审美课
作者:互联网
#include<bits/stdc++.h> using namespace std; map<int,int> ans; int main() { ios::sync_with_stdio(false); int n,m; cin>>n>>m; for(int i=0;i<n;i++) { int a=0; for(int j=0;j<m;j++) { int x; cin>>x; a=a<<1; a+=x; } ans[a]++; } int sum =0; int maxn = (1<<m)-1; for(map<int,int>::iterator it=ans.begin(); it!=ans.end();it++) { int x = it->first; int num = x^maxn; sum += ans[num]*it->second; } cout<<sum/2; return 0; }
标签:false,cout,int,审美,蓝桥,num,ans 来源: https://www.cnblogs.com/magicalzh/p/10485511.html