- 博客(8)
- 资源 (4)
- 收藏
- 关注
原创 ZOJ 2105 Number Sequence
昨天看了一下午也没看出来。。发了个帖子得到大神指点,好好写了下注释才找出毛病。。。原来是下标搞错了。。教训是一定要按原理来,不能按测试的数据去瞎碰。#includeusing namespace std;int main(){ int a,b,n; int arr[100]; while(1) { cin>>a>>b>>n; if(a==0&&b==0&&n==
2014-03-25 15:28:58 504
原创 ZOJ 1113
coutcout好吧。。表示无聊了。。#include #include using namespace std;int main(){ double sum=1,n=1; cout<<"n e\n- -----------\n0 1\n"; for(int i=1;i<10;++i) { n/=i; sum+=n; if(i>2)cout<<setpre
2014-03-25 14:38:26 700
原创 ZOJ2104 Let the Balloon Rise
头文件string.h和string是有区别滴~#include#include using namespace std;int main(){ while(1) { int num; string arr[1000]; string result; cin>>num; if(num==0)break; int max=0; int i=0,
2014-03-24 16:55:32 515
原创 ZOJ1716Get Many Persimmon Trees
最近运气不错~水水更健康~#include using namespace std;bool isInRect(int baseX,int baseY,int width,int height,int x,int y){ return (baseX<=x&&baseY<=y&&x<=baseX+width-1&&y<=baseY+height-1);}int main(){
2014-03-22 14:03:56 577
原创 ZOJ1414 Number Steps
难得的一把过,头一次诶~#include using namespace std;int main(){ int num; cin>>num; while(num--) { int x,y; cin>>x>>y; if(x==y||x-y==2) { if(x%2)cout<<x+y-1; else cout<<x+y;cout<
2014-03-21 17:08:28 487
原创 ZOJ1713 Haiku Review
又是一把过啊,特此纪念下~ 字符串指针和string变量的对应- - ╮(╯▽╰)╭学艺不精。。感觉得重新学一遍C++#include #include using namespace std;bool isVowel(char ch){ return (ch=='a'||ch=='o'||ch=='e'||ch=='i'||ch=='u'||ch=='y');}int
2014-03-21 17:06:34 573
原创 一天一道ZOJ
上了四年大学,身为计算机专业出身,代码能力竟然次到如此地步!从今天开始好好学习C++,一天一道ZOJ---------先从简单的来~ZOJ1115: 注意接收数字串的长度,long long 也不可,要将接收到的字符串先处理一下,然后再计算。
2014-03-20 13:51:33 527
转载 CUDA的线程块size
前面扯了很多,不过大多都是在讲CUDA 在软体层面的东西;接下来,虽然Heresy 自己也不熟,不过还是来研究一下硬体的部分吧~毕竟要最佳化的时候,好像还是要大概知道一下相关的东西的。这部分主要参考资料是:[Hotball's Hive]GPU 的硬体架构Programming Massively Parallel Processors的Lecture 7在研究硬体架构前,
2014-03-18 14:21:43 1824
CUDA SDK 语法高亮必备 usertype.dat
2015-08-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人