POJ 2876
#include<iostream>
#include<string>
using namespace std; string s[]; int main()
{
//freopen("acm.acm","r",stdin);
string tem;
int i;
s[] = "-";
for(i = ; i < ; ++ i)
{
s[i] += s[i-];
s[i] += s[i-];
s[i] += s[i-];
fill_n(s[i].begin()+s[i-].length(),s[i-].length(),' ');
}
while(cin>>i)
{
cout<<s[i]<<endl;
}
}
POJ 2876的更多相关文章
- POJ 2876 Cantoring Along
Description The Cantor set was discovered by Georg Cantor. It is one of the simpler fractals. It is ...
- POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理
Halloween treats Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7644 Accepted: 2798 ...
- POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理
Find a multiple Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7192 Accepted: 3138 ...
- POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22286 ...
- POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37427 Accepted: 16288 Descr ...
- POJ 3254. Corn Fields 状态压缩DP (入门级)
Corn Fields Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 9806 Accepted: 5185 Descr ...
- POJ 2739. Sum of Consecutive Prime Numbers
Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20050 ...
- POJ 2255. Tree Recovery
Tree Recovery Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11939 Accepted: 7493 De ...
- POJ 2752 Seek the Name, Seek the Fame [kmp]
Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 17898 Ac ...
随机推荐
- poj-2406(字符串hash)
题目链接:传送门 思路:字符串hash,终止条件竟然判断错了,真是太大意了. #include<iostream> #include<cstdio> #include<c ...
- (4)4 larger-than-life lessons from soap operas
https://www.ted.com/talks/kate_adams_4_larger_than_life_lessons_from_soap_operas/transcript 00:12In ...
- c#用EPPLUS操作excel
参考: http://www.cnblogs.com/rumeng/p/3785748.html http://www.cnblogs.com/libla/p/5824296.html#3818995 ...
- textInput事件
DOM3级事件引入了 textInput 这个代替keypress的textInput的行为稍有不同 区别 只要可以获得焦点的元素都有keypress事件,但是textInput事件只有文本编辑区域才 ...
- 1.7.8使用return 停止线程
package com.cky.thread; /** * Created by edison on 2017/12/3. */ public class MyThread12 extends Thr ...
- bzoj2004(矩阵快速幂,状压DP)
每个长度为p的区间都必须出现k次1,数据又很小,我们使用状压. dp[i][j]->dp[i+1][j'],dp[i][j]表示当前考虑到了第i个车站,包括第i个其后的p个的状态(有车停或没车停 ...
- hihocoder 二分
题目 一个简单的二分,只是想说明一下,如若要查找一个数组中某个数的下标可以直接用lower_bound()这个函数.只是要考虑到要查找的数不在数组中的这种情况. #include <cstdio ...
- shell 命令 rz sz
尝试了几个版本,下面的是可用的 https://segmentfault.com/a/1190000012166969
- ctags的如何生成tags文件
tags 在使用vim编程和浏览代码是非常有用.可以用CTRL+]和CTRL+t 来回跳转关键字.先生成自己工作目录的tags.最简单粗暴用法: $cd yourwork $ctags -R * 这样 ...
- 使用ActionFilterAttribute实现MVC后台授权
授权就是我们在用户未登录的情况下不允许访问一些页面,只有登录后才能进行访问一些页面. 在mvc中我们可以使用ActionFilterAttribute来进行授权验证来阻止一些未经授权的直接访问的页面. ...