UVA 11040(p342)----Add Bricks in the Wall
来源:互联网 发布:qq for mac os x 10.8 编辑:程序博客网 时间:2024/05/24 02:07
#include<iostream>#include<cstdio>using namespace std;int a[10][10],t;int main(){ scanf("%d",&t); while(t--) { for(int i=1;i<=9;i+=2) for(int j=1;j<=i;j+=2) scanf("%d",&a[i][j]); int x=(a[7][1]-a[9][1]-a[9][3])/2; int y=(a[5][1]-a[7][3]-a[7][1])/2-a[9][3]*2-x; int z=(a[5][3]-a[7][5]-a[7][3]-4*a[9][5])/2-y; int w=(a[7][7]-a[9][7]-a[9][9])/2; a[9][2]=x;a[9][4]=y;a[9][6]=z;a[9][8]=w; for(int i=9;i>=1;i--) for(int j=1;j<=i-1;j++) a[i-1][j]=a[i][j]+a[i][j+1]; for(int i=1;i<=9;i++) { for(int j=1;j<=i-1;j++) printf("%d ",a[i][j]); printf("%d",a[i][i]); printf("\n"); } } return 0;}
0 0
- UVA 11040(p342)----Add Bricks in the Wall
- UVA 11040 - Add bricks in the wall
- UVa 11040 - Add bricks in the wall
- UVa 11040 - Add bricks in the wall
- uva 11040 - Add bricks in the wall
- UVA 11040 Add bricks in the wall
- UVa 11040 - Add bricks in the wall
- Add bricks in the wall UVA
- Add bricks in the wall UVA
- 【UVA】11040 - Add bricks in the wall(找规律)
- UVa 11040 - Add bricks in the wall(规律)
- UVA-11040-Add Bricks in the wall(规律、递推)
- 11040 - Add bricks in the wall(简单题)
- 习题10-1 11040 Add bricks in the wall 砌砖
- UVa11040 - Add bricks in the wall
- UVA11040 - Add bricks in the wall
- UVA1426-Add Bricks in The Wall
- UVa11040 - Add bricks in the wall (规律递推)
- 写一个函数,尽可能高效地从标准URL里取出文件的扩展名(新浪)
- UVA 10976(p183)----Fractions Again?!
- 基于 HashMap的三种输出方法
- android studio 对android app签名
- JavaWEB 核心编程视频教程 02
- UVA 11040(p342)----Add Bricks in the Wall
- 7.1 itertools--高效循环的创建函数
- 使用HashMap做一个缓存案例【缓存一张图片】
- poj Babelfish 2503 (字符串模拟)
- UVA 11054(p237)----Wine trading in Gergovia
- hibernate第一课
- Linux为什么受欢迎?
- Ambari,hadoop的配置,管理和监控项目入门
- 如何查看自己电脑的IP和网络运营商