Problem K: 数字菱形
#include<stdio.h>
int main()
{
int n,i,j,k,t,x,q,p;
while(scanf("%d",&n)!=EOF)
for(i=;i<=n;i++)
{
for(j=;j<=n-i;j++)
printf(" ");
for(k=;k<=*i-;k++)
printf("%d",i);
printf("\n");
}
for(x=n+;x<=*n-;x++)
{
for(p=;p<=x-n;p++)
printf(" ");
for(q=*n-*p+;q>=;q--)
printf("%d",*n-x);
printf("\n");
}
return ;
}
Problem K: 数字菱形的更多相关文章
- 2018 Multi-University Training Contest 4 Problem K. Expression in Memories 【模拟】
任意门:http://acm.hdu.edu.cn/showproblem.php?pid=6342 Problem K. Expression in Memories Time Limit: 200 ...
- Codeforces Gym 100610 Problem K. Kitchen Robot 状压DP
Problem K. Kitchen Robot Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/10061 ...
- Codeforces 1089K - King Kog's Reception - [线段树][2018-2019 ICPC, NEERC, Northern Eurasia Finals Problem K]
题目链接:https://codeforces.com/contest/1089/problem/K time limit per test: 2 seconds memory limit per t ...
- Gym 101981K - Kangaroo Puzzle - [玄学][2018-2019 ACM-ICPC Asia Nanjing Regional Contest Problem K]
题目链接:http://codeforces.com/gym/101981/problem/K Your friend has made a computer video game called “K ...
- Western Subregional of NEERC, Minsk, Wednesday, November 4, 2015 Problem K. UTF-8 Decoder 模拟题
Problem K. UTF-8 Decoder 题目连接: http://opentrains.snarknews.info/~ejudge/team.cgi?SID=c75360ed7f2c702 ...
- 2010-2011 ACM-ICPC, NEERC, Moscow Subregional Contest Problem K. KMC Attacks 交互题 暴力
Problem K. KMC Attacks 题目连接: http://codeforces.com/gym/100714 Description Warrant VI is a remote pla ...
- XVII Open Cup named after E.V. Pankratiev Grand Prix of Moscow Workshops, Sunday, April 23, 2017 Problem K. Piecemaking
题目:Problem K. PiecemakingInput file: standard inputOutput file: standard outputTime limit: 1 secondM ...
- HDU 6342.Problem K. Expression in Memories-模拟-巴科斯范式填充 (2018 Multi-University Training Contest 4 1011)
6342.Problem K. Expression in Memories 这个题就是把?变成其他的使得多项式成立并且没有前导零 官方题解: 没意思,好想咸鱼,直接贴一篇别人的博客,写的很好,比我的 ...
- 华农oj Problem K: 负2进制【有技巧构造/待补】
Problem K: 负2进制 Time Limit: 2 Sec Memory Limit: 128 MB Submit: 51 Solved: 6 [Submit][Status][Web Boa ...
随机推荐
- bzoj 4624 农场种植 fft
4624: 农场种植 Time Limit: 50 Sec Memory Limit: 512 MBSubmit: 48 Solved: 31[Submit][Status][Discuss] D ...
- nodejs与sqlite
//打开数据库var db = new sqlite3.Database('xx.db'); // 关闭数据库db.close(); db.run('xx'); // 数据库对象的run函数可以执行 ...
- 403 Forbidden 错误
Forbidden You don't have permission to access /a.php on this server. apache昨天调试 httpd.conf 文件:<Di ...
- 【BZOJ1468】Tree [点分治]
Tree Time Limit: 10 Sec Memory Limit: 64 MB[Submit][Status][Discuss] Description 给你一棵TREE,以及这棵树上边的距 ...
- git分支开发,分支(feature)同步主干(master)代码,以及最终分支合并到主干的操作流程
由于rebase执行速度慢,分支同步主干代码时,分支的每次提交都可能和主干产生冲突,需要解决的次数太多,影响提交效率. 同时,为了保证主干提交线干净(可以安全回溯),所以采用下面所说的merge法. ...
- 【BZOJ 3907】网格(Catalan数)
题目链接 这个题推导公式跟\(Catalan\)数是一样的,可得解为\(C_{n+m}^n-C_{n+m}^{n+1}\) 然后套组合数公式\(C_n^m=\frac{n!}{m!(n-m)!}\) ...
- NPOI的使用Excel模板导出 可插入到指定行
Excel模版建议把需要添加数据行的样式设置好 模版样式,导出后效果 [2017-11-22 对获取需插入数据的首行样式有时为空报错修改] /// <summary> /// 根据模版导出 ...
- from表单详解
- 创建堆 HeapCreate
创建额外的堆的原因1.对组件进行保护2.更有效的内存管理3.局部访问4.避免线程同步开销5.快速释放 HeapCreate函数原型:HANDLE WINAPI HeapCreate( _In_ DWO ...
- LeetCode 10 Regular Expression Match
'.' Matches any single character.'*' Matches zero or more of the preceding element. The matching sho ...