sgu-249 Matrix
来源:互联网 发布:软件产业基地1栋 编辑:程序博客网 时间:2024/05/20 13:08
题目大意:
给你一个
解题思路:
看到只有一位不同,很容易想到格雷码
AC代码:
#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <algorithm>#include <iostream>using namespace std;int n,m;int main(){ scanf("%d%d",&n,&m); for(int i=0;i<(1<<n);i++) { for(int j=0;j<(1<<m);j++) printf("%d ",((i^(i>>1))<<m)|(j^(j>>1))); puts(""); } return 0;}
0 0
- sgu 249 Matrix
- SGU 249 Matrix
- sgu-249 Matrix
- sgu 168 Matrix
- sgu 196 Matrix Multiplication
- SGU 168 Matrix DP
- sgu 168 Matrix DP
- sgu 196 Matrix Multiplication
- SGU 168 Matrix (DP)
- SGU - 196 - Matrix Multiplication (矩阵乘法)
- SGU
- SGU
- SGU
- SGU
- SGU
- SGU
- (SGU
- SGU
- IOS Reachability库监听网络状态
- V$SQL,V$SQLAREA,V$SQLTEXT
- ios xmpp 文件传输
- unity 给物体边缘加高光轮廓的办法,付Demo(增加一组算法)
- How can I recover a file that I deleted in my local repo from the remote repo in Git?
- sgu-249 Matrix
- wpf 的拖拽功能实现(含拖拽复制功能实现)
- Rename files and folders with git
- XCode5添加新建类模板(Cocos2dx Template Class for Scene or Layer)
- ubuntu获取版本号和内核信息的方法
- linux配置java环境变量 转过几个,这个最详细和靠谱
- ubuntu获取版本号和内核信息的方法
- Unity3D性能优化总结
- Core Plot学习笔记:绘制饼图