线性基裸题,求最大线性无关组。

注意:1ll<<i

#include <cstdio>
int n,m;
const int mod=2008;
long long b[64];
void insert(long long x) {
for(int i=62; ~i; i--) {
if((x>>i)&1) {
if(b[i]) x^=b[i];
else {
b[i]=x;
return;
}
}
}
}
char s[70];
long long ans;
int main() {
scanf("%d%d",&n,&m);
for(int i=1; i<=m; i++) {
scanf("%s",s);
long long tp=0;
for(int j=0; j<n; j++) {
if(s[j]=='O') tp+=(1ll<<j);
}
insert(tp);
}
for(int i=0; i<62; i++) if(b[i])ans++;
printf("%d",(1ll<<ans)%mod);
}

最新文章

  1. Linux学习笔记(4)-远程登录
  2. Http请求中Content-Type讲解以及在Spring MVC中的应用
  3. 初学者的jquery登录注册和弹窗设计
  4. MFC radio button 绑定变量用法
  5. 转:基础总结篇之一:Activity生命周期
  6. Linux环境进程间通信(三):消息队列
  7. Android L(5.0)源码之手势识别OnTouchListener
  8. onenote使用教程
  9. 缓存--Redis
  10. AspectJ开发
  11. Python Async/Await入门指南
  12. zabbix简介与部署
  13. python-随机操作(random)
  14. week05 06绑定滚动条 去抖动
  15. make/makefile中的加号+,减号-和at号@的含义
  16. C/C++ 类成员函数指针 类成员数据指针
  17. delphi调用webservice (.NET C#版)
  18. 【转】SQL SERVER 中 sp_rename 用法
  19. 翻译记忆软件-塔多思TRADO经典教程_5
  20. js判断手机型号

热门文章

  1. POJ 1129 Channel Allocation DFS 回溯
  2. [bzoj4196][Noi2015]软件包管理器_树链剖分_线段树
  3. [bzoj2466][中山市选2009]树_树形dp
  4. [bzoj4127]Abs_树链剖分_线段树
  5. [Javascript] IntersectionObserver -- Lazy Load Images on a Website
  6. 9517 Link Link Look
  7. Linux命令(十一)——Shell程序设计二(循环控制语句)
  8. 能够替代浮动的inline-block
  9. cocos2d-x 是怎样渲染的
  10. &lt;vim实用技巧&gt;学习笔记