自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 1198. Substring -- Parano is not ChaoRu!!!!

#include #include#includeusing namespace std;bool mycmp(string a,string b){ /* int l = a.length()>noc; while(noc--) { cin>>n; for(int i=0;i>st

2011-02-26 17:55:00 543 1

原创 Sisily 1193. Up the Stairs --by ChaoRu

<br />话说RUPENG同学的方法一点理性光辉都木有.....我正监考托福考试,无聊刷下<br />#include<iostream>#include<cstdlib>//#include <cstdio>#define M 2020using namespace std;int ini[M];void qsort(int *a, int l, int r){ if(l>=r) return; int p = l, q = r, f = (ran

2011-02-26 10:59:00 515 1

原创 Sicily 1029. Rabbit --by rupeng

<br />打完游戏,头脑晕晕的...又去刷作业题,这道是高精度加法,挺水的,不多说了...明儿把最后一道1028刷了就完工了oh yeah~<br />链接: http://soj.me/1029<br />// source code of submission 628265, Zhongshan University Online Judge System#include<iostream>#include<string>using namespace std;string adult

2011-02-26 04:09:00 626

原创 Sicily 1021. Couples --by rupeng

<br />也是老师要求的六题之一....  不过这题没有用栈来做...<br />链接: http://soj.me/1021<br />// source code of submission 437964, Zhongshan University Online Judge System#include<iostream>#include<map>using namespace std;class node{public: node(int x) {

2011-02-25 22:52:00 559

原创 1198. Substring --by rupeng

<br />链接:http://soj.me/1198<br />水题,全排就行了,只是wa到我死了个去...<br />#include<iostream>#include<vector>#include<string>using namespace std;int b,a;string s;vector<string> eight,ans,tmp1,tmp2;string merge(vector<string> in){ string tmp; for(int

2011-02-25 22:35:00 608

原创 Sicily 1176. Two Ends ---by rupeng

链接: http://soj.me/1176也是老师让做的,总共六题;一串数字,两人取数,只能从两头取,A很聪明,就是你啦,B很笨,每次只取两端大的,现A用最优策略,B用最笨策略,问A能比B多多少分。 这题递归最合适了,记忆化搜索#include#includeusing namespace std;int rem[1005][1005],arr[1005];int max(int x, int y){ if(x>y) return x; else return y;}int

2011-02-25 21:25:00 826 2

原创 Sisily 1193. Up the Stairs --by rupeng

链接:http://soj.me/1193这道题是老师要我们做的,只要把问题转化为,人们在楼梯上可以看成是相互穿越的,问题就好解决了~ 我的做法是用一个数组arr[1005]记录下所有人当前所在楼层,如果该人空手,则是所在楼层乘上-1,如空手下到五楼的人所在楼层是-5,让数组从大到小排序,然后维护一个数组,迭代一次就代表所有人都把东西卸货了,所以第一次迭代后的每一次数组都应该是一样的#include#include#includeusing namespace std;int n, f, b

2011-02-25 18:41:00 684

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除